Plugin Configuration
Configure the plugin from the OpenNMS web interface at Plugins > ServiceNow.
Settings
| Field | Description |
|---|---|
ServiceNow Base API URL |
Your ServiceNow instance URL in the format |
Username / Password |
Credentials for the ServiceNow integration user (see ServiceNow Instance Setup) |
Forward Alarms |
Forward OpenNMS alarms to ServiceNow Event Management. Alarms are correlated using |
Forward Events |
Forward OpenNMS events to ServiceNow Event Management. |
Forward Tickets |
Create and update ServiceNow incidents from OpenNMS alarms. Requires the ticketer plugin (see Installation). |
CMDB Import |
Import configuration items from the ServiceNow CMDB. |
Status |
Shows Connected or Disconnected after saving. |
Click Update to save the configuration.
|
Choosing between event and alarm forwarding Alarm forwarding is recommended for alert lifecycle management.
Alarms set Event forwarding provides a raw audit trail in ServiceNow’s If both are enabled, node events will create duplicate alerts — one closeable (from alarm forwarding) and one that remains open (from event forwarding). In general, alarm forwarding alone is sufficient for most use cases. Enable event forwarding only if you need a record of every individual event in ServiceNow, and be aware that the resulting alerts will not auto-close. |
How Ticket Forwarding Works
When Forward Tickets is enabled, the plugin creates and updates incidents in ServiceNow using the Incident Table API (/api/now/table/incident).
-
When a ticket is created in OpenNMS, a new incident is created in ServiceNow and the
sys_idis stored as the ticket ID. -
When a ticket is updated or closed in OpenNMS, the corresponding incident is updated in ServiceNow.
-
Alarm severity is mapped to ServiceNow impact and urgency fields.
-
When resolving an incident,
close_codeandclose_notesare set automatically. -
If the node label matches a configuration item in the ServiceNow CMDB, the incident is linked to it automatically.
-
Work notes are added with OpenNMS context (node label, node ID, IP address, alarm ID).
How CMDB Import Works
The ServiceNow Configuration Management Database (CMDB) is a central repository that stores information about your IT infrastructure — servers, routers, switches, applications, and their relationships. Each item in the CMDB is called a Configuration Item (CI).
When CMDB Import is enabled, the plugin imports CIs from ServiceNow into OpenNMS as managed nodes.
-
CIs are fetched from
/api/now/table/cmdb_ci, filtered to those with a valid name and IP address. -
Each CI is mapped to an OpenNMS node under the foreign source
servicenow. -
The import runs automatically every 24 hours and on plugin startup (after a 2-minute delay to allow services to initialize).
-
An immediate import is also triggered whenever the plugin configuration is saved.
| CMDB CI Field | OpenNMS Node Field |
|---|---|
|
Foreign ID |
|
Node Label |
|
Primary IP Interface |
|
Node Category (defaults to "ServiceNow") |
|
Asset: Serial Number |
|
Asset: Asset Number |
|
Asset: Vendor |
|
Asset: Model Number |
|
Asset: Operating System |
|
Asset: Description |
Additionally, when creating incidents with Forward Tickets enabled, the plugin automatically links the incident to a CMDB CI if the OpenNMS node label matches a CI name in ServiceNow.
Field Mappings
Event and Alarm Mapping
Events and alarms are sent to the ServiceNow Event Web Service API (/api/global/em/jsonv2).
Events use event_class = OpenNMS.Event and alarms use event_class = OpenNMS.Alarm.
| ServiceNow Field | OpenNMS Source (Events) | OpenNMS Source (Alarms) |
|---|---|---|
|
Instance ID ( |
Instance ID ( |
|
|
|
|
Node label (from NodeDao) |
Node label (from alarm) |
|
IP address : service name (falls back to node label) |
Event parameter: |
|
Event parameter: |
Event parameter: |
|
Event UEI |
Last event UEI |
|
Mapped from event severity (see table below) |
Mapped from alarm severity (see table below) |
|
Event parameter: |
Alarm description |
|
All event parameters (JSON) |
Alarm ID, reduction key, acknowledged (JSON) |
|
Event time (UTC) |
Last event time (UTC) |
|
|
|
|
(not set) |
Alarm reduction key (for correlation) |
|
Node label |
Node label |
Incident Mapping (Ticketing)
Incidents are created and updated via the ServiceNow Incident Table API (/api/now/table/incident).
| ServiceNow Incident Field | OpenNMS Source |
|---|---|
|
Node label + alarm log message (e.g., |
|
Alarm description |
|
Ticket user (if set) |
|
Ticket state: OPEN = |
|
Mapped from alarm severity (see table below) |
|
Mapped from alarm severity (see table below) |
|
|
|
|
|
CMDB CI sys_id (if node label matches a CI name in ServiceNow) |
|
OpenNMS context: instance ID, node label, node ID, IP address, alarm ID |
|
|
|
|
Filtering
The plugin supports JEXL expression-based filters for events, alarms, and tickets, plus a ServiceNow query filter for CMDB imports. Configure filters from the Filters tab in the plugin UI.
-
An empty filter means all items pass through (no filtering).
-
Invalid filter expressions are rejected at save time with an inline error message. The previously saved valid filter is preserved.
-
At runtime, if a compiled filter fails to evaluate, the item passes through (fail-open).
Event Filter
Controls which OpenNMS events are forwarded to ServiceNow Event Management.
The default filter excludes internal and trouble ticket events:
!(event.uei =~ 'uei.opennms.org/internal/.*') and !(event.uei =~ 'uei.opennms.org/troubleTicket/.*')
| Field | Description |
|---|---|
|
Event unique identifier (UEI) |
|
Event severity object (use |
|
Node ID (integer) |
|
Service name |
|
Event parameters (list) |
Alarm Filter
Controls which OpenNMS alarms are forwarded to ServiceNow Event Management.
The default filter excludes internal and trouble ticket alarms:
!(alarm.reductionKey =~ 'uei.opennms.org/internal/.*') and !(alarm.reductionKey =~ 'uei.opennms.org/troubleTicket/.*')
| Field | Description |
|---|---|
|
Alarm reduction key |
|
Alarm ID (integer) |
|
Alarm severity object (use |
|
Node label |
|
Node location |
|
Whether the alarm is a situation (boolean) |
|
Whether the alarm is acknowledged (boolean) |
|
Alarm log message |
|
Alarm description |
|
Alarm type |
Cleared alarms are always sent with severity 0 and resolution state Closing, allowing ServiceNow to close the corresponding alert.
|
Ticket Filter
Controls which alarms are eligible for incident creation in ServiceNow. The filter is evaluated against the alarm associated with the ticket.
An empty filter (the default) allows incidents for all alarms.
alarm.severity.id >= 4
The available fields are the same as the Alarm Filter.
CMDB Filter
Controls which configuration items are imported from the ServiceNow CMDB.
This filter uses ServiceNow sysparm_query syntax (not JEXL) and is appended to the base query that requires a valid name and IP address.
An empty filter (the default) imports all CIs with a name and IP address.
sys_class_name=cmdb_ci_server
sys_class_nameINcmdb_ci_server,cmdb_ci_linux_server^manufacturer=Dell
JEXL Expression Syntax
Filters use Apache JEXL 3 expression syntax.
| Operator | Description |
|---|---|
|
Equality / inequality |
|
Numeric comparison |
|
Regex match (e.g., |
|
Regex non-match |
|
Logical operators |
# Forward only MAJOR (4) or higher severity
alarm.severity.id >= 4
# Exclude internal events and only forward MINOR or higher
!(event.uei =~ 'uei.opennms.org/internal/.*') and event.severity.id >= 3
# Only forward acknowledged alarms from a specific location
alarm.acknowledged and alarm.node.location == 'DC-East'
Customizing Filters in ServiceNow
You can customize how events are transformed into alerts by configuring Event Rules in ServiceNow:
-
Navigate to All > Event Management > Event Rules in ServiceNow.
-
Create rules to filter by
event_class, severity, source, or other fields. -
Event Rules control how event fields map to alert fields (e.g., severity, description, node).