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 »

do the permissions look correct?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check_HP plugin installation and use

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
szkoda
Posts: 42
Joined: Thu Dec 04, 2014 8:48 am

Re: Check_HP plugin installation and use

Post by szkoda »

All I get is:

"bash: /usr/local/nagios/libexec/check_hp: Permission Denied"
szkoda
Posts: 42
Joined: Thu Dec 04, 2014 8:48 am

Re: Check_HP plugin installation and use

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_HP plugin installation and use

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

Re: Check_HP plugin installation and use

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check_HP plugin installation and use

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
szkoda
Posts: 42
Joined: Thu Dec 04, 2014 8:48 am

Re: Check_HP plugin installation and use

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_HP plugin installation and use

Post by tmcdonald »

Can you attach a copy of the plugin here for us to review?
Former Nagios employee
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Check_HP plugin installation and use

Post 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
/Luke
Locked