SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
_SAmic
Posts: 3
Joined: Sun Sep 07, 2014 9:47 am

SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by _SAmic »

We have several (about 6) Cisco RV220w,RV120W routers configured to use SNMPv3
They mostly seem to work OK.
They are also being monitored with NagiosCore [Nagios® Core™ 4.0.7]

{ here (below) is 'evidence' that SNMPv3 is working OK from Centos}
{Linux nag35-B22 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux}

[root@nag35-B22 libexec]# snmpwalk -v 3 -m ALL -u guest -l NoAuthNoPriv <<RV220W IP address>> SysLocation
SNMPv2-MIB::sysLocation.0 = STRING: HadeCRG
[root@nag35-B22 libexec]#

Note that the snmpwalk properly returns with the SysLocation when queried.

Next however, from the same system, a test of the Nagios "check_snmp" seems to do something odd?

[root@nag35-B22 libexec]# ./check_snmp -H <<RV220W IP address>> -m ALL -P 3 -U guest -L noAuthNoPriv -o sysLocation -v
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 3 [authpriv] <<RV220W IP address>>:161 sysLocation
External command error: No log handling enabled - turning on stderr logging
snmpget: No securityName specified (Sub-id not found: (top) -> sysLocation)
[root@nag35-B22 libexec]#

Note the 'translation' of "... -L noAuthNoPriv..." seems to have yielded "... No securityName specified..." even though clearly we also see "... -U guest ..." in the invocation of check_snmp. Is this a syntax error on my part or possibly something in the check_snmp plugin?

[root@nag35-B22 libexec]# ./check_snmp -V
check_snmp v1.4.16 (nagios-plugins 1.4.16)
[root@nag35-B22 libexec]#

ADVthanksANCE,
michael grimes
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by sreinhardt »

I just took a look at the code prior to realizing what version you were on. N-P 1.4.x had several different issues and plenty with check_snmp. I would highly suggest at least moving to version 1.5 if not the newest 2.0.3. Both should cover you on this particular issue, 2.0.3 absolutely does, as the logic in the code does work correctly. Happy to provide instructions if you would like, but the standard plugins install instructions apply as normal.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
_SAmic
Posts: 3
Joined: Sun Sep 07, 2014 9:47 am

Re: SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by _SAmic »

Thank you for responding.
Will certainly attempt to update the plugins to a newer version.
miC
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by sreinhardt »

Sounds great, let us know if you have more questions!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
_SAmic
Posts: 3
Joined: Sun Sep 07, 2014 9:47 am

Re: SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by _SAmic »

Thank you for your attention to this issue...
Successfully installed v2.0.3 today of Nagios plugins, restarted Nagios and then re-did my check.

[root@nag35-B22 libexec]# snmpwalk -v 3 -m ALL -u guest -l NoAuthNoPriv <<ipADDRESS>> SysLocation
SNMPv2-MIB::sysLocation.0 = STRING: WorcGYM
[root@nag35-B22 libexec]#

[root@nag35-B22 libexec]# ./check_snmp --version
check_snmp v2.0.3 (nagios-plugins 2.0.3)
[root@nag35-B22 libexec]#

[root@nag35-B22 libexec]# ./check_snmp -H <<ipADDRESS>> -m ALL -P 3 -U guest -L noAuthNoPriv -o sysLocation.0 -v
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 3 [authpriv] <<ipADDRESS>>:161 sysLocation.0
SNMPv2-MIB::sysLocation.0 = STRING: WorcGYM
SNMP OK - WorcGYM |
[root@nag35-B22 libexec]#

It appears that your suggestion has worked.
I'll need to do some further testing with these new plugins (other things have apparently broken) but this particular problem was successfully fixed.

miC
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: SNMPv3 & check_snmp w/NoAuthNoPriv fails?

Post by tmcdonald »

Sweet. I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked