The best thing you can do when setting up alerting for ANY method; is to check the source code in includes/alerting/blah.inc.php

For webhooks,

The URL is to the API and should include the authentication token if that’s how your web hook API does auth.

e.g. URL’s might be,

https://webhook/api/log
https://webhook/api/%{AUTH_TOKEN}%/alert

etc

Authentication token will be send as the Authorisation header, currently in format ‘”Authorization: AccessKey " . $endpoint['token'] . "\r\n",'

Should probably get that modified slightly so it can be used for basic auth too. Not sure how AccessKey got left in there when I submitted the JIRA request.

Easy enough to modify right now if that’s what you need, change it to ‘”Authorisation: “ . $endpoint[‘token’] . “\r\n”,’ and set token as appropriate.

Sender of message will set “originator” to that value within the JSON message.

The other value in the message will be “body” which will be the Observium alert description string.

e.g. if you’re simply dumping web hook messages to syslog you’d see something like this in syslog, based on whether sender of message is set or not.

Dec 29 22:08:05 web01 webhooker: Log:

{"originator":null,"body":"RECOVER: [server.localdomain] [storage] [/opt] Storage exceeds 90% of disk capacity\nstorage_perc = 6.79"}

Dec 29 22:08:05 web01 webhooker: Log:

{"originator":"Observium Test 1234","body":"RECOVER: [server.localdomain] [storage] [/opt] Storage exceeds 90% of disk capacity\nstorage_perc = 6.79"}



-Colin


On 20 January 2016 at 04:02, Daughenbaugh, Glenn <Glenn.Daughenbaugh@turner.com> wrote:

Would like to get more information on how to use the webhooks option under creating new contacts.

Examples would be great. 


Thanks.


Glenn




_______________________________________________________________
GLENN DAUGHENBAUGH  |  SENIOR APPLICATION ENGINEER  |  MSS :SRE/DOC-TECHNICAL LIASON | AMPT: AUDIENCE DATA & ANALYTIC PLATFORMS 
O. 404-827-2180  |  C. 770-540-1087 | GLENN.DAUGHENBAUGH@TURNER.COM
TURNER BROADCASTING SYSTEM, INC.  | ONE CNN CENTER. ATLANTA, GA 30303


_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium