From OpenNMS
Contents |
Summary
OpenNMS can collect SNMP values and use them to populate asset records for systems that you are managing. This can be very useful for automatically populating asset fields in a large number of managed systems. Depending on the SNMP MIBs that your devices support, you could either fill in some of the existing asset fields (manufacturer, vendor, modelnumber, serialnumber, etc.) or construct a custom-formatted message for the longer comment field.
Configuration
To start using the SNMP asset adapter, you must install the opennms-snmp-asset-provisioning-adapter-[version].jar into OpenNMS's lib directory. After you do that, it is just a matter of defining the fields in the snmp-asset-adapter-configuration.xml configuration file.
<?xml version="1.0" encoding="UTF-8"?>
<snmp-asset-adapter-configuration>
<package name="ciscoWireless">
<!-- A Cisco wireless sysoid, for example purposes only :) -->
<sysoid>.1.3.6.1.4.1.9.1.379</sysoid>
<assetField name="region" formatString="${gsmCountry}">
<mibObjs>
<!-- A Cisco 3G WAN adapter OID -->
<mibObj oid=".1.3.6.1.4.1.9.9.661.1.3.2.1.8" alias="gsmCountry"/>
</mibObjs>
</assetField>
</package>
</snmp-asset-adapter-configuration>
In this configuration example, every node whose sysoid equals .1.3.6.1.4.1.9.1.379 will be matched by the "ciscoWireless" package. This package is configured to set the value of the region asset field. The value that is set is defined by a formatted string. Tokens in the string using the ${token} syntax will be replaced by values that are defined by the list of mibObj parameters.
In this example, if an SNMP get of the OID value .1.3.6.1.4.1.9.9.661.1.3.2.1.8 returns something like "UK", then the "region" field in the asset database will end up being set to "UK" since there is just a single token in the formatting string.
It's that simple! You may want to snmpwalk your target nodes and see if there are any interesting identifiers or string values that you would like to see in an asset field first. Then just define them under a package that matches based on sysoid and you will be set to start collecting data.
Note: You may specify any number of <sysoid> tags, as well as <sysoidMask> tags.
Operation
The SNMP asset provisioning adapter is invoked every time a node is added or updated by provisiond. With the default provisiond configuration, the update will take place once every 24 hours.
Bugs Addressed By This Feature
Bug 2132: Auto assign asset columns
Bug 3337: Display collected info on Node page
Bug 3492: Automatically populating asset fields
Version History/Availability
- This feature was added in version 1.8.2






