Check_HP plugin installation and use

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.
szkoda
Posts: 42
Joined: Thu Dec 04, 2014 8:48 am

Re: Check_HP plugin installation and use

Post 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.
emislivec
Posts: 52
Joined: Tue Feb 25, 2014 10:06 am

Re: Check_HP plugin installation and use

Post 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
szkoda
Posts: 42
Joined: Thu Dec 04, 2014 8:48 am

Re: Check_HP plugin installation and use

Post 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!
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Check_HP plugin installation and use

Post by lgroschen »

Glad it's working! Please feel free to post with any further problems.

Locked
/Luke
Locked