Webhook Integration : Send alerts to ServiceNow
This guide shows how to use webhookes to export Nile Service Block (NSB) Alerts to ServiceNow — for log analysis and archiving.
Alerts that export via webhook to ServiceNow are:
SLAs | Nile service availability, coverage, and capacity alerts |
Infrastructure | Infrastructure DHCP, DNS, RADIUS, and Internet availability alerts |
Applications | Application availability and latency alerts |
Security | Wireless Intrusion Detection (WIDS) alerts |
- ServiceNow cloud instance, with access from Nile cloud
- Administrator rights to the Nile Portal.
- Login to ServiceNow.You can create a new account if you don’t have one yet.
- ServiceNow provides a developer instance (for free) that can be used for NSB integration tests. This document uses a developer instance for this purpose. The steps will be the same in creating a production ServiceNow instance.
- To create a developer instance, go to
After building the developer instance, you will be provided an instance URL, login user name, and password. (In our example, the developer instance URL is https://dev119912.service-now.com and the username/password is “admin/=EZ*g23IjdTi”)
Important Note: If you do not access the developer instance for a few days, the instance state will be changed to hibernate. After some additional time, the instance will be deleted.
- Login to the new instance using your admin account
- ServiceNow provides default fields for Incidents, and this can be extendable. We will need to add a new field, “External Id” as an example to the
- From the
- The list of tables (model) in the ServiceNow is shown below:
- Search for
- In the “Columns” tab, add the label “Incident”, the name “Incident”, then then click
- From the column option, set
- The next step is to create a Java scripted Rest APIs which handles the Webhooks requests from Nile notification-services. Below is the Java script that we will use to create the API:
Note: you can customize the script. For more information on ServiceNow API scripts use the following URL: https://docs.servicenow.com/bundle/rome-application-development/page/integrate/custom-web-services/reference/r_ScriptedRESTServiceScriptExamples.html
- To add the script API to ServiceNow, navigate to
- In the
- Search REST APIs name “
- To add the API script, under the
- Select
- Under the Security tab, make sure the
- Take a note of the resource path URL; it’s needed for integration and API testing. In our example API resource URL is “
- We will need a fully qualified REST API path. For ServiceNow, the fully qualified path is
- Open
- Nile portal required a basic token for integration. Postman will generate a basic token from authentication, and you will need the key (token) to set up Nile webhook ServiceNow Integration. To view and copy the basic token, click on
- To test the API, we will need to generate a test incident, we can use a simple JSON alert payload that simulates “Alert Notifier” / “Notification Services”, below is a simple schema to generate a simple alert. All the fields in the JSON are String type.
- To generate the test alert, select the
- Click on
- Verify the incident is created under ServiceNow, from the ServiceNow instance, under
- Login to Nile portal using an admin account, and navigate to Settings Select Global Settings Select Integration; click on “
- Fill out ServiceNow Webhooks info:
Name: Webhooks name example “Service-Now”
URL : ServiceNow API URL “https://instance name + resource path”. In our example, it will be https://dev119912.service-now.com/api/832604/nile_alert
Token: Basic Authentication token generated by Postman In our example “Basic YWRtaW46PUVaKmcyM0lqZFRp”
Click on SAVE to save the setup.
- Nile portal has options to send specific alert to admin via email or to Webhooks. These alert groups are:
SLAs | Nile service availability, coverage, and capacity alerts |
Infrastructure | Infrastructure DHCP, DNS, RADIUS, and Internet availability alerts |
Applications | Application availability and latency alerts |
Security | Wireless Intrusion Detection (WIDS) alerts |
- Login to Nile portal using an admin account and navigate to
- Login to Nile Portal as an admin.
- Click on
- Login to ServiceNow instance as an admin.
- Verify Nile alerts are created as incidents under ServiceNow: from the ServiceNow instance, under All, filter on Service Desk, then click on Incidents, Incident table will be opened.
- Click on the blue link of the incident number to see the detail: