Configure Webhook Notifications for Alarms
For supported software information, click here.
When a Versa Operating SystemTM (VOSTM) device generates an alarm, the alarm is sent to the Director and Analytics nodes. On the Director node, you can configure webhook notifications to forward the alarms and notifications to an external HTTP or HTTPS server and to a ServiceNow platform, and you can then incorporate the notification details into your web services. The webhook notifications are generated in JSON response format.
Configure a Webhook Notification
To configure a webhook notification:
- In Director view, select the Administration tab in the top menu bar.
- Select Notification Configuration > Webhook in the left menu bar.
- Click the Add icon. In the Add Webhook popup window, enter information for the following fields.
Field Description Webhook Profile Name (Required) Enter a name for the webhook profile. Webhook URL (Required) Enter the fully qualified HTTP or HTTPS URL of where to send the request. Organization (Required) (For Releases 22.1.3 and later.) Select an organization to which to apply the webhook. Suborganizations (For Releases 22.1.3 and later.) Select a suborganization that can access the webhook configured for the parent organization. Username Enter the username for authorization of the external HTTP or HTTPS server. Password Enter the password. Enabled Click to activate the webhook. If you do not select this option, alarms are not sent to the webhook API even if you have added a webhook to the alarm notification rule. Authorization (Required) Select the authorization type:
- BasicAuth—Use basic authorization. For this authorization, you must enter a username and password.
- NoAuth—Do not use authorization.
HTTP Method (Required) Select the type of HTTP request:
- POST
- PUT
Headers Enter HTTP or HTTPS headers to add information to the request for the webhook API call, and then click Add icon. Parameters Enter additional URL parameters, and then click Add icon. Body Template Enter a valid velocity JSON template in which the key matches the API field definition and the value of each field is mapped to alarm object variables that start with a dollar ($) sign. A green check mark indicates that the JSON template is valid.
The following velocity alarm variables are supported:
- alarmText—Alarm description.
- deviceName—VOS device name.
- isCleared—Whether the alarm has been cleared. This variable is populated only for repeated alarms that have already occurred and should have been cleared.
- True—Alarm has been cleared.
- False—Alarm has not been cleared.
- lastPerceivedSeverity—Last known severity of the alarm.
- lastStatusChange—Timestamp of the last status change.
The following shows the generic body template. In this template, the alarm time, alarm timestamp, and alarm time in milliseconds fields are available for Releases 22.1.3 and later.
{ 'Device Name': '$deviceName', 'Alarm Type': '$type', 'Tenant': '$org', 'Severity': '$severity', 'Managed Object': '$managedObject', 'Specific Problem': '$specificProblem', 'Alarm Text': '$alarmText', 'Alarm Time': '$alarmTime', 'Alarm Timestamp': '$alarmTimestamp', 'Alarm Time In Milliseconds': '$alarmTimeInMillis' }
- Click OK.
Configure a ServiceNow Webhook Profile
You can use Webhooks to create incidents or events automatically on a ServiceNow IT service management platform. To do this, you configure a webhook profile whose JSON payload template is specific to the API endpoint of the ServiceNow platform. Note that you can configure similar webhook profiles for other IT service management platforms.
To configure a ServiceNow webhook profile:
- In Director view, select the Administration tab in the top menu bar.
- Select Notification Configuration > Webhook in the left menu bar.
- Click the Add icon. In the Add Webhook popup window, enter information for the following fields.
Field Description Webhook Profile Name (Required) Enter a name for the webhook. Webhook URL (Required) Enter the API endpoint URL for the ServiceNow event table or incident table. Organization (Required) (For Releases 22.1.3 and later.) Select an organization to which to apply the webhook. Suborganizations (For Releases 22.1.3 and later.) Select a suborganization that can access the webhook configured for the parent organization. Username Enter the ServiceNow instance username for authorization. Password Enter the password associated with the username. Enabled Click to activate the webhook. If you do not select this option, alarms are not sent to the webhook API even if you have added a webhook to the alarm notification rule. Authorization (Required) Select BasicAuth.
HTTP Method (Required) Select POST.
Headers Enter HTTP or HTTPS headers to add information to the request for the webhook API call, and then click Add icon. For ServiceNow, add the following headers:
- Accept: application/json
- Content-Type: application/json
Parameters Enter additional URL parameters, and then click Add icon. Body Template Enter a valid velocity JSON template in which the key matches the API field definition and the value of each field is mapped to alarm object variables that start with a dollar ($) sign. A green check mark indicates that the JSON template is valid.
For ServiceNow, use the following body template:
{ urgency: '$lastPerceivedSeverity', assigned_to: 'admin', short_description: '$type', description: '$lastAlarmText' }
The following example shows how the body template is transformed:
{ urgency: '3', caller_id: '1245-356575-366464-df24v52-dw2452', assigned_to: 'admin', short_description: 'ipsec-ike-down', description: 'IKE connection with peer 11.1.0.19 remote branch name Branch-Appliance-QA-2 (routing instance Appliance-QA-Control-VR) is up' }
- Click OK.
In the ServiceNow platform, the posted alarm displays with an autogenerated incident number.
Supported Software Information
Release 21.2.1 and later support all content described in this article, except:
- Release 22.1.3 adds the Organization and Suborganization fields in the Add Webhook popup window, and the alarm time, alarm timestamp, and alarm time in milliseconds fields in the generic body template.
Additional Information
Configure Notifications for Alarms
Configure VOS Device Alarms
Enable SMS Text Messaging