SNMP Nagios Plugin

timeless time at digg.com
Mon Jan 23 07:30:36 CET 2006


The purpose of this was that since our cluster already has SNMP set up, 
we didn't also want to run NRPE, nor set up passwordless SSH from the 
Nagios machine. I couldn't find an SNMP query tool that took standard 
Unix commands and tried to give sensible output based on that, so I 
wrote my own.

First a generic command to SNMP translator Perl script. You ask it 
something like "df" or "ps" or "loadavg" and it tells you the 
information from SNMP from the host you're interested in.

http://faemalia.org/wiki/view/Technical/SNMPtoUnixCommandMapping

The next is a Nagios plugin that depends on the first. Largely it's the 
exact same syntax in usage, but with a "--threshold" argument to decide 
what is WARNING vs. CRITICAL. Right now the only supported threshold is 
Disk Usage by Partition, but I think if you look at the source, you'll 
find it's pretty easy to add in things like total processes and such.

Homework: Improve the Nagios script to do other alert thresholds. Extra 
credit: combine both scripts into one. Maybe only invoke the Nagios 
functionality if --threshold is passed, otherwise act only as an SNMP 
query/formatting tool. I may do this myself in the coming months.

--
timeless



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list