Page 3 of 3

Re: Check_HP plugin installation and use

Posted: Wed Dec 17, 2014 4:45 am
by szkoda
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.

Re: Check_HP plugin installation and use

Posted: Wed Dec 17, 2014 10:56 am
by emislivec
szkoda 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?
Did you edit /usr/local/nagios/libexec/check_hp to change the line

Code: Select all

use lib "/usr/lib/nagios/plugins";
back to

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
Then try running the script again.

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

Posted: Thu Dec 18, 2014 4:24 am
by szkoda
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!

Re: Check_HP plugin installation and use

Posted: Thu Dec 18, 2014 10:02 am
by lgroschen
Glad it's working! Please feel free to post with any further problems.

Locked