Comments / Forced Unmanged (commentsforced.cgi) September 24, 2010
Issue
The OpenNMS poller-configuration.xml file controls what services are monitored. Fine grain exceptions to the poller-configuration.xml can be created using the OpenNMS web interface: node admin page -> Manage and Unmanage Interfaces and Services. This allows monitoring of a service or an entire interface to be turned off when the poller-configuration.xml would normally cause it to be monitored. These services and interfaces can be seen on the node page as “Forced Unmanged”.
I recommend that Forced Unmanaged be used sparingly however it’s required in several situations (see note below). The problem is that while the poller-configuration.xml file provides a global view of what will be monitored, there is no way to view all the exceptions (Forced Unmanaged) in one place. Also, when the administrator marks a service or interface with Forced Unmanged, there is no record of why.
See “Turn monitoring on/off at the node level not the service level.” in the post Policies that reduce the workload! for how I recommend using the Forced Unmanaged feature.
Solution
The commentsforced.cgi script displays all Forced Unmanged services and interfaces in one place. If the node asset comment field is used to explain why the Forced Unmanged entries are needed then a complete solution is provided.
Synopsis
http://your-server/commentsforced.cgi
Description
The cgi script produces a sorted table of nodes which have a comment, a forced unmanaged interface/service, or both.
Implementation
Prerequisites
Install
Download the commentsforced file and copy it to $NOCBASE/view-bin/commentsforced.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/commentsforced.cgi which points to $NOCBASE/view-bin/commentsforced.cgi.
/bin/bash source /etc/noc.conf cd $NOCBASE/view-bin/ wget http://opennms.dougbakewell.ca/downloads/view-bin/commentsforced mv commentsforced commentsforced.cgi chmod a+x commentsforced.cgi cd $NOCBASE/http/ ln -s ../view-bin/commentsforced.cgi commentsforced.cgi
If you like, a link can be put on your monitoring web site home page:
<a href="/commentsforced.cgi">Comments/Forced Unmanaged</a>
Example
OpenNMS Comments/Forced Unmanaged for All
LABEL COMMENT FORCED UNMANAGED Switch1 2010-09-18 – Doug – Stopped monitoring 10.0.1.88 interface until failing card can be replaced. This will not be done until the next major maintenance window. The failure has been worked around for now. 10.0.1.88VBRNAS1 2010-09-01 – Doug – HTTP on NAS1 can not be monitored because it returns a 503 error. It can not be shutdown and the error can not be stopped unless the HTTP service is purchased from the vendor. 10.0.2.15 | HTTPSun Sep 19 13:50:23 PDT 2010
Leave a Reply