article Process Count Monitoring with Net-SNMP

Processes metrics are not available by default via Net-SNMP; therefore the Net-SNMP collection method in up.time does not gather process metrics.  With a few extra lines added to snmpd.conf and a SNMP Poller monitor, it is possible to set up process count monitoring and alerting for Net-SNMP elements.  I'll give the steps first and the logic follows later in the article.

Steps
- edit snmpd.conf on the Net-SNMP target system and add the following line (multiple similar "proc" lines can be specified as well)
proc java 3 1

- restart the Net-SNMP service for the change to be read in 

- in up.time, create an SNMP Poller monitor
-- click Add OID, enter .1.3.6.1.4.1.2021.2.1.5 and click Next
-- click the Use Table Column radio button, select prNames from the drop down and click Add
-- set WARN and CRIT threshold:
WARN is greater than 1
CRIT is less than 1
-- enter desired alerting intervals and click Finish

This SNMP Poller will pull back the number of occurrences of the processes specified with the proc directive in snmpd.conf.  If the occurrence is greater than one, a warning alert will be sent and if it is less than one, a critical alert will be sent.

How it Works
The MIB being leveraged for this SNMP query is UCD-SNMP-MIB, which is usually a regular part of a Net-SNMP install, and the table of interest is the prTable.  For a full description of each of the OIDs in the prTable, see http://net-snmp.sourceforge.net/docs/mibs/ucdavis.html#prTable.  

The OID specified when configuring the SNMP Poller monitor is UCD-SNMP-MIB::prCount (.1.3.6.1.4.1.2021.2.5).  For each of the processes specified in snmpd.conf using the "proc" directive, UCD-SNMP-MIB::prCount.x will contain the number of occurrences of that process.

Two values are required, along with the process name, when adding the proc directive to snmpd.conf.  These are max and min values for the number of occurrences of the process.  If these values are exceeded, UCD-SNMP-MIB::prErrorFlag will be set to 1 (otherwise it is zero).  It is better to allow the SNMP Poller monitor to do the threshold comparison though because the alert messaging will be more clear and the metric can be retained for graphing purposes, if desired.

Related Articles


Process Count Check error: explorer not found

RatingViews
article

On Windows systems the "explorer" process will not exist if there are no users logged on to the system. If this is the case, we recommend using the "winlogon" process as it is always running on the...

By: uptime Support | Date Created: 12-31-1969 | Last Modified: 8-10-2011 | Index: 290

  2689

Ensuring an Application is Always Running

RatingViews
article

up.time's Process Count Check monitor can help you ensure an application is always running

By: uptime Support | Date Created: 10-30-2007 | Last Modified: 6-27-2011 | Index: 223

  12595

up.time 7 SNMP Monitoring Quick Start Guide

RatingViews
article

up.time 7 SNMP Monitoring Quick Start Guide This KB article provides a quick introduction to setting up your SNMP Network Devices in up.time 7 as well as how to resolve common set up issues....

By: uptime Support | Date Created: 7-12-2012 | Last Modified: 10-27-2012 | Index: 578

  5523

Can an SNMP device be added as a Net-SNMP agent?

RatingViews
article

up.time's net-SNMP agent type is intended for server platforms. Most network devices (switches, routers, firewalls, etc...) do not have the full set of required MIB information and should be added...

By: uptime Support | Date Created: 6-12-2010 | Last Modified: 9-13-2012 | Index: 449

  3719

Net-SNMP Metrics

RatingViews
article

This article outline the metrics that up.time collects from a server that is running Net-SNMP.

By: uptime Support | Date Created: 1-26-2007 | Last Modified: 6-30-2011 | Index: 131

  10363

User Comments



No comments have been posted.

Copyright © 2021 IDERA, Inc.   Legal   Privacy Statement