Discussion:
[Nagios-users] snmpwalk works but check_snmp doesn't
Athiqur Rahman
2010-04-28 09:58:18 UTC
Permalink
I am trying to monitor the status of my BGP connections on a cisco box.

I can get the status of the connection via

[***@watcher libexec]#snmpwalk -v2c -c public 172.16.0.1
.1.3.6.1.2.1.15.3.1.2
SNMPv2-SMI::mib-2.15.3.1.2.212.12.10.11 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.234.13.11.109 = INTEGER: 6

you can see i get state established (6) for both peers 212.12.10.11 and
234.13.11.109

But when I execute using the nagios snmp plugin i get the following

[***@watcher libexec]# ./check_snmp -H 172.16.0.1 -P 2c -C public -o
.1.3.6.1.2.1.15.3.1.2
SNMP OK - No Such Instance currently exists at this OID |

What is the best way to go about monitoring the state of the bgp connection?

thanks
Marc Powell
2010-04-28 12:14:12 UTC
Permalink
Post by Athiqur Rahman
I am trying to monitor the status of my BGP connections on a cisco box.
[snip]
Post by Athiqur Rahman
But when I execute using the nagios snmp plugin i get the following
.1.3.6.1.2.1.15.3.1.2
SNMP OK - No Such Instance currently exists at this OID |
check_snmp doesn't do a walk. You must be very specific to the exact OID you want to check. You'll also need to specify failure criteria if you want to get any kind of alert.
Post by Athiqur Rahman
What is the best way to go about monitoring the state of the bgp connection?
I used the following combination --

define command {
command_name check_bgp_peer_state
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.2.1.15.3.1.2.$ARG1$ -s 6 -C $USER3$ -l 'BGP Peer $ARG1$ State'
}

define service{
use generic-service
host_name myhost
service_description iBGP-to-othernet
retry_check_interval 3
contact_groups nateng-oncall-network
check_command check_bgp_peer_state!212.12.10.11
}

--
Marc

Continue reading on narkive:
Loading...