Page 2 of 3

Re: Check_HP plugin installation and use

Posted: Wed Dec 10, 2014 7:20 am
by szkoda
do the permissions look correct?

Re: Check_HP plugin installation and use

Posted: Wed Dec 10, 2014 7:13 pm
by Box293
Lets go back to basics. Before we even start talking about Nagios configurations lets ensure the plugin runs from the command line.

On your Nagios box:

Code: Select all

su nagios
/usr/local/nagios/libexec/check_hp -H IP_of_HP_server -C public
Where public is the SNMP community name on your HP server.

What output do you get?

Re: Check_HP plugin installation and use

Posted: Fri Dec 12, 2014 5:31 am
by szkoda
All I get is:

"bash: /usr/local/nagios/libexec/check_hp: Permission Denied"

Re: Check_HP plugin installation and use

Posted: Fri Dec 12, 2014 7:20 am
by szkoda
I tried with several different hosts just in case it was the SNMP permissions on the remote server but it made no difference.

I CAN use the built in "check_SNMP" function in Nagios which works ok with the remote windows server I'm trying to use "check_HP" with so I'm assuming I've configured SNMP correctly on the remote server.

Re: Check_HP plugin installation and use

Posted: Fri Dec 12, 2014 3:47 pm
by tmcdonald
Something is not adding up here.

When you say you can use the check_SNMP function, do you mean you can run the check_snmp plugin from the command line as the nagios user? Are the permissions the same on that plugin?

Re: Check_HP plugin installation and use

Posted: Sun Dec 14, 2014 1:35 pm
by szkoda
Yes and yes.

It's completely baffled me as well. Just to clarify how I installed the plugin:

1. downloaded the .tar archive from Nagios exchange on a windows PC.

2. transferred the archive over to the nagios server.

3. placed the check_hp file into the nagios plugins directory.

thats it. Is there any steps i've missed here?

P.S. I used a windows PC to download the archive because I didn't know how to with Linux.

Re: Check_HP plugin installation and use

Posted: Sun Dec 14, 2014 6:09 pm
by Box293
Can you try this command:

Code: Select all

su nagios
/usr/local/nagios/libexec/check_hp -H IP_of_HP_server -C public -d
the -d is a debug mode which should show us some more information.

Re: Check_HP plugin installation and use

Posted: Mon Dec 15, 2014 9:40 am
by szkoda
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?

Re: Check_HP plugin installation and use

Posted: Mon Dec 15, 2014 2:23 pm
by tmcdonald
Can you attach a copy of the plugin here for us to review?

Re: Check_HP plugin installation and use

Posted: Mon Dec 15, 2014 2:28 pm
by lgroschen
From the first page you were asked to make this change:

Code: Select all

use lib "/usr/lib/nagios/plugins";
Change that to the following (which is default):

Code: Select all

use lib "/usr/local/nagios/libexec";
Then run this on your command line:

Code: Select all

ll -s /usr/local/nagios/libexec/utils.pm
this should be nagios:nagios for user:group