OCS Inventory Source
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 |
---|---|---|
|
* |
Set |
|
* |
The URL of the OCS web application. |
|
* |
A OCS user with rights to access the OCS Soap interface. |
|
* |
The password for the OCS user with rights to access the OCS Soap interface. |
|
* |
The inexplicably-named |
|
OCS supports tags / custom fields. If a tag is added to the ocs.tags list, just computers and |
|
|
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. Theocs.accountinfo
parameters supports a list ofaccountinfo
that must be present on the computer. If any of theaccountinfo
is not present the computer is skipped. To add multipleaccountinfo
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.
### 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 =
### 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 =