Hi Andreas. Thanks for the tip. I tried with both double and single quotes but I get the same error... And yes, the passwords I posted here are just examples. :-)
I think I will then proceed with the check_snmp plugin upgrade... I already downloaded the latest version of nagios plugins(nagios-plugins-2.0.3) and copied it to the server. My current plugins are in /usr/lib64/nagios/plugins The thing is that I'm running a Full automated installation of Nagios(FAN) so I'm not sure of how to proceed without breaking something else during the upgrade. Is it safe to do this? tar xzf nagios-plugins-2.0.3 cd nagios-plugins-2.0.3 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install regards, Pedro Röseler -----Original Message----- From: Help [mailto:help-bounces+pedro.roeseler=av.it...@monitoring-plugins.org] On Behalf Of Andreas Ericsson Sent: 7 de julho de 2015 16:31 To: Monitoring Plugins Users Subject: Re: Cannot use snmp_check with snmp v3 On 2015-07-07 16:17, José Pedro Brito Röseler wrote: > Hello. > > > > Im trying to check the uptime of a Cisco 2960X switch on Nagios with > check_snmp plugin but I always get the following error: > > > > [root@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.erics...@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.