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

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
bvzm71
Posts: 14
Joined: Mon May 12, 2014 9:10 am

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

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
bvzm71
Posts: 14
Joined: Mon May 12, 2014 9:10 am

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

Post by bvzm71 »

I have found the problem.
Was the snmp version .. I wrote 2c instead of c2
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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?
Former Nagios employee
https://www.mcapra.com/
bvzm71
Posts: 14
Joined: Mon May 12, 2014 9:10 am

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

Post by bvzm71 »

you can cloesed as solved.
Locked