<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
address
        {mso-style-priority:99;
        mso-style-link:"HTML Address Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLAddressChar
        {mso-style-name:"HTML Address Char";
        mso-style-priority:99;
        mso-style-link:"HTML Address";
        font-family:"Times New Roman","serif";
        mso-fareast-language:PT;
        font-style:italic;}
span.im
        {mso-style-name:im;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:PT;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Guys.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I updated the nagios plugins but no luck… same behavior…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Since <b>snmpget</b> works great from the shell, is it possible to use it instead of check_snmp on the switch.conf?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Something like:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>define service{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>use                     generic-service<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>hostgroup_name          switches_v3<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>service_description     Uptime<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>check_command        /usr/bin/snmpget!-v 3 -l authPriv -u snmpv3user -a SHA -A v3password1 -x AES -X v3password2 192.168.254.2 sysUpTime.0<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US'>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If it is possible, do I have to change anything on the commands.cfg?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Pedro Röseler<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Help [mailto:help-bounces+pedro.roeseler=av.it.pt@monitoring-plugins.org] <b>On Behalf Of </b>pablo muñoz<br><b>Sent:</b> 7 de julho de 2015 17:30<br><b>To:</b> Monitoring Plugins Users<br><b>Subject:</b> Re: Cannot use snmp_check with snmp v3<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>a backup of your server is never a bad idea before making changes<o:p></o:p></p></div><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><span style='font-size:9.5pt'>Atte.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt'><o:p> </o:p></span></p></div><div><address><span style='font-size:9.5pt'>Pablo A. Muñoz Rojas<o:p></o:p></span></address><address>Reseller <span style='font-size:9.5pt'>Nagios & <a href="http://www.nagios.org/communitynetwork" target="_blank">Nagios Community Manager</a><o:p></o:p></span></address><address><span style='font-size:9.5pt'>P: +56-32-3140734 | C: +56-9-85499668<o:p></o:p></span></address><address><span style='font-size:9.5pt'>w: <a href="http://www.e-visus.cl/" target="_blank">www.e-visus.cl</a> – <a href="http://www.nagios-cl.org/" target="_blank">www.nagios-cl.org</a> | d: Ecuador 85, Viña del Mar, Chile<o:p></o:p></span></address><address><span lang=EN-US style='font-size:9.5pt'><a href="http://www.nagios.com/verify/" target="_blank">Nagios Certified Administrator and Professional - 3HCL9F</a></span><span style='font-size:9.5pt'><o:p></o:p></span></address><address><b><span style='font-size:9.5pt'>Nuestras redes:</span></b><span style='font-size:9.5pt'> <a href="https://cl.linkedin.com/in/pablomunozrojas/" target="_blank">Linkedin </a>- <a href="https://twitter.com/Nagios_Chile" target="_blank">Twitter </a>- <a href="http://www.e-visus.cl/?p=241" target="_blank">Line </a>- <a href="http://www.e-visus.cl/?p=241" target="_blank">skype</a> - <a href="https://www.facebook.com/evisus4nagios" target="_blank">facebook</a><o:p></o:p></span></address></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>2015-07-07 12:51 GMT-03:00 José Pedro Brito Röseler <<a href="mailto:pedro.roeseler@av.it.pt" target="_blank">pedro.roeseler@av.it.pt</a>>:<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Hi Andreas.<br><br>Thanks for the tip. I tried with both double and single quotes but I get the<br>same error...<br>And yes, the passwords I posted here are just examples. :-)<br><br>I think I will then proceed with the check_snmp plugin upgrade...<br>I already downloaded the latest version of nagios<br>plugins(nagios-plugins-2.0.3) and copied it to the server.<br>My current plugins are in /usr/lib64/nagios/plugins<br><br>The thing is that I'm running a Full automated installation of Nagios(FAN)<br>so I'm not sure of how to proceed without breaking something else during the<br>upgrade.<br><br>Is it safe to do this?<br><br>tar xzf nagios-plugins-2.0.3<br>cd nagios-plugins-2.0.3<br>./configure --with-nagios-user=nagios --with-nagios-group=nagios<br>make<br>make install<br><br><br><br>regards,<br>Pedro Röseler<br><br><span class=im>-----Original Message-----</span><br><span class=im>From: Help</span><br><span class=im>[mailto:<a href="mailto:help-bounces%2Bpedro.roeseler">help-bounces+pedro.roeseler</a>=<a href="mailto:av.it.pt@monitoring-plugins.org">av.it.pt@monitoring-plugins.org</a>] On</span><br><span class=im>Behalf Of Andreas Ericsson</span><br><span class=im>Sent: 7 de julho de 2015 16:31</span><br><span class=im>To: Monitoring Plugins Users</span><br><span class=im>Subject: Re: Cannot use snmp_check with snmp v3</span><o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>On 2015-07-07 16:17, José Pedro Brito Röseler wrote:<br>> Hello.<br>><br>><br>><br>> I’m trying to check the uptime of a Cisco 2960X switch on Nagios with<br>> check_snmp plugin but I always get the following error:<br>><br>><br>><br>> [root@nagios]# /usr/lib64/nagios/plugins/check_snmp -P 3 -U snmpv3user<br>> -L authPriv -a MD5 -A v3p4ssword#1 -x DES -X v3p4ssword#2 -H<br>> 192.168.254.2 -o DISMAN-EVENT-MIB::sysUpTimeInstance<br>><br>> External command error: snmpget: Authentication failure (incorrect<br>> password, community or key)<br>><br>><br>><br>> I get the same error on the web console:<br>><br>><br>><br>><br>><br>> My switches.conf is like this:<br>><br>><br>><br>> # HOST DEFINITIONS<br>><br>> #<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>><br>><br>> # Define the switch that we'll be monitoring<br>><br>><br>><br>> define host{<br>><br>>          use                     generic-switch,host-pnp<br>><br>>          host_name               cisco_2960x_IT2_Datacenter<br>><br>>          alias                   cisco 2960x 24p IT2 Datacenter<br>><br>>          address                 192.168.254.2<br>><br>>          hostgroups              switches_v3<br>><br>>          notification_interval   60<br>><br>>          icon_image              switch.png<br>><br>>          statusmap_image         switch40.png<br>><br>>          }<br>><br>><br>><br>><br>><br>><br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> #<br>><br>> # HOST GROUP DEFINITIONS<br>><br>> #<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>><br>><br>> # Create a new hostgroup for switches<br>><br>><br>><br>> define hostgroup{<br>><br>>          hostgroup_name  switches                ; The name of the<br>hostgroup<br>><br>>          alias           Network Switches        ; Long name of the group<br>><br>>          }<br>><br>><br>><br>> define hostgroup{<br>><br>>          hostgroup_name  switches_v3             ; The name of the<br>hostgroup<br>><br>>          alias           Network Switches with SNMP v3        ; Long name<br>of<br>> the group<br>><br>>          }<br>><br>><br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> #<br>><br>> # SERVICE DEFINITIONS<br>><br>> #<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>> ######################################################################<br>> ######<br>> ###<br>><br>><br>><br>> ########## Switches with SNMP V3 ###################<br>><br>><br>><br>> # Service definition to monitor switch uptime using check_snmp<br>><br>><br>><br>> # Monitor uptime via SNMP<br>><br>><br>><br>> define service{<br>><br>> use                     generic-service<br>><br>> hostgroup_name          switches_v3<br>><br>> service_description     Uptime<br>><br><br>This happens because the shell translates the hash in your password to the<br>end of the command and the start of a comment. You need to use either single<br>or double quotes around both your passwords in order for the shell to see<br>them as a single argument.<br><br>> check_command           check_snmp!-P 3 -U snmpv3user -L authPriv -a MD5<br>-A<br>> v3p4ssword#1 -x DES -X v3p4ssword#2 -o<br>> DISMAN-EVENT-MIB::sysUpTimeInstance<br>><br><br>So type in v3p4ssword#1 as 'v3p4ssword#1' with the quotes, and do the same<br>for 'v3p4ssword#2' and it should work.<br><br>--<br>Andreas Ericsson                   <a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>OP5 AB                             <a href="http://www.op5.se" target="_blank">www.op5.se</a><br>Tel: +46 8-230225                  Fax: +46 8-230231<br><br>Considering the successes of the wars on alcohol, poverty, drugs and terror,<br>I think we should give some serious thought to declaring war on peace.<o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>