OCS Inventory

OCS-Inventory NG is an inventory and software management software. It handles computers and SNMP devices as separate entity types in its APIs. For that reason there are two different sources available to import nodes from OCS. Some parameters are part of both sources and described first.

General OCS Parameters

The following parameters are required:

Parameter Required Description

source

*

Set ocs.computers to import OCS computer entities and ocs.devices for OCS SNMP devices

source.url

*

The URL of the OCS web application.

source.username

*

A OCS user with rights to access the OCS Soap interface.

source.password

*

The password for the OCS user with rights to access the OCS Soap interface.

source.checksum

*

The inexplicably-named ocs.checksum parameter controls how detailed the data is that the integration is requesting from the OCS. It is important to request all the data you want to map into your requisition but not too much, since a higher checksum causes the request to be significantly slower. Read the OCS Web-Services documentation for more information. The default checksum for the default mapper is 4611.

source.tags

OCS supports tags / custom fields. If a tag is added to the ocs.tags list, just computers and snmpDevices that are marked with all the tags will be read from the OCS. This feature can be used to tag computers as testing or production.

source.target

This parameter allows to specify a file to write the result of the source to. The resulting xml file can be used for debugging or test reasons.

Using a source for OCS computers

This source reads computers from an OCS instance. It supports all parameters listed as general and the following additions:

  • accountinfo = accountinfo data is based on custom fields managed in OCS. These are managed by the Administrative-Data section of the OCS web application. The name of the custom field is presented in all caps. The value of the field as provided by the user. The ocs.accountinfo parameters supports a list of accountinfo that must be present on the computer. If any of the accountinfo is not present the computer is skipped. To add multiple accountinfo values, separate them with spaces.

Using a source for OCS SNMP devices

This source reads snmpDevices from an OCS instance. It supports all parameters listed as general and no additional at the moment.

Using a mock source for development

For development and testing there are ocs.computers.replay and ocs.devices.replay sources available. These sources require a file that contains the computers or snmpDevices as an XML file. The file has also be referenced in the configuration.

Example configuration to import OCS computer into OpenNMS
### File: computers.basic/requisition.properties
# This example imports OCS computer devices into
# an OpenNMS requisition. To convert the OCS
# computer into a requisition the mapper.groovy
# is used.
source = ocs.computers
source.url = https://your-ocs-webapplication.ocs
source.username = ocs-user
source.password = ocs-password
source.checksum = 4611
source.tags =

### mapper to convert OCS computer model into OpenNMS requisition model
mapper = ocs.computers
mapper.ocs.url = https://your-ocs.webapplication.ocs

## Run a custom mapper script
script.file = mapper.groovy

### CATEGORIES ###
mapper.categoryMap =
Example configuration to import OCS SNMP devices into OpenNMS
### File: computers.basic/requisition.properties
# This example imports OCS SNMP devices into
# an OpenNMS requisition. To convert the OCS
# SNMP devices into a requisition the mapper.groovy
# is used.
source = ocs.devices
source.url = https://your-ocs-webapplication.ocs
source.username = ocs-user
source.password = ocs-password
source.checksum = 4611
source.tags =

### run the default mapper for snmp-devices
mapper = ocs.devices
categoryMap =