I have a basic nagios setup from following the quickstart guide. I have it successfully querying information via snmp from some dell and cisco switches. The problem i am having is that i have it monitoring different ports to test for up and down states. On the Dell an up port returns a 1 while a down port returns a 2. Nagios classifies both as ok status.
I would like to know how to set proper thresholds for these devices. Also what i learn here will most likely give me more information as to how snmp works.
OS: CentOS 5.6
Linux xxx.net 2.6.18-238.el5 #1 SMP Thu Jan 13 16:24:47 EST 2011 i686 i686 i386 GNU/Linux
Nagios Version: 3.3.1
Nagios Plugins: 1.4.15
net-snmp.i386 1:126.96.36.199-14.el5_7.1 installed
net-snmp-libs.i386 1:188.8.131.52-14.el5_7.1 installed
net-snmp-utils.i386 1:184.108.40.206-14.el5_7.1 installed
Here is the service definition which is based on the quick config
use generic-service ; Inherit values from a template
service_description Port 5 Link Status
check_command check_snmp!-C xxxxxx -o ifOperStatus.5 -r 1 -m RFC1213-MIB
If i run the check from command line here is some sample output
# ./check_snmp -H xx.xx.xx.xx -C xxxx -o ifOperStatus.5 -r 1 -m RFC1213-MIB
SNMP OK - 2 | RFC1213-MIB::ifOperStatus.5=2
I figured out that 2 means the port is down.
Again, It is working... i just need to know how to set proper thresholds for this.
This is a double post so if one gets answered i can close the other with a reference to this.