Page 1 of 1

check-netapp-ng.pl "Can't create SNMP session to.."

Posted: Mon Aug 22, 2016 10:11 am
by bvzm71
hi all

when I run the command from command line, I have no problem:

./check-netapp-ng.pl -H XXX.XXX.XXX.XXX -C XXXXXX -V 2c -T CPULOAD
OK: CPULOAD 33% | cpuload=33%;500;500;;


When I use same command inside Nagios , I receive the error:
"Can't create SNMP session to.."

I defined the command like this:
define command {
command_name check_netapp_cpuload
command_line $USER1$/check-netapp-ng.pl -H $HOSTADDRESS$ -V c2 -C XXXXXX -T CPULOAD
}

Any idea ?

Regards

Re: check-netapp-ng.pl "Can't create SNMP session to.."

Posted: Mon Aug 22, 2016 10:58 am
by rkennedy
When you are executing it over the CLI, are you using the root user, or the nagios user? If the root user, please try to execute it as nagios and show us the full input / output.

At a quick glance, I'd guess permissions somewhere.

Re: check-netapp-ng.pl "Can't create SNMP session to.."

Posted: Tue Aug 23, 2016 2:35 am
by bvzm71
I have found the problem.
Was the snmp version .. I wrote 2c instead of c2

Re: check-netapp-ng.pl "Can't create SNMP session to.."

Posted: Tue Aug 23, 2016 11:41 am
by mcapra
Awesome! Was that able to get the plugin working for you? Is it alright if we close this thread and mark the issue as resolved, or did you have additional issues?

Re: check-netapp-ng.pl "Can't create SNMP session to.."

Posted: Wed Aug 24, 2016 10:05 am
by bvzm71
you can cloesed as solved.