ServiceNow Instance Setup
This guide walks through preparing your ServiceNow instance for integration with OpenNMS. These steps apply to any ServiceNow instance (production, test, or developer).
| If you don’t have a ServiceNow instance for testing, you can request a free Personal Developer Instance (PDI) from the ServiceNow Developer Program. |
Step 1: Activate Event Management
The Event Web Service API (/api/global/em/jsonv2) is only available when Event Management is activated. This step is required for event and alarm forwarding.
| If you only need ticket (incident) forwarding and CMDB import, you can skip this step — those features use the base ITSM Table API which is available by default. |
-
Log in as an admin user in your ServiceNow instance.
-
Navigate to: All > System Definition > Plugins.
-
Search for "Event Management Core" (
sn_em_ai). -
Install the Event Management Core (
sn_em_ai) app. -
Wait for the installation to complete (this may take a few minutes).
Verify Event Management is Active
Test the API endpoint:
curl -X POST -u admin:password \
-H "Content-Type: application/json" \
"https://<your-instance>.service-now.com/api/global/em/jsonv2" \
-d '{"records":[{"source":"OpenNMS-Test","event_class":"OpenNMS.Event","node":"test-node","severity":"4","description":"Test event"}]}'
A response containing "events were inserted" confirms Event Management is active. A 404 means it is not activated.
| For quick access to OpenNMS data in ServiceNow, add Event Management > All Alerts, Event Management > All Events, and Service Desk > Incidents to your favorites using the star icon in the navigation filter. |
Step 2: Create an Integration User
Create the User
-
Log in as an admin user in your ServiceNow instance.
-
Navigate to All > User Administration > Users.
-
Click New and fill out the user details (example values shown — use any values suitable for your organization):
Field Example Value User ID
opennms_user
First Name
OpenNMS
Last Name
Integration
Email
Password
Set a strong password
Active
Checked
-
Click Submit to create the user.
Assign Required Roles
-
Reopen the user record.
-
Scroll to the Roles section and click Edit.
-
Add the following roles:
Role Purpose Required For evt_mgmt_integrationEvent Web Service API access
Events and Alarms forwarding
evt_mgmt_userView events and alerts in ServiceNow UI
Events and Alarms forwarding
itilIncident table read/write, CMDB read access
Ticket creation and updates, CMDB import
The evt_mgmt_integrationandevt_mgmt_userroles are only available after Event Management is activated. If you don’t see these roles, complete Step 1 first. -
Click Save to apply the role assignments.
Test API Access
Verify the integration user has the correct permissions before configuring the plugin.
Test the Event Web Service API:
curl -X POST -u opennms_user:password \
-H "Content-Type: application/json" \
"https://<your-instance>.service-now.com/api/global/em/jsonv2" \
-d '{"records":[{"source":"OpenNMS-Test","event_class":"OpenNMS.Event","node":"test-node","severity":"4","description":"Test event"}]}'
Test the Incident API:
curl -s -w "\nHTTP Status: %{http_code}\n" -u opennms_user:password \
"https://<your-instance>.service-now.com/api/now/table/incident?sysparm_limit=1"
| Response | Meaning |
|---|---|
|
Success |
|
Invalid credentials |
|
Missing required role |
|
Event Management not activated |