snmpwalk works but check_snmp doesn't

Marc Powell lists at xodus.org
Wed Apr 28 14:14:12 CEST 2010


On Apr 28, 2010, at 4:58 AM, Athiqur Rahman wrote:

> I am trying to monitor the status of my BGP connections on a cisco box.

[snip]

> But when I execute using the nagios snmp plugin i get the following
> 
> [root at 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 |

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.

> 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
------------------------------------------------------------------------------
_______________________________________________
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