Page 2 of 4

Re: HP iLO 2 Monitoring

Posted: Mon Feb 20, 2017 7:02 am
by Nagios_Admin_M
mcapra wrote:Probably, though we don't have such a system to test against unfortunately.

Here's our documents for Nagios XI regarding this topic. The steps for the first 4 pages should still be relevant even though this is a Nagios Core machine:
https://assets.nagios.com/downloads/nag ... ng_SSH.pdf

Yes, the document is relevant for establishing connection between two servers, but I assume HP iLO has it's own Linux distribution or different sshd server.

After I run ssh-copy-id, this error is printed out:
/usr/bin/ssh-copy-id:ERROR: No identities found

I also tried to upload base64 certificate by iLO website but it doesn't accept it?
Can you consider this option as well as a solution for connection with check_by_ssh and getting information back ?

Re: HP iLO 2 Monitoring

Posted: Mon Feb 20, 2017 3:15 pm
by tgriep
On your Core system, did you login as the nagios and run ssh-keygen to generate the public key that the ssh-copy-id is looking for?
If the .pub file isn't setup using the ssh-keygen util, that could cause the error you are having.

Re: HP iLO 2 Monitoring

Posted: Sat Apr 08, 2017 3:15 am
by Nagios_Admin_M
Instead of using check_by_ssh I tried to get check_ilo2_health working, but I have an error like at the end:

My current configuration:

define host{
use template
host_name host
address 192.168.0.1
contact_group admins
_ILO_ADDRESS 192.168.0.2
register 1
}

define service{
use template
host_name host
service_description check_ilo2_health
check_command check_ilo2_health!-c -3
}

Result:

State: CRITICAL
Status Information: ( Service check did not exit properly )

Thanks in advance.

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 10:03 am
by tgriep
Can you post how the check_ilo2_health command is defined in the commands,cfg file?
Can you run the following command and post the output so we can see what the error is?

Code: Select all

/usr/local/nagios/libecex/check_ilo2_health.pl -u <username> -p <password> -H xxx.xxx.xxx.xxx -c -3
Fill in the correct username, password, and IP address for your device and adjust the path if the plugin is installed in a different folder.

When you installed the plugin, did you install the required perl modules?
Take a look at the exchange site for installing the required modules.
https://exchange.nagios.org/directory/P ... th/details

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 11:13 am
by Nagios_Admin_M
define command {
command_name check_ilo2_health
command_line /usr/local/nagios/libecex/check_ilo2_health.pl -u $USER1$ -p $USER2$ -H xxx.xxx.xxx.xxx -c -3
}

After running command in the command line I get:
ILO_HEALTH_OK ... and all of the parameters of the hardware.

Yes, Perl modules are installed.

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 11:41 am
by tgriep
The check_ilo2_health command should be defined like the example below, it that how it is setup?

Code: Select all

command_line $USER1$/check_ilo2_health.pl -u $USER1$ -p $USER2$ -H $HOSTADDRESS$ -c -3
Is the $USER1$ and $USER2$ macros setup in the resource.cfg file and are they correct to login to the device with the check?

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 1:51 pm
by Nagios_Admin_M
Yes, it is as in the example and Macros are set up in the resource.cfg

The output still is:
Service check did not exit properly.

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 2:51 pm
by tgriep
I would have to see the check_ilo2_health.pl script to be sure but the error could be that the Nagios daemon is trying to embed the script and that is causing the error.
Edit the check_ilo2_health.pl script and change the following line from

Code: Select all

# icinga: -epn
to

Code: Select all

# nagios: -epn
Save the changes and see if that fixes the issue.
Also, verify that the plugin is readable and executable by the nagios user account.

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 3:18 pm
by Nagios_Admin_M
I tried these options, but they didn't solve the issue.
Can you write me what permission should be set up? I also have SELinux enabled.

Re: HP iLO 2 Monitoring

Posted: Mon Apr 10, 2017 4:01 pm
by tgriep
Disable selinux for sure, sometimes nagios has issues with that running.
To set the permissions, go to the folder the plugin is installed at and run the following.

Code: Select all

chown nagios.nagios check_ilo2_health.pl
chmod 775 check_ilo2_health.pl
Let us know how it works.