Done that, the output from that command is:
4 -rwxr -xr -x 1 nagios nagios 1913 Nov 27 12:19 /usr/local/nagios/libexec/utils.pm*
If I try to run the plugin it just repeats the same error message I was getting before.
Check_HP plugin installation and use
Re: Check_HP plugin installation and use
Did you edit /usr/local/nagios/libexec/check_hp to change the lineszkoda wrote:This is what I get once I've run the debug command:
"bash: /usr/local/nagios/libexec/check_hp: /usr/lib/nagios/plugins: bad interpreter: Permission denied"
so looks like its referencing the plugin in a different directory?
Code: Select all
use lib "/usr/lib/nagios/plugins";
Code: Select all
use lib "/usr/local/nagios/libexec";
You say you made the change, but it's not working that way. "/usr/lib/nagios/plugins" should not be in that file so something is messed up.
Download the script again.
Put it at /usr/local/nagios/libexec/check_hp
Do not edit the file. The default is good if you have the /usr/local/nagios/libexec/utils.pm file.
Make sure the ownership and permissions are right. What you had before looked good:
Code: Select all
-rwxr-x—x 1 nagios nagios 14795 Dec 4 12:22 /usr/local/nagios/libexec/check_hp
Code: Select all
/usr/local/nagios/libexec/check_hp -H IP_of_HP_server -C public -d
sudo -u nagios /usr/local/nagios/libexec/check_hp -H IP_of_HP_server -C public -d
Re: Check_HP plugin installation and use
It's working!
I redownloaded the file from Nagios Exchange, didn't edit it but placed straight into the Nagios plugins directory (/usr/local/nagios/libexec) then ran the command and it gave me feedback on various bits of hardware. Checked Nagios and it reported various issues on the servers I enabled the plugin on so happy days!
I was clearly doing something very wrong the first time around so apologies and many thanks for all the help!
I redownloaded the file from Nagios Exchange, didn't edit it but placed straight into the Nagios plugins directory (/usr/local/nagios/libexec) then ran the command and it gave me feedback on various bits of hardware. Checked Nagios and it reported various issues on the servers I enabled the plugin on so happy days!
I was clearly doing something very wrong the first time around so apologies and many thanks for all the help!
Re: Check_HP plugin installation and use
Glad it's working! Please feel free to post with any further problems.
Locked
Locked
/Luke