Cannot use snmp_check with snmp v3

José Pedro Brito Röseler pedro.roeseler at av.it.pt
Tue Jul 7 16:17:25 CEST 2015


Hello.

 

I’m trying to check the uptime of a Cisco 2960X switch on Nagios with
check_snmp plugin but I always get the following error:

 

[root at nagios]# /usr/lib64/nagios/plugins/check_snmp -P 3 -U snmpv3user -L
authPriv -a MD5 -A v3p4ssword#1 -x DES -X v3p4ssword#2 -H 192.168.254.2 -o
DISMAN-EVENT-MIB::sysUpTimeInstance

External command error: snmpget: Authentication failure (incorrect password,
community or key)

 

I get the same error on the web console:



 

My switches.conf is like this:

 

# HOST DEFINITIONS

#

############################################################################
###

############################################################################
###

 

# Define the switch that we'll be monitoring

 

define host{

        use                     generic-switch,host-pnp

        host_name               cisco_2960x_IT2_Datacenter

        alias                   cisco 2960x 24p IT2 Datacenter

        address                 192.168.254.2

        hostgroups              switches_v3

        notification_interval   60

        icon_image              switch.png

        statusmap_image         switch40.png

        }

 

 

 

############################################################################
###

############################################################################
###

#

# HOST GROUP DEFINITIONS

#

############################################################################
###

############################################################################
###

 

# Create a new hostgroup for switches

 

define hostgroup{

        hostgroup_name  switches                ; The name of the hostgroup

        alias           Network Switches        ; Long name of the group

        }

 

define hostgroup{

        hostgroup_name  switches_v3             ; The name of the hostgroup

        alias           Network Switches with SNMP v3        ; Long name of
the group

        }

 

############################################################################
###

############################################################################
###

#

# SERVICE DEFINITIONS

#

############################################################################
###

############################################################################
###

 

########## Switches with SNMP V3 ###################

 

# Service definition to monitor switch uptime using check_snmp

 

# Monitor uptime via SNMP

 

define service{

use                     generic-service

hostgroup_name          switches_v3

service_description     Uptime

check_command           check_snmp!-P 3 -U snmpv3user -L authPriv -a MD5 -A
v3p4ssword#1 -x DES -X v3p4ssword#2 -o DISMAN-EVENT-MIB::sysUpTimeInstance

}

 

 

 

If I do the same test with snmpget, everything runs fine:

 

[root at nagios]# snmpget -v3 -l authPriv -u snmpv3user -a MD5 -A v3password#1
-x DES -X v3password#2 192.168.254.2 DISMAN-EVENT-MIB::sysUpTimeInstance

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (783093831) 90 days,
15:15:38.31

 

snmpwalk also runs without problems:

 

[root at nagios]# snmpwalk -v3 -l authPriv -u snmpv3user -a MD5 -A v3password#1
-x DES -X v3password#2 192.168.254.8 DISMAN-EVENT-MIB::sysUpTimeInstance

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (783167495) 90 days,
15:27:54.95

 

 

Do you have any idea of what might be happening? I’m using a FAN
installation on Centos.

[root at nagios]# uname -a

Linux nagios 2.6.18-400.1.1.el5 #1 SMP Thu Dec 18 00:59:53 EST 2014 x86_64
x86_64 x86_64 GNU/Linux

 

Thanks in advance for your help!

 

Best regards,

Pedro Röseler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20150707/49ff8d64/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 10341 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20150707/49ff8d64/attachment-0001.png>


More information about the Help mailing list