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.
  1. Log in as an admin user in your ServiceNow instance.

  2. Navigate to: All > System Definition > Plugins.

  3. Search for "Event Management Core" (sn_em_ai).

  4. Install the Event Management Core (sn_em_ai) app.

  5. 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

  1. Log in as an admin user in your ServiceNow instance.

  2. Navigate to All > User Administration > Users.

  3. 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

    opennms@example.com

    Password

    Set a strong password

    Active

    Checked

  4. Click Submit to create the user.

Assign Required Roles

  1. Reopen the user record.

  2. Scroll to the Roles section and click Edit.

  3. Add the following roles:

    Role Purpose Required For

    evt_mgmt_integration

    Event Web Service API access

    Events and Alarms forwarding

    evt_mgmt_user

    View events and alerts in ServiceNow UI

    Events and Alarms forwarding

    itil

    Incident table read/write, CMDB read access

    Ticket creation and updates, CMDB import

    The evt_mgmt_integration and evt_mgmt_user roles are only available after Event Management is activated. If you don’t see these roles, complete Step 1 first.
  4. 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

200

Success

401

Invalid credentials

403

Missing required role

404

Event Management not activated