wonderful news!
now i can write a script file to send text alerts to our staff :)
Simon
On 16 Dec 2015, at 3:28 pm, Tom Laermans tom.laermans@powersource.cx wrote:
Hi Spencer,
r7272 added a script execution transport, that should do the trick for you - and others who have requested similar things.
Things still need to be documented, but here's how it works:
- Add alert contact of type "external program"
- Set endpoint to script::/usr/local/bin/myobserviumrox.sh
In the script (or binary if you're into compiling) you 'll have access to a set of environment variables:
OBSERVIUM_ALERT_STATE OBSERVIUM_ALERT_URL OBSERVIUM_ALERT_ID OBSERVIUM_ALERT_MESSAGE OBSERVIUM_CONDITIONS OBSERVIUM_METRICS OBSERVIUM_DURATION OBSERVIUM_ENTITY_LINK OBSERVIUM_ENTITY_NAME OBSERVIUM_ENTITY_TYPE OBSERVIUM_ENTITY_DESCRIPTION OBSERVIUM_ENTITY_GRAPHS OBSERVIUM_DEVICE_HOSTNAME OBSERVIUM_DEVICE_LINK OBSERVIUM_DEVICE_HARDWARE OBSERVIUM_DEVICE_OS OBSERVIUM_DEVICE_LOCATION OBSERVIUM_DEVICE_UPTIME
Exit code of the script determines if Observium considers the alert to be successful or not: 0 is OK, anything else isn't.
Tom
On 2015-12-14 17:02, Spencer Ryan wrote:
Would it be possible to add a local file option to the providers for a contact?
There are situations where we would like to manipulate the data with a script of our own based on triggered alerts and recoveries and instead of mucking around the DB by hand having Observium write out the alerts to a file would be the easiest. Maybe just have it take a path and just >> the alert contents to whatever the user enters?
Spencer Ryan | Senior Systems Administrator | sryan@arbor.net mailto:sryan@arbor.net Arbor Networks +1.734.794.5033 (d) | +1.734.846.2053 (m) http://www.arbornetworks.com/www.arbornetworks.com http://www.arbornetworks.com/
observium mailing list observium@observium.org mailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium