Asset Management
The AssetForwarder component periodically discovers network assets from the OpenNMS node inventory and synchronises them to ServiceNow as CI (Configuration Item) records.
Supported asset types
| Type | ServiceNow class | OpenNMS category |
|---|---|---|
Access Point (WiFi) |
|
Configured in |
Switch |
|
Configured in |
Firewall |
|
Configured in |
LTE Modem |
|
Configured in |
xDSL Modem |
|
Configured in |
Discovery and synchronisation
-
The
PluginSchedulertriggersAssetForwarderon a schedule (starts at10 × service.initial.delay, then everyservice.delay). -
Nodes matching the configured categories are fetched from the OpenNMS node inventory.
-
For each node, an
AccessPointorNetworkDeviceDTO is built with location, IP address, parent-node label, and model data. -
A SHA hash of the serialised DTO is compared against the hash cache. Only nodes whose data has changed since the last run are sent to ServiceNow.
-
On a successful send the new hash is written to the cache.
Cache management
The asset cache is stored on disk at the path configured by asset.cache.file.prefix (default: /opt/opennms/etc/servicenow-asset-cache).
Three files are maintained:
-
<prefix>.properties— hash cache (change detection) -
<prefix>-NetworkDevice.properties— last-sent NetworkDevice JSON per node -
<prefix>-AccessPoint.properties— last-sent AccessPoint JSON per node
Disabling an asset
To mark a specific asset as DISATTIVO (install status 7) in ServiceNow:
admin@opennms()> opennms-service-now:disable-asset <foreignSource> <foreignId>
The command looks up the asset in the cache, sets its installStatus to DISATTIVO, and sends the updated record to ServiceNow.
Testing asset forwarding
You can send a test asset to ServiceNow from the Karaf shell without waiting for the scheduler:
admin@opennms()> opennms-service-now:send-asset \
<foreignSource> <foreignId> <label> <parentLabel> <location> <ipAddress> <category>
Valid category values: Wifi, Switch, Firewall, ModemLte, ModemXdsl.
Result events
After each asset synchronisation attempt, the plugin raises one of the following OpenNMS events:
| UEI | Severity | Meaning |
|---|---|---|
|
Normal |
Asset was successfully sent to ServiceNow |
|
Critical |
Asset could not be sent to ServiceNow |
See Custom Events for details.