[Nagios-users] Cisco Monitoring Problem - Interface Down state not recognize

Jim Avery jim at jimavery.me.uk
Wed Dec 15 13:06:10 UTC 2010

On 14 December 2010 15:01, Matias Damian <matlnx1983 at gmail.com> wrote:
> Hi, i have a problem when i want to monitoring a Cisco device (Switch 2960).
> Qhen i configured Nagios, never show the CRITICAL state, when the port /
> interface is down, because always receibe a message for SNMP, that it´s Ok.
> Doing a research, i see this. When i use the terminal of Linux Server the
> command with the string that use Nagios "hardcoded" vía snmp the devide send
> me this message, and nagios don´t know how understand this.
> root at NAGIOS:# /usr/local/nagios/libexec/check_snmp -C COMUNIDAD -o
> ifOperStatus.10001 -r 1 -m RFC1213-MIB -H IP_HOST
> If the interface it´s Ok:
> SNMP OK - 1 | RFC1213-MIB::ifOperStatus.10001=1
> But if the interface is down:
> SNMP OK - 2 | RFC1213-MIB::ifOperStatus.10002=2
> So, i understand the 1 is "Ok" and the 2 id "down", how evener, nagios
> understand "ok" in both cases.
> Thanks in advance for the help, and sorry for my english.
> Matias (matlnx)

You need to specify the warning and critical ranges when you run the
check_snmp plugin.

For example, I guess the following might do what you want:

/usr/local/nagios/libexec/check_snmp -C COMUNIDAD -o
ifOperStatus.10001 -r 1 -m RFC1213-MIB -H IP_HOST -c 0:1

I don't have Cisco equipment here though so I can't test it for sure.

See: http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT
for information on how to specify the warning and critical threshold
ranges.  The syntax is a bit weird, but quite powerful, allowing you
to be very specific about what ranges of values you will alert on.

For monitoring a specific interface, you might find the check_snmp_int
plugin more useful. You will find it at http://nagios.manubulon.com/

Whenever you run a plugin from the command line, be careful to run it
as the same user which runs the Nagios daemon (usually the user
'nagios').  If you forget this then you will sometimes have problems
with permissions when Nagios runs the plugin, and sometimes you will
find the plugin creates a temporary file which then can't be written
to (or overwritten) when you come to run the plugin under Nagios.  I
don't think this is too much of a problem with check_snmp, but it can
be a real problem with check_snmp_int and various other plugins.



More information about the Nagios-users mailing list