Alarm Forwarding
The AlarmForwarder component listens for OpenNMS alarm lifecycle events and forwards qualifying alarms to ServiceNow.
How it works
-
When OpenNMS raises or clears an alarm, the
AlarmForwarderis notified via theAlarmLifecycleListenerinterface. -
On the first callback the plugin processes the full alarm snapshot; subsequent callbacks handle individual alarm updates.
-
Each alarm is checked against the UEI filter and the node-category filter (see Alarm Filters).
-
For qualifying alarms,
EdgeService.getParent()is called to enrich the alert with the parent-node label from the topology map. -
The alarm is converted to an
AlertDTO and sent to ServiceNow via the configuredalert.endpoint. -
A custom OpenNMS event is raised to record the outcome (success or failure).
Alert fields
| Field | Description |
|---|---|
|
OpenNMS alarm reduction key |
|
Alarm event time |
|
Node label |
|
Alarm UEI |
|
OpenNMS severity mapped to ServiceNow severity levels |
|
Alarm log message |
|
OpenNMS node ID |
|
Asset tag from node metadata |
|
|
|
Label of the parent node as determined by |
Topology enrichment
The EdgeService builds a parent-child topology map by traversing EdgeDao data up to service.iteration hops.
It starts on a scheduled executor after an initial delay (service.initial.delay) and refreshes periodically (service.delay).
The PluginScheduler manages this scheduling.
You can force an immediate refresh from the Karaf shell:
admin@opennms()> opennms-service-now:edge-service-run
You can inspect the current topology map:
admin@opennms()> opennms-service-now:get-edge-map
admin@opennms()> opennms-service-now:get-parent <nodeId>
admin@opennms()> opennms-service-now:get-gateways
Testing alarm forwarding
You can send a test alarm to ServiceNow without waiting for a real network event:
admin@opennms()> opennms-service-now:send-down-alarm
admin@opennms()> opennms-service-now:send-up-alarm
Result events
After each forwarding attempt, the plugin raises one of the following OpenNMS events:
| UEI | Severity | Meaning |
|---|---|---|
|
Normal |
Alert was successfully sent to ServiceNow |
|
Critical |
Alert could not be sent to ServiceNow |
See Custom Events for details.