OCS Computers

Mappers are used to map the bifurcated OCS data model centered around computers and SNMP devices to the unified OpenNMS data model for provisioning nodes, interfaces, services and assets. The OCS integration provides one default mapper for computers and one for SNMP devices out of the box. Additionally it provides for script-based mapping via script steps. The default mappers for OCS are a simple way to map computers and SNMP devices to OpenNMS nodes.

To use this mapper, configure your requisition config to use ocs.computers as mapper. This mapper requires a checksum of 4867 to get all required data. It elects the OCS-Source-IP as management-interface of the node. The black- and whitelisting is applied against the interface. If no interface is valid, the node will have no interfaces and a corresponding log message will be written. The elected management interface is enriched with the interface description, if available. The SNMP and ICMP services are forced onto the management interface. Additionally the comment field of the node assets is used to provide an HTML link to the computer page of the OCS instance. The assets for cpu and operatingSystem will be mapped from the OCS computer too. The computer name is used as both foreignId and nodeLabel.

Accountinfo to Category Mapper

The default mapper for Computers supports a mapping between OCS Accountinfo data from OCS to OpenNMS surveillance categories. To use this feature add the mapper.categoryMap parameter to the requisition.properties file and reference a properties file following this syntax example:

# generic example for a properties file that maps OCS Accountinfo data to OpenNMS surveillance categories
ADMINISTRATIVEDATAFILEDNAME.data=OpenNMSCategoryName

# the Accountinfo for ENVIRONMENT is mapped to the OpenNMS surveillance category "Production" if the Accountinfo value is set to "Production"
ENVIRONMENT.Production=Production
# the Accountinfo for JOB is mapped to the OpenNMS surveillance category "Mail" if the Accountinfo value is set to "Mailserver"
JOB.Mailserver=Mail

Accountinfo to Asset Mapper

The Default mapper for Computers supports a mapping between OCS Accountinfo data from OCS to OpenNMS assets. Accountinfo entry values can be used as values for OpenNMS asset fields. To use this feature add the assetMap parameter to the requisition.properties file and reference a properties file following this syntax example:

# generic example for Accountinfo mapping to OpenNMS assets
ADMINISTRATIVEDATAFILEDNAME = OpenNMS-AssetName

# The value of the Accountinfo entry "TAG" is mapped to the OpenNMS asset field "region"
TAG = region

# The value of the Accountinfo entry "SERVERRACK" is mapped to the OpenNMS asset field "rack"
SERVERRACK = rack