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.
jdalrymple
Skynet Drone
Posts: 2620 Joined: Wed Feb 11, 2015 1:56 pm
Post
by jdalrymple » Fri May 22, 2015 9:12 am
Code: Select all
chmod +x /usr/local/nagios/libexec/check_netapp_ng.pl
That should fix'er
nathanplatt
Posts: 267 Joined: Thu May 07, 2015 4:59 am
Post
by nathanplatt » Fri May 22, 2015 9:34 am
pi@raspberrypi ~ $ sudo chmod +x /usr/local/nagios/libexex/check_netapp_ng.pl
chmod: cannot access `/usr/local/nagios/libexex/check_netapp_ng.pl': No such file or directory
pi@raspberrypi ~ $ sudo chmod +x /usr/local/nagios/libexex/check-netapp-ng.pl
chmod: cannot access `/usr/local/nagios/libexex/check-netapp-ng.pl': No such file or directory
pi@raspberrypi ~ $
This is all i get when i try that...
Nathan
jdalrymple
Skynet Drone
Posts: 2620 Joined: Wed Feb 11, 2015 1:56 pm
Post
by jdalrymple » Fri May 22, 2015 9:45 am
Sorry, I gave you the "standard" path, your plugins are in a non-standard location. That's not a problem at all, it just causes my hasty response to be wrong. Try this instead:
Code: Select all
chmod +x /usr/lib/nagios/plugins/check-netapp-ng.pl
nathanplatt
Posts: 267 Joined: Thu May 07, 2015 4:59 am
Post
by nathanplatt » Fri May 22, 2015 10:23 am
Okay, but i'm still getting this from Nagios
CPU Load
This service has 1 comment associated with it This service problem has been acknowledged
UNKNOWN 2015-05-22 16:18:53 1d 9h 13m 48s 4/4 **ePN /usr/lib/nagios/plugins/check-netapp-ng.pl: "Use of uninitialized value $fileRuntime in chomp at (eval 1) line 435,".
jdalrymple
Skynet Drone
Posts: 2620 Joined: Wed Feb 11, 2015 1:56 pm
Post
by jdalrymple » Fri May 22, 2015 1:27 pm
It might behoove you to next run the check_command from the command line logged in as the nagios user.
exit
Code: Select all
[root@localhost libexec]# ./check_netapp.pl -H 192.168.145.11 -T CPULOAD -C public -w 80 -c 90
OK: CPULOAD 2% | cpuload=2%
[root@jrd-cent65-1 libexec]# su nagios
[nagios@localhost libexec]$ ./check_netapp.pl -H 192.168.145.11 -T CPULOAD -C public -w 80 -c 90
OK: CPULOAD 2% | cpuload=2%
nathanplatt
Posts: 267 Joined: Thu May 07, 2015 4:59 am
Post
by nathanplatt » Tue May 26, 2015 3:04 am
Sorry that didn't make a lot of sense to me, can you try again?
jdalrymple
Skynet Drone
Posts: 2620 Joined: Wed Feb 11, 2015 1:56 pm
Post
by jdalrymple » Tue May 26, 2015 9:06 am
indicates I'm logged in as root
jdalrymple wrote: Code: Select all
./check_netapp.pl -H 192.168.145.11 -T CPULOAD -C public -w 80 -c 90
I run the command
it worked
jdalrymple wrote: Code: Select all
[root@jrd-cent65-1 libexec]# su nagios
I'm changing to the nagios user
jdalrymple wrote: Code: Select all
[nagios@localhost libexec]$ ./check_netapp.pl -H 192.168.145.11 -T CPULOAD -C public -w 80 -c 90
running the command as user nagios
it worked.
You need to perform the same steps to make sure that running the code as user nagios works for you.
nathanplatt
Posts: 267 Joined: Thu May 07, 2015 4:59 am
Post
by nathanplatt » Tue May 26, 2015 9:31 am
This is what happens when I try to do that, notice I used the check_netapp the way my .pl is named and our variant;
root@raspberrypi:/home/pi# ./check-netapp-ng.pl -H 192.168.1.170-T CPULOAD -C public -w 80 -c 90
bash: ./check-netapp-ng.pl: No such file or directory
root@raspberrypi:/home/pi# ./check_netapp.pl -H 192.168.1.170 -T CPULOAD -C public -w 80 -c 90
bash: ./check_netapp.pl: No such file or directory
root@raspberrypi:/home/pi#
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Tue May 26, 2015 9:43 am
Are you in the right directory? You're in your home directory and the plugin should be in /usr/lib/nagios/plugins/
Former Nagios employee
nathanplatt
Posts: 267 Joined: Thu May 07, 2015 4:59 am
Post
by nathanplatt » Tue May 26, 2015 9:56 am
root@raspberrypi:/usr/lib/nagios/plugins# ./check-netapp-ng.pl -H 192.168.1.170 -T CPULOAD -C public -w 80 -c 90
Alarm clock
root@raspberrypi:/usr/lib/nagios/plugins# ./check_netapp.pl -H 192.168.1.170 -T CPULOAD -C public -w 80 -c 90
bash: ./check_netapp.pl: No such file or directory
root@raspberrypi:/usr/lib/nagios/plugins#
In the correct directory now, but all i get is Alarm Clock as the output!