The Webhook Notifier sends notifications using HTTP POST using a JSON body. The handler emits all available information about the alarm to the recipient, which is expected to parse the message and correlate it with other messages. The alarm_id can be used for correlation to see which notifications belong together; if they have the same alarm_id they are considered state changes on the same alarm. The notification has a timestamp last_updated which can be used in the event of notifications arriving out of order.
POST
alarm_id
last_updated
There are two available message formats:
The following keys are used in the flat and nested formats:
flat
nested
alarm_type
failed-authentication
resource_id
resource_type
node_id
cleared
severity
dashboard_link
brief_description
detailed_description
impacted_resources
suggested_actions
ISO-8601
Note
The same alarm_id will be used for notifications concerning the same alarming resource and alarm type. If the state changes from cleared = true to cleared = false or if the severity is changed, a new notification is sent with the same alarm_id.
cleared = true
cleared = false
The flat format is limited to a single level in the json map. Long strings may contain newline characters which the recipient system must parse for readability.
{ "alarm_id" : "<STRING>", "alarm_type" : "<STRING>", "resource_id" : "<STRING>", "resource_type" : "<STRING>", "node_id" : "<STRING>", "cleared" : "<BOOLEAN>", "severity" : "<STRING of CLEARED, WARNING, MINOR, MAJOR, CRITICAL>", "dashboard_link" : "<URL>", "brief_description" : "<STRING>", "detailed_description": "<MULTILINE STRING>", "impacted_resources": "<MULTILINE STRING>", "suggested_actions": "<MULTILINE STRING>", "last_updated" : "<DATE AND TIME>" }
The nested format has a structure where different parts of the alarm are represented in sub-maps. Multi-line text messages are represented using JSON arrays.
{ "alarm_id" : "<STRING>", "identifier" : { "alarm_type" : "<STRING>", "resource_id" : "<STRING>", "resource_type": "<STRING>", "node_id": "<STRING>", }, "cleared" : "<BOOLEAN>", "severity": "<STRING of CLEARED, WARNING, MINOR, MAJOR, CRITICAL>", "description" : { "dashboard_link": "<URL>", "brief_description": "<STRING>", "detailed_description": ["<STRING>"], "suggested_actions": ["<STRING>"], "impact_descriptions": { "<TYPE>" : { "title" : "<STRING>", "impacted_dependencies" : ["<STRING>"] } } }, "last_updated" : "<DATE AND TIME>" }
To configure the Webhook alarm handler, an HTTP client needs to be configured, along with the path, host and port to connect to. Any authentication mechanism is configured on the HTTP client, which supports Mutual TLS, Basic Authentication and OAuth Client Credentials.
The webhook is configured under /environments/environment/alarms/alarm-handlers/alarm-handler
/environments/environment/alarms/alarm-handlers/alarm-handler
webhook-notifier/message-format
webhook-notifier/web-service/hostname
webhook-notifier/web-service/port
webhook-notifier/web-service/context
webhook-notifier/web-service/http-client
% show environments environment alarms alarm-handlers alarm-handler wh1 webhook-notifier { web-service { hostname example.com; port 443; context /postme; http-client trustStoreHttpClient; } message-format nested; }