Cannot use snmp_check with snmp v3

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


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

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:31 GMT-03:00 Andreas Ericsson <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
> OP5 AB                             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/d4e252be/attachment.html>


More information about the Help mailing list