User Tools

Site Tools


api:export:externalsystemopennms

ExportAPI: Destination OpenNMS

This destination adds yourCMDB objects as nodes to the network management system OpenNMS using the OpenNMS REST API.

Configuration

short information
class name ExternalSystemOpennms
needed destination parameterresturl
restuser
restpassword
requisition
needed variablesnodelabel
ip

destination parameters

namerequireddescriptionexample
resturlrequiredREST API URL of your OpenNMS systemhttp://127.0.0.1:8980/opennms/rest
restuserrequiredREST API usernameadmin
restpasswordrequiredREST API passwordadmin
requisistionrequiredOpenNMS provisioning requisition to useyourcmdb
servicesoptionalname of services to bind on each node sepetated by spaceICMP SNMP HTTP
sslVerifyoptionaldisable SSL peer verification (since version 0.7.1)false
rescanExistingoptionalset rescanExisting flag for OpenNMS import (since version 0.7.2)dbOnly
exportSnmpConfigoptionalalso export SNMP configuration for nodes (since version 0.14)false
exportSnmpConfigRetriesoptionalexport SNMP configuration for nodes: set SNMP retries (since version 0.14)1
exportSnmpConfigTimeoutoptionalexport SNMP configuration for nodes: set SNMP timeout (since version 0.14)2000

variables

namerequireddescriptionexample
nodelabelrequirednodelabel for the OpenNMS node-
iprequiredip address to add in OpenNMS-
furtherIpsoptionalfurther ip addresses to add to OpenNMS node. Format: IP1;IP2;IP3. (since version 0.10)10.0.0.1;10.0.0.2
asset_<assetfield name>optionalcontent for asset fieldasset_city for adding information to the city field
category_<1-n>optionaluse variable value of the field to define a categorycategory_1
category_<name>optionaluse variable value of the field to define a category in format <name>-<varvalue>category_admin
snmp_communityoptionalSNMP community of a node. This will be set in OpenNMS, if exportSnmpConfig is set to true (since version 0.14)-
snmp_versionoptionalSNMP version of a node. This will be set in OpenNMS, if exportSnmpConfig is set to true. Currently the exporter supports only v1/v2c (since version 0.14)-

Examples

example of export task configuration:

<task name="opennms-example">
              <sources>
                      <source objecttype="router" status="A" fieldname="monitoring" fieldvalue="true" />
                      <source objecttype="switch" status="A" />
              </sources>
              <destination class="ExternalSystemOpennms">
                      <parameter key="resturl" value="http://127.0.0.1:8980/opennms/rest" />
                      <parameter key="restuser" value="admin" />
                      <parameter key="restpassword" value="admin" />
                      <parameter key="requisition" value="yourcmdb" />
                      <parameter key="services" value="ICMP" />
              </destination>
              <variables>
                      <variable name="nodelabel">
                              <value objecttype="router" fieldname="hostname" />
                              <value objecttype="switch" fieldname="management-ip" />
                      </variable>
                      <variable name="ip" default-value="0.0.0.0">
                              <value objecttype="router" fieldname="management-ip" />
                              <value objecttype="switch" fieldname="management-ip" />
                      </variable>
                      <variable name="asset_city">
                              <value objecttype="router" fieldname="manufacturer" />
                              <value objecttype="switch" fieldname="management-ip" />
                      </variable>
                      <variable name="category_admin">
                              <value objecttype="router" fieldname="Name" />
                              <value objecttype="switch" fieldname="Name" />
                      </variable>
                      <variable name="category_1">
                              <value objecttype="router" fieldname="manufacturer" />
                              <value objecttype="switch" fieldname="manufacturer" />
                      </variable>
              </variables>
</task>

minimal configuration example:

<task name="opennms-example">
              <sources>
                      <source objecttype="router" status="A" fieldname="monitoring" fieldvalue="true" />
                      <source objecttype="switch" status="A" />
              </sources>
              <destination class="ExternalSystemOpennms">
                      <parameter key="resturl" value="http://127.0.0.1:8980/opennms/rest" />
                      <parameter key="restuser" value="admin" />
                      <parameter key="restpassword" value="admin" />
                      <parameter key="requisition" value="yourcmdb" />
              </destination>
              <variables>
                      <variable name="nodelabel">
                              <value objecttype="router" fieldname="hostname" />
                              <value objecttype="switch" fieldname="management-ip" />
                      </variable>
                      <variable name="ip" default-value="0.0.0.0">
                              <value objecttype="router" fieldname="management-ip" />
                              <value objecttype="switch" fieldname="management-ip" />
                      </variable>
              </variables>
</task>
api/export/externalsystemopennms.txt · Last modified: 2018/11/22 16:35 by michael