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.
To organize monitoring of a server room on the basis of OpenNMS and NetPing devices, we will need:
- UniPing server solution v4/SMS server room monitoring unit (the same solution is suitable for UniPing server solution v3, NetPing 8/PWR-220 v4/SMS, NetPing 4/PWR-220 v4/SMS) - 1 pc.;
- Temperature 1-wire - 1 pc.;
Humidity sensor 1-wire -1 pc.;
Door sensor - 1 pc.;
Supply voltage sensor - 1 pc.;
Liquid sensor - 1 pc.;
- 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:
- Switch to the section of a device setup;
- Perform a basic configuration of a network interface;
- Execute a basic configuration of access elements (login and password to a Web interface, community reads and writes, IP access filter) when necessary.
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.
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.
Web-interface of the platform after the installation is available on the link http://<ip>:8980/opennms/, default login data are admin/admin.
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:
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":
"Upload MIB" (choose a MIB file that was downloaded before) → "Compile 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.
Change a name Data Collection Group Name to "netping", and save the changes.
Confirm the suggestion to create graph templates with a default configuration.
Then, select "Create events" the same as in the context menu of a downloaded MIB file.
Bring the line to the next view "uei.opennms.org/traps/netping", click "Continue", and save - "Save Events File".
Now, download two configuration files that we adjusted and rewrote a little for more correct displaying of graphs and names of variable sensors:
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.
Click the button with arrows (a synchronization with a database, saving/applying changes), and switch to adding a host directly.
"Admin" → "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.
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".
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.
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.
Testing the correctness of adding and viewing graphs
Restart OpenNMS using a command in a server console:
Go to "Info" → "Nodes" → "UniPing server solution v4/SMS":
Pay attention to the section "SNMP Attributes", its availability means that OpenNMS has read the data from NetPing successfully.
Then, go to "Resource 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).
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).
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.
Displaying sensors and creating reports
In OpenNMS, there is a tool "KSC Reports".
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":
2. Write a name or our report and click "Add New Graph":
3. Select our host and click "View Child Resource":
4. Select the indicator that is meaningful for us, and click "Choose Resource":
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.
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.
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".
Configuring WorldMap and Dashboard in OpenNMS
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":
I recommend adding using coordinates because not all addresses are converted correctly.
In the end, the section "Assets" is supposed to look as shown below:
Save the changes, go back and synchronize, so that the changes took the effect.
And, on the main page, we see a map with our node!
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.
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.
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.
Excess display elements may be deleted.
Add a new element in the field on the left
Fill in a name and choose a category, to which it will be linked. Save.
Now, edit the remaining element in the field on the right:
After going to "Dashboards" → "Dashboard", we will see the Dashboard itself. Developers planned it as a central monitoring panel.
In the upper part, we can see notifications about certain services being unavailable.
In the lower part, we see a panel with a choice of graphs.
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.
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.