new check_ plugin for Linux ethernet interfaces
Alan McKay
alan.mckay at gmail.com
Tue Nov 25 16:26:17 CET 2008
Hey folks,
I looked at a number the existing plugins and didn't like them for
various reasons - mostly because they seem to require SNMP. So I
wrote my own that uses NRPE instead. I call it check_iflocal
I think this is the right link to it, but maybe not :
http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2826.html;d=1
Here is a quick look at it. Please let me know if you have any
problems with it and I'll do what I can
[root at bcmdhcp148 nagios]# libexec/check_iflocal -h
Usage : check_iflocal ethX [VAR=VAL] [VAR=VAL] [...]
This script checks the 4 values found in the output of ifconfig
RX Errors, TX Errors, RX dropped, TX dropped
It assumes that if the interface is functioning properly,
these values will be 0. Rather than flag absolute values
the script flags delta values from one invocation to the next
It is also smart enough to reset itself e.g. on reboot
Please read comments at top of script for installation details
Variable names can be mixed-cased. Valid variables :
WARNDELTA=number (default 1)
CRITDELTA=number (default 10)
How big of a delta to flag as warning or critical?
Applies to all of RX Errors, TX Errors, RX Dropped, TX Dropped
So if any one of those 4 exceeds the delta from one invocation
to the next, the appropriate action is taken
NOLINK=[0|1|2|3] (default 1)
How to report when there is no link on this interface?
Nagios return codes - 0=OK,1=WARNING,2=CRITICAL,3=SCRIPT ERROR
but note that you use the numbers, not the strings
This is only used if either ethtool or mii-tool is enabled
RUNETHTOOL=[0|1]
RUNMIITOOL=[0|1]
Only 1 of the above 2 can be enabled otherwise it's an error
These give more info on each interface, but require sudo
See script comments for details
STROK=STRING (see script comments)
STRWARN=STRING (see script comments)
STRCRIT=STRING (see script comments)
STRYIKES=STRING (see script comments)
--
"I destroy my enemies when I make them my friends"
- Abraham Lincoln
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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