On 14 December 2010 15:01, Matias Damian <[email protected]> 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. > > r...@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. hth, Jim ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Nagios-users mailing list [email protected] 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
