Integrating OCS information into monitoring with OpenNMS

Automatic Transfer

Interaction Between the Components

Besides the two applications, OpenNMS and OCS, you also need a Provisioning Integration Server (PRIS). The easily extensible server extracts the OCS data model and converts the data into the OpenNMS node data model. On one side, the data is parsed via the OCS SOAP interface, and on the other side, they are provided in XML format via HTTP to provisiond in OpenNMS. In the transformation process, certain rules and conditions can be evaluated and applied. The default behavior is already defined on the PRIS; it relates to the network interface and inventory information. To implement the process as shown in Figure 1, you need to create three user-defined attributes in OCS that can be evaluated by the PRIS.

Figure 2 shows which attributes are used to manage monitoring in OpenNMS. The OCS attributes have the following meanings:

Figure 2: Converting an OCS computer to an OpenNMS requisition.
  • Monitored : Specifies whether the system is relevant for monitoring.
  • Environment : Specifies the environment in which the system is located.
  • Purpose : Specifies the tasks the server performs.

For each purpose, an OpenNMS data source (requisition) is created. It specifies which specific service detectors are needed for web, mail, and database servers. OpenNMS also maps the environment via surveillance categories. These later allow the assignment of different notification paths for the network operations center or the development team.

Enabling SOAP

When you install OCS, two steps are necessary: The first step is to activate the SOAP web service; in the second step, you define the custom attributes. To activate the SOAP web service, you need to edit the Perl environment variable in /etc/httpd/conf.d/z-ocsinventory-server.conf as follows:


The web service interface is configured for basic authentication against a user file. To generate the user file, run the command:

htpasswd -c /etc/httpd/APACHE_AUTH_USER_FILE SOAP_USER

In the next step, the custom attributes for the OCS computers are created.

Creating Custom Attributes

The description is based on Figure 3. The attributes are created in the main menu under Administrative data  (1). To do this, check the computers box  (2). Then, use the New data tab  (3) to add the fields with the appropriate data types. The results should be similar to those shown in Figure  3(4).

Figure 3: Creating the attributes to control the OpenNMS import.
Figure 4: You can set the default values for custom attributes.

To provide selection options for the generated fields, you need to open the detailed view of a previously inventoried computer. You can now edit the attributes as shown in Figure  4. Pressing the plus symbol  (1) opens the dialog for adding an attribute. Then, select New data  (2) and create the environments: Development , Stage , and Production . You should create the attributes for the environments as shown in the table (3). For each additional new server, you can use these three selection fields to define how they are handled in OpenNMS monitoring.

This completes the changes in OCS, and you can move on to configure PRIS and OpenNMS itself.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs

Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>


		<div class=