Example of Monitoring a Server Room on a Basis of OpenNMS and NetPing Devices

  • Published In: Tutorial
  • Created Date: 2018-05-21
  • Hits: 226

OpenNMS is a high-level platform with an open source code that is designed for making decisions for monitoring networks and network devices. By following this guideline, you will get the installation platform ready to work with NetPing server room environmental monitoring units and power distribution units, and you will learn to:

  • configure monitoring NetPing units using the features of a described system;
  • configure gathering readings of sensors;
  • create graphic reports

By following this article, you will configure an OpenNMS monitoring system that is ready to operate. A solution is designed for network administrators, system administrators, technical support employees upper than level 1, and other people, whose job is connected to monitoring and servicing of networks and services. The system allows tracking availability, change in a response time, failures of different elements of a network infrastructure, which, in turn, allows to warn and act accordingly to decrease the risks of operability failures on networks and services in the network, as well as the expensive server equipment. In addition, using the system, it is possible to analyze the network infrastructure if there are narrow spaces and the most probable failure points.

NetPing OpenNMS Preview Main

NetPing OpenNMS Preview Graph

To organize monitoring of a server room on the basis of OpenNMS and NetPing devices, we will need:

  1. UniPing server solution v4/SMS server room monitoring unit (the same solution is suitable for UniPing server solution v3NetPing 8/PWR-220 v4/SMSNetPing 4/PWR-220 v4/SMS) - 1 pc.;
  2. Temperature 1-wire - 1 pc.;
    Humidity sensor 1-wire -1 pc.;
    Door sensor - 1 pc.;
    Supply voltage sensor - 1 pc.;
    Liquid sensor - 1 pc.;
  3. A PC or a server with the installed OS Windows/Linux and the OpenNMS installation ready to operate (installation manual) - 1 pc.

Configuring UniPing server solution v4/SMS and Connecting Sensors

To start operation, you will need to perform a basic configuration of the equipment:

UniPing server solution v3SMS basic configuration

  1. Switch to the section of a device setup;
  2. Perform a basic configuration of a network interface;
  3. Execute a basic configuration of access elements (login and password to a Web interface, community reads and writes, IP access filter) when necessary. 

Connecting sensors

To connect a 1-Wire sensor, you need to know its unique number. Therefore, 1-Wire temperature and humidity sensors are connected.

It is possible to consult the official documentation for the information on connecting and customizing data. 

1-wire temperature sensors

UniPing server solution v3SMS IO line

1-wire humidity sensor

UniPing server solution v3SMS humidity sensor

Sensors of supply voltage, leak, and open door, are connected to IO lines. These sensors are the sensors of dry contact type. The configuration is described well in the documentation.

UniPing server solution v3SMS temperature sensor

Configuring OpenNMS

Web-interface

Web-interface of the platform after the installation is available on the link http://<ip>:8980/opennms/, default login data are admin/admin.

OpenNMS authorization page

If there is a need to change the port for the own one, edit the values of the port in the file /etc/opennms/opennms.properties:

org.opennms.netmgt.jetty.port = 8908
opennms.rtc-client.http-post.base-url = http://localhost:8908/opennms/rtc/post
opennms.map-client.http-post.url = http://localhost:8908/opennms/map/post

Importing MIB and other configuration files

Now, import MIB for UniPing server solution v4/SMS, so that OpenNMS can recognize the data that we will gather. Download the file with the extension .mib from the page of the monitoring device on the official website. Then, go to "Admin" → "Configure OpenNMS" → "SNMP MIB Compiler":

OpenNMS configuration

OpenNMS all configurations

"Upload MIB" (choose a MIB file that was downloaded before) → "Compile MIB":

OpenNMS importing MIB

Afterwards, our MIB is in the category "Compiled". Now, there is a need to create Data Collection for him. To do this, in the common list of MIB files, locate ours and right-click it to open a context menu. Select "Generate Data Collection" in this menu.

OpenNMS collection and events for NetPing

Change a name Data Collection Group Name to "netping", and save the changes.

OpenNMS data collection for NetPing

Confirm the suggestion to create graph templates with a default configuration.

OpenNMS generating NetPing graph templates

Then, select "Create events" the same as in the context menu of a downloaded MIB file.

OpenNMS generating events for NetPing

Bring the line to the next view "uei.opennms.org/traps/netping", click "Continue", and save - "Save Events File".

OpenNMS saving the events for NetPing

Now, download two configuration files that we adjusted and rewrote a little for more correct displaying of graphs and names of variable sensors:

  1. netping.properties
  2. netping.xml

Put the file netping.xml to /etc/opennms/datacollection/, replacing the old one. Briefly, in this file, OID for NetPing are described, and they are also grouped depending on sensors, and the names of sensors are also taken from this file when forming a report.

Put the file netping.properties в /etc/opennms/snmp-graph.properties.d/, the same replacing the old one, if there is one. A configuration of reports-graphs is described in the file. Here, we added for you threshold values of temperature and humidity on their graphs, and added displaying a memo of a sensor that can be set in a web interface of a UniPing server solution v4/SMS server room environmental monitoring unit to the names of graphs. In addition, there are no more graphs "sensor names", that are built by OpenNMS on default.

Delete a file /etc/opennms/snmp-graph.properties.d/DKSF-71-6-X-X-1-graph.properties if it is presented, otherwise graphs will be duplicated in reports. 

Adding UniPing server solution v4/SMS to OpenNMS

To do this, follow the path represented below in a web interface of the monitoring system OpenNMS: 

"Admin" → "Configure OpenNMS" → "Manage Provisioning Requisitions" → "Add Requisition". Write a group name that unites our device with possible next ones. We will get something similar to the picture below.

OpenNMS NetPing synchronization and storing a requisition

Click the button with arrows (a synchronization with a database, saving/applying changes), and switch to adding a host directly.

"Admin" → "Quick-Add Node":

OpenNMS Quick-Add Node

There is a need to configure only basic attributes, where:

Requisition - is a group that has been created by us before. When clicking the space button in our field, we will see a drop-down list.

IP Address - is a node IP address.

Node Label - is a displayed node name.

OpenNMS basic node attributes NetPing

Then, there is a need to configure parameters of connecting to SNMP.

"Admin" → "Configure OpenNMS" → "Configure SNMP Community Names by IP Address". Write an IP Address of our node, and click "look up".

OpenNMS NetPing configuring snmp

Version - is v1 (SNMP version).

First IP Address - is 192.168.0.100 

Last IP Address - it is possible to set parameters for ranges, but we have only one address, therefore, we leave this field empty.

Port - SNMP agent port (on default) 161.

OpenNMS NetPing configuring SNMP

Then, go to Read/Write Community String, by default for UniPing server solution v4/SMS it is SWITCH/SWITCH. If these parameters are changed on a device, the changes must be represented here as well.

OpenNMS NetPing configuring snmp community

Testing the correctness of adding and viewing graphs

Restart OpenNMS using a command in a server console:

opennms@user:~#opennms restart

Go to "Info" → "Nodes" → "UniPing server solution v4/SMS":

OpenNMS NetPing node interface

Pay attention to the section "SNMP Attributes", its availability means that OpenNMS has read the data from NetPing successfully.

Then, go to "Resource Graphs".

OpenNMS NetPing graphs

There, we see a full list of all data that we can retrieve as graphs. Let's examine viewing graphs on the example of a humidity sensor. Check the checkbox of a sensor that is meaningful for us (in the example, the one with the index 1 and memo "Server room"), and click "Graph Selection" ("Graph All" - for displaying all possible graphs for this node).

OpenNMS NetPing selecting a graph

See a humidity graph for the last hour and two graphs: red (an upper threshold of a normal humidity range) and blue (a lower threshold of a normal humidity range).

OpenNMS NetPing humidity graph

Also, this sensor is a twin sensor, because the same sensor measures temperature, therefore, a little below, we see a temperature graph with upper and lower thresholds of a normal temperature range, correspondingly.

OpenNMS NetPing temperature graph

Displaying sensors and creating reports

In OpenNMS, there is a tool "KSC Reports".

OpenNMS selective reports for a NetPing node

It allows creating reports with graphs and combine graphs.

For example, to retrieve a report on temperature and a response time from UniPing server solution v4/SMS:

1. Click "Create New":

OpenNMS creating a selective report on NetPing

2. Write a name or our report and click "Add New Graph":

OpenNMS adding a graph in a report for NetPing

3. Select our host and click "View Child Resource":

OpenNMS selecting a data source for a graph in a report for NetPing

4. Select the indicator that is meaningful for us, and click "Choose Resource":

OpenNMS selecting a data source for a graph in a report on NetPing

5. Write a heading of a graph, set a time interval, select a data source (if sensors are twin sensors or sensors with several data sources), select a serial number of a sensor (on default, graphs will be displayed according to the order at which they were added, and the numbers will be specified correspondingly), and save changes.

OpenNMS completion of adding a graph in a report on NetPing

To add other graphs, click "Add New Graph" and perform sections 3 through 5 for each of them. Indicate a name of a report and click "Save Report" on the page of editing a report.

OpenNMS saving a report on NetPing

As a result, depending on the chosen graph, you will get the nearly the following:

Click "Save Report" to save everything we added.

Fort the following view, go to "Reports" → "KSC Reports". In the section "Reports", select a created report and click "View".

OpenNMS saving a report on NetPing

OpenNMS ready report on NetPing

OpenNMS ready report on NetPing

Configuring WorldMap and Dashboard in OpenNMS

WorldMap

To add a node to a map, there is a need to specify address or coordinates. We can specify these parameters while editing the node in the category "Assets":

"Admin" → "Configure OpenNMS" → "Provisioning Requisitions" → "Server_Room" → "UniPing server solution v4/SMS":

OpenNMS adding coordinates of a NetPing node to represent it on a map

 I recommend adding using coordinates because not all addresses are converted correctly.

OpenNMS adding coordinates of a NetPing node for representing it on a map

In the end, the section "Assets" is supposed to look as shown below:

OpenNMS NetPing coordinates for representing it on a map

Save the changes, go back and synchronize, so that the changes took the effect.

OpenNMS saving in a NetPing node

And, on the main page, we see a map with our node!

OpenNMS and NetPing worldmap

Dashboard

Now, configure "Dashboard" for convenient display and monitoring of our node and readings of sensors. To do this, go to "Admin" → "Configure OpenNMS" → "Manage Surveillance Categories". Write a category name, and add.

OpenNMS creating an observation category for NetPing

Now, go to "Admin" → "Configure OpenNMS" → "Provisioning Requisitions", to add our node to a created category. Open the tab "Categories", click "Add Category", and select our category from a drop-down list. Save, return to "Requisition", and synchronize the changes with a base.

OpenNMS adding NetPing to an observation category

OpenNMS saving the changes in a NetPing node

Now, configure a Dashboard structure for more convenient display of the information. To do this, go to "Admin" → "Configure OpenNMS" → "Surveillance Views Configuration". Enter a display editor.

OpenNMS editing dashboard for NetPing

Excess display elements may be deleted. 

OpenNMS editing dashboard for NetPing

Add a new element in the field on the left

OpenNMS editing dashboard for NetPing

Fill in a name and choose a category, to which it will be linked. Save.

OpenNMS editing dashboard for NetPing

Now, edit the remaining element in the field on the right:

OpenNMS editing dashboard for NetPing

After going to "Dashboards" → "Dashboard", we will see the Dashboard itself. Developers planned it as a central monitoring panel.

OpenNMS Dashboard with a NetPing device

In the upper part, we can see notifications about certain services being unavailable.

OpenNMS Dashboard with a NetPing device

In the lower part, we see a panel with a choice of graphs.

OpenNMS a panel for selecting a graph in Dashboard for NetPing

In the field 1, we can choose a node (we have only one node for now).

In the field 2, we cab choose the element of gathering data (sensor).

In the field 3, we can choose the data that are meaningful to us, ourselves (a temperature value is chosen on the screenshot above).

Also, it is possible to choose a user with rights for reports and Dashboard only, if necessary.

Conclusion

The system totally corresponds to modern requirements, and covers the majority of requests for it. A process of configuration (especially when done for the first time) can easily burn out a lot of nerve cells. Documentation covers almost all basic aspects of the system, however, there is an unpleasant peculiarity that needs noting: many articles contain the information for previous versions. Regardless its complexity, it is possible to connect own events, traps, and modules in it, after understanding it. If the equipment can transfer any data on the network, it can be monitored. Storing data in RRD allows flexible configuration of graphs, and the depth of data archive. External systems can receive data from OpenNMS using ReST or directly from the base.


comments powered by Disqus