Cannot use snmp_check with snmp v3

pablo muñoz pablomunozrojas at yahoo.com
Tue Jul 7 17:20:23 CEST 2015


hmm yes, it's very likely.

I use the version 2.0.1

[root @ vmnagiosxi ~] # /usr/local/nagios/libexec/check_snmp --version
check_snmp v2.0.1 (nagios-plugins 2.0.1)

try updating nagios-plugins

Atte.

Pablo A. Muñoz RojasReseller Nagios & Nagios Community Manager
<http://www.nagios.org/communitynetwork>P: +56-32-3140734 | C:
+56-9-85499668w: www.e-visus.cl – www.nagios-cl.org | d: Ecuador 85, Viña
del Mar, ChileNagios Certified Administrator and Professional - 3HCL9F
<http://www.nagios.com/verify/>*Nuestras redes:* Linkedin
<https://cl.linkedin.com/in/pablomunozrojas/>- Twitter
<https://twitter.com/Nagios_Chile>- Line  <http://www.e-visus.cl/?p=241>-
skype <http://www.e-visus.cl/?p=241> - facebook
<https://www.facebook.com/evisus4nagios>

2015-07-07 12:08 GMT-03:00 José Pedro Brito Röseler <pedro.roeseler at av.it.pt
>:

> Hi Pablo.
>
>
>
> Thanks for the fast reply.
>
>
>
> Yes, if I change the key I get the same 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
> 1.3.6.1.2.1.1.3.0
>
> External command error: snmpget: Authentication failure (incorrect
> password, community or key)
>
>
>
> Could it be the version of check_snmp that is causing this problem?
>
>
>
> [root at nagios]#  /usr/lib64/nagios/plugins/check_snmp --version
>
> check_snmp v1.4.16 (nagios-plugins 1.4.16)
>
>
>
> regards,
>
> Pedro Röseler
>
>
>
> *From:* Help [mailto:help-bounces+pedro.roeseler=
> av.it.pt at monitoring-plugins.org] *On Behalf Of *pablo muñoz
> *Sent:* 7 de julho de 2015 15:47
> *To:* Monitoring Plugins Users
> *Subject:* Re: Cannot use snmp_check with snmp v3
>
>
>
> Hello.
>
>
>
> He is sure that the keys are well?
>
>
>
> try to translate the MIB DISMAN-EVENT-MIB :: sysUpTimeInstance
>
>
>
> For example:
>
>
>
> /usr/lib64/nagios/plugins/check_snmp -H 192.168.254.2 -o
> .1.3.6.1.2.1.1.3.0 -P 3 -L authPriv -a MD5 -x DES -X v3p4ssword#2 -U
> snmpv3user  -A v3p4ssword#1
>
>
>
>
>
>
> Atte.
>
>
> Pablo A. Muñoz RojasReseller Nagios & Nagios Community Manager
> <http://www.nagios.org/communitynetwork>P: +56-32-3140734 | C:
> +56-9-85499668w: www.e-visus.cl – www.nagios-cl.org | d: Ecuador 85, Viña
> del Mar, ChileNagios Certified Administrator and Professional - 3HCL9F
> <http://www.nagios.com/verify/>*Nuestras redes:* Linkedin
> <https://cl.linkedin.com/in/pablomunozrojas/>- Twitter
> <https://twitter.com/Nagios_Chile>- Line  <http://www.e-visus.cl/?p=241>-
> skype <http://www.e-visus.cl/?p=241> - facebook
> <https://www.facebook.com/evisus4nagios>
>
>
>
> 2015-07-07 11:17 GMT-03:00 José Pedro Brito Röseler <
> pedro.roeseler at av.it.pt>:
>
> 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/a4b9090c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 10341 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20150707/a4b9090c/attachment-0001.png>


More information about the Help mailing list