Configuring a custom webhook notifier
You can configure alerts from IBM® NS1 Connect® to your preferred notification service using a custom webhook notifier.
When an alert or monitoring notification is triggered, NS1 Connect sends a POST
request to the webhook URL with details. The example below shows the request body of a PING
monitoring alert sent to a custom webhook URL indicating the monitored endpoint is down.
{
"state": "down",
"since": 1444744828,
"region": "global",
"job_document": {
"notes": null,
"name": "ping2",
"notify_repeat": 0,
"id": "561d0d482db1564c88776b57",
"region_scope": "fixed",
"rapid_recheck": false,
"frequency": 60,
"job_type": "ping",
"notify_delay": 0,
"notify_list": "560d7d249f782d4d663d7d3d",
"notify_regional": false,
"regions": [
"lga"
],
"policy": "quorum",
"config": {
"timeout": 2000,
"host": "1.1.1.1",
"count": 4
},
"status": {
"global": {
"since": 1444744580,
"status": "up"
},
"lga": {
"since": 1444744580,
"status": "up"
}
},
"notify_failback": true,
"rules": [],
"active": true
}
}
When the monitored endpoint is determined to be available again, another alert is sent. For example:
{
"state": "up",
"since": 1444745000,
...
Before you begin
- You must have the Manage notifier lists permission enabled.
Instructions
You can create a notifier list with the custom webhook notifier or add it to an existing list. Refer to the following instructions when adding a custom webhook notifier to a new or existing notifier list.
- Under Notifier type, select Webhook.
- Enter the Webhook URL.
- Click + Webhook headers to add an HTTP header
(key-value pair) to include in the
POST
request to the specified URL. Each header must use a unique key. Headers can be used for authenticating notifications from NS1 Connect to prevent a malicious actor from spoofing fake notifications. Refer to RFC 9110 for more information about supported HTTP headers and use cases. - Click Create notifier.