Cannot use snmp_check with snmp v3

Pietan, James J (DOA) james.pietan at alaska.gov
Tue Jul 7 17:35:43 CEST 2015


EGADS dude! … Never give out your password !!!!!

If you have any questions, please contact me.

James Pietan
System Programmer I
Messaging and Directory Services
SOA DOA ETS
(907) 465-5769

IMPORTAN WARNING: This message is intended for the use of the person or entity to which it is addressed and may contain
information that is confidential.  If you are not the intended recipient, the employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any disclosure, copying, forwarding or distribution of any information in this message is STRICTLY
PROHIBITED.  If you have received this message by error, please notify the sender and immediately delete all copies from your computer
system to prevent further disclosure.

From: Help [mailto:help-bounces+james.pietan=alaska.gov at monitoring-plugins.org] On Behalf Of pablo muñoz
Sent: Tuesday, July 7, 2015 7:34 AM
To: Monitoring Plugins Users
Subject: Re: Cannot use snmp_check with snmp v3

It is the actual password? I thought it was an example

Atte.

Pablo A. Muñoz Rojas
Reseller Nagios & Nagios Community Manager<http://www.nagios.org/communitynetwork>
P: +56-32-3140734 | C: +56-9-85499668
w: www.e-visus.cl<http://www.e-visus.cl/> – www.nagios-cl.org<http://www.nagios-cl.org/> | d: Ecuador 85, Viña del Mar, Chile
Nagios 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:31 GMT-03:00 Andreas Ericsson <ae at op5.se<mailto:ae at op5.se>>:
On 2015-07-07 16:17, José Pedro Brito Röseler wrote:
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

This happens because the shell translates the hash in your password to
the end of the command and the start of a comment. You need to use
either single or double quotes around both your passwords in order for
the shell to see them as a single argument.
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

So type in v3p4ssword#1 as 'v3p4ssword#1' with the quotes, and do the
same for 'v3p4ssword#2' and it should work.

--
Andreas Ericsson                   andreas.ericsson at op5.se<mailto:andreas.ericsson at op5.se>
OP5 AB                             www.op5.se<http://www.op5.se>
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20150707/055d45e5/attachment-0001.html>


More information about the Help mailing list