Node Details (nodedetails.cgi) October 7, 2010

Issue

I often want to review important aspects of nodes in OpenNMS including: SNMP status, monitored services, IP addresses, group membership, data links, and critical path settings. The OpenNMS interface does not provide an easy way to quickly review these items in bulk. Some of this information can be viewed on the OpenNMS node page but a list view would be more useful when looking for configuration errors.

Solution

The nodedetails.cgi script reports on the items listed above on a single web page. It can be quickly scanned for errors or used for as a guide during a systematic review of nodes. Links to various parts of the OpenNMS interface are provided for a deeper look and quick editing.

Synopsis

http://your-server/nodedetails.cgi

Description

The cgi script produces a sorted table of nodes details including: node label, SNMP Attributes, SNMP Datum Count (number of SNMP datums updated by OpenNMS in the last 7 days), number of surveillance categories the node is in and which categories, IP Addresses, Data Links, and Critical Path setting.

Notes:

  1. SNMP information must be edited on the node itself. OpenNMS will update the data in its database during the next scan.
  2. The categories count is useful for instances where all nodes should be in a certain number of categories. The count can be quickly scanned to look for errors.
  3. The Monitored Services column does not indicate which services are on which IP addresses or which services have been discovered but are not monitored. Click on the node label to view the node page which contains this information.
  4. The IP Address for SNMP collection is determined by OpenNMS and can not be edited.
  5. Data Links will only be populated if you have enabled Linkd in OpenNMS.

Implementation

Prerequisites

  1. Setting up Scripts
  2. Setting up Custom Web Pages and Single Sign On

Install

Download the nodedetails file and copy it to $NOCBASE/view-bin/nodedetails.cgi. This script is installed in the view-bin because it is also used in view based reports which will be posted later. Make sure to enable the execute bit with chmod as shown below. Then create a link $NOCBASE/http/nodedetails.cgi which points to $NOCBASE/view-bin/nodedetails.cgi.

/bin/bash
source /etc/noc.conf
cd $NOCBASE/view-bin/
wget http://opennms.dougbakewell.ca/downloads/view-bin/nodedetails
mv nodedetails nodedetails.cgi
chmod a+x nodedetails.cgi
cd $NOCBASE/http/
ln -s ../view-bin/nodedetails.cgi nodedetails.cgi

If you like, a link can be put on your monitoring web site home page:

<a href="/nodedetails.cgi">Node Details</a>

Example

Apologies for the layout below. The report looks better when it’s not being mangled by a WordPress template. Try it for yourself.

OpenNMS Node Details for All

Node Label

SNMP Attributes: name | location | contact | description | last 7 days datum count

Surveillance Category Memberships

Count | Categories

Monitored Services IP Addresses

(bold=used for SNMP)

Data Links /
Critical Path
1

Router1

edit

SNMP Info: | | | |
0 (warning! No snmp data from last 7 days.)

3

edit

S-Production
M-Networking
T-Router
HTTP
ICMP
StrafePing
192.168.1.101 Data Links
Switch1

Critical Path

3

Switch1

edit

SNMP Info: | | | |
0 (warning! No snmp data from last 7 days.)

4

edit

S-Production
M-Networking
T-Switch
P-IntSelect
HTTP
ICMP
StrafePing
192.168.1.150 Data Links
Router1
XetServer1

Critical Path
192.168.1.1
(Router1)

4

Xet-Server

edit

SNMP Info: Xet-Server | HQ Doug Bakewell | Linux Server2 2.6.18-194.11.3.el5 #1 SMP Sun Aug 29 16:23:24 EDT 2010 i686 | 87

3

edit

S-Production
M-Server
T-Server
HTTP
HTTPS
ICMP
OpenNMS-JVM
SNMP
SSH
StrafePing
10.0.2.14
10.0.2.15
10.0.2.16
10.0.2.17
Data Links
Switch1

Critical Path
192.168.1.1
(Router1)

Sun Oct 3 10:25:45 PDT 2010

Share and Enjoy:
  • Print
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Slashdot
  • StumbleUpon
  • Twitter
Leave a Reply