Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_ilo2_health

Rating
63 votes
Favoured:
12
Current Version
1.66
Last Release Date
2021-04-21
Owner
License
GPL
Hits
221438
Files:
FileDescription
check_ilo2_health.plcheck_ilo2_health.pl Version 1.64
check_ilo2_health.plcheck_ilo2_health.pl Version 1.65
check_ilo2_health.plcheck_ilo2_health.pl Version 1.66
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check hardware health of HP Proliant Servers by querying the iLO2/3/4/5 Management Controller.
Check hardware health of HP Proliant Servers by querying the
iLO2/3/4/5 Management Controller. No need for snmp or installation of
software.
Checks if all sensors are ok, returns warning on high temperatures and fan failures and critical on overall health failure.
A PERL plugin using Nagios::Plugin, IO::Socket::SSL and XML::Simple.

The plugin makes use of the HP Lights-Out XML scripting interface.
HP provides some PERL scripting samples:
http://h18013.www1.hp.com/support/files/lights-out/us/download/25057.html

Please note that the plugin shows only temperature sensors by default. Faulty hardware components are only listed if iLO returns error state.

Additional options:
-e: plugin ignores "syntax error" messages in the XML output. This may help for older firmwares.
-n: output without temperature listing.
-d: add PerfParse compatible temperature output.
-v: print out the full XML output from the BMC.
-3: support for iLO3|4
-a: check fan redundancy (only some models)
-c: check drive bays (only some models)
-o: check power redundancy (only some models)
-b: temperature output with location
-l: parse iLO eventlog
-b: show temperature with location
-x: ignore battery missing
-i: ignore NIC Link Down status (iLO4).
-g: display additional infos like firmware version and servername (may need increased timeout!)
-f: read input from file instead from iLO, possible to feed -v output to it
--sslopts: Defaults to 'SSL_verify_mode => SSL_VERIFY_NONE'. Use 'SSL_verify_mode => SSL_VERIFY_NONE, SSL_version => "TLSv1"' to avoid TLS Downgrade bug.

Howto:

First test if you can reach the management controller with a web
browser. The plugin only works if the https interface is reachable.

Install the PERL modules Nagios::Plugin, IO::Socket::SSL and
XML::Simple. Copy the plugin to your nagios plugin directory and make sure that the nagios user can execute it.

Put this in your nagios config:

define command {

command_name check_ilo2_health
command_line $USER1$/check_ilo2_health.pl -u $USER10$ -p $USER11$ -H $HOSTADDRESS$

}

Assuming that $USER1$ contains the path to the plugin, $USER10$ the
username and $USER11$ the password for the management controller.

Set up the appropriate services.

Hint: All management controllers have their own host definition in my nagios setup. So every Proliant Server with host_name foo has a management controller with host_name foo-ilo2.


Testing:
1. Dump iLO output with -v by redirecting to a file.
2. Edit the file and change some elements with to another condition.
3. Read the file with -f.

Bug reports:
Please send an email and attach the -v output. You may want to remove addresses and serial numbers from the file.
Reviews (48)
bytonyclemmey, August 23, 2023
Fix for `Can't call method "new" on an undefined value at ./check_ilo2_health.pl line 221` on XI. Replace `Nagios::Plugin` with `Nagios::Monitoring::Plugin`in PERL modules to install and replace all references of `Nagios::Plugin` in `check_ilo2_health.pl` with `Nagios::Monitoring::Plugin`
Unfortunately Smart Array equiped servers are not available now in 2022. We had to use that one with LSI RAID controller, but apparently we have problem monitoring hdd status now(?)

Below is tail of output with -c -v parameters.


Head:
chunk: 0
chunk size: 0
read_chunked_reply: reach end of responses.
No drive_input found at /usr/lib/nagios/plugins/check_ilo2_health.pl line 577.
ILO2_HEALTH OK - (Board-Version: ILO>=3)
bymarcototal, February 8, 2022
For ILO3 i get following error message:

root@ilo1:/home/# ./check_ilo2_health.pl -H 192.168.200.45 -u user -p password -r 3 -3 -U -a -b -c -d -g -i -l -n -o
ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with 192.168.202.45:443 SSL connect attempt failed error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure.
root@ilo1:/home/#

I Try install OpenSSL 1.0.2 from 2017, same error :-(

On the ILO Adminpage I can see the current use cipher: RSA_With3DES_EDE_CBC_SHA

root@ilo1:/home/# openssl version -v
OpenSSL 1.0.2l 25 May 2017
root@ilo1:/home/#

root@ilo1:/home/# /usr/lib/nagios/plugins/check_ilo2_health.pl -H 192.168.202.45 -u user -p password -r 3 -3 -U -a -b -c -d -g -i -l -n -o --sslopts SSL_cipher_list => "rsa-3des-ede-cbc-sha",SSL_verify_mode => SSL_VERIFY_NONE
ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with 192.168.202.45:443 No such file or directory Failed to set SSL cipher list error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match.
root@ilo1:/home/#
byB0ris, January 19, 2022
Running on CentOS 8 with Perl v5.26.3 I get this error:
Can't call method "new" on an undefined value at ./check_ilo2_health.pl line 221

Is this an issue with Perl version not supported by the script ?
To resolve the HTTP/1.1 501 Not Implemented error, be sure to use the -3 option on the check command.
Hello

This is a great plugin but is there a reason why it isnt on GitHub? Would make it easier to contribute code....
bypaulc33, August 31, 2021
Is there anyway to ignore if only some of the fans have issues. As in not go critical, stay ok until 4 out of 6 fans are in error?
It works for me with ubuntu 20.04 Server

For all who stuck in dependency hell, I get it running with this:

apt install libssl-dev
apt install zlib1g-dev
apt install expat
apt install libxml-sax-expat-incremental-perl

# install perl modules:
perl -MCPAN -e 'install IO::Socket::SSL'
perl -MCPAN -e 'install Net::SSLeay'
perl -MCPAN -e 'XML::SAX::Expat'
perl -MCPAN -e 'install XML::Simple'
perl -MCPAN -e 'install Monitoring::Plugin'
bypvaky21, January 31, 2021
Hi,

i am using version 1.64. What´s wrong if i get the following with check_ilo2_health164.pl -H [hostnanme ilo interface] -u [username] -p [password] -v:
-----
hostname is [hostname]
retry: 0
HTTP/1.1 501 Not Implemented

ILO2_HEALTH164 UNKNOWN - ERROR: No parseable output.
-----
Hi. Help me please.

I check ILO2 using this command:
./check_ilo2_health.pl -H -u -p -c

Script returns this error message:
Can't use string ("Smart Error") as a HASH ref while "strict refs" in use at ./check_ilo2_health.pl line 788.

Then I have logined in server's ILO2 and saw one drive have "Smart Error" status.
Can you modify program that it processes this status correctly?
Hi!
We're using the Plugin in Version 1.63 and we got the following message on some ESX-Hosts:

"ILO2_HEALTH CRITICAL - (ProLiant DL380 Gen10 - SystemROM: U30 v2.00 (02/02/2019) - Serial: CZ283301KB - iLO 5 FW 1.40 Feb 05 2019 - Servername: lm009esx.hdag.local) BATTERY Not Installed"

Is there a possibility to Whitelist this Battery-Service?

Thanks for your reply and help.
byrstevens, December 26, 2018
I had my controller disable cache due to a battery failure, which I didn't care about cause my server doesn't store anything important. I just wanted to monitor the disk redundancy status for availability. I had to add two options: [-y] to ignore CACHE_MODULE_STATUS and [-z] to ignore STORAGE STATUS in 'HEALTH_AT_A_GLANCE'.

@@ -189 +189,2 @@
- [ -i|--ignorelinkdown ] [ -x|--ignorebatterymissing ] [ -s|--sslv3 ]
+ [ -i|--ignorelinkdown ] [ -x|--ignorebatterymissing ] [ -y|--ignorecachestatus ]
+ [ -z|--ignorestoragestatus ] [ -s|--sslv3 ]
@@ -277,0 +279,14 @@
+ spec => 'ignorecachestatus|y',
+ help =>
+ qq{-y, --ignorecachestatus
+ Ignore Smart Controller cache status.},
+);
+
+$p->add_arg(
+ spec => 'ignorestoragestatus|z',
+ help =>
+ qq{-z, --ignorestoragestatus
+ Ignore Storage "at a glance" status (still checks disks).},
+);
+
+$p->add_arg(
@@ -374,0 +390,2 @@
+my $ignorecachestatus = defined($p->opts->ignorecachestatus) ? 1 : 0;
+my $ignorestoragestatus = defined($p->opts->ignorestoragestatus) ? 1 : 0;
@@ -609,0 +627,3 @@
+ if ($componentstate eq 'Degraded' && $ignorestoragestatus ) {
+ next
+ }
@@ -747 +767 @@
- if($cachestatus && $cachestatus ne 'OK') {
+ if($cachestatus && $cachestatus ne 'OK' && ! $ignorecachestatus ) {
bysandmannmi, August 27, 2018
Hello
I get check_ilo2_health with HP ILO 3 v. 1.88 not to run.

(./che..-u xx -p xx -H 172.30.10.202 -3)
ILO2_HEALTH2 UNKNOWN - ERROR: Failed to establish SSL connection with 172.30.10.202:443 SSL connect attempt failed error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure.
byjuangranados, February 4, 2018
1 of 1 people found this review helpful
For those with problems with ILO3, you have to specify the SSL cipher. In my case, in order to connect with an ILO 3 v1.89, I had to use:
--sslopts 'SSL_cipher_list => "DES-CBC3-SHA",SSL_verify_mode => SSL_VERIFY_NONE'

You can check available ciphers of ILO using cnark (http://blog.techstacks.com/cryptonark.html):
cnark.pl -h 192.168.2.66 -p 443 --insecure
byTsintaris, September 19, 2017
1 of 1 people found this review helpful
Trying to make it work but I get the error:

ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with XX.XX.XX.XX:443 SSL connect attempt failed because of handshake problems error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure.

Trying to run it from ubuntu 14.04 server using 1.60 version of script, against a ProLiant DL380 G7 server with iLO3 1.87..
Tried all the hints in the comments...
Any help would be appreciated
byunexus, March 14, 2017
REally good plugin that has been working really well for us on all version of iLO ... except one DL380 which is running iLO4

I get the exact same error that is alos reported in January 2016 further don this thread:-

CHECK_ILO2_HEALTH.PL UNKNOWN - plugin timed out (timeout 15s)

Tried various options on the command line but as yet I've been unable to get this to work.
Thank you for the plugin.
It works with different options with most of my servers but one where I get the following:
ILO UNKNOWN - ERROR: Failed to establish SSL connection with 192.168.1.63:443 IO::Socket::IP configuration failed.

Any help is much appreciated.
Thanks
P.S. plugin version 1.60
bymigibtsnet, November 2, 2016
If you get an error like this:
ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with :443 IO::Socket::IP configuration failed.
you have to change the tls value in the source code.
ILO3: change TLSv1 to TLSv11
ILO4: change TLSv1 to TLSv12
Tested with ILO3 v1.87+ and ILO4 v2.4+
byjpro, April 14, 2016
2 of 2 people found this review helpful
This works well, after I patched it to use Monitoring::Plugin instead of Nagios::Plugin (that has now been removed because of a Nagios Enterprise dispute).

For v1.60 replace line 164 with
use Monitoring::Plugin;
and line 177 with
our $p = Monitoring::Plugin->new(
cool plugin, started with a minor "Nagios::Plugin" issue, replaced it with Monitoring::Plugin or Nagios::Monitoring::Plugin

and now it's working when run ./check_ilo2_health.pl -H -u -p

But because I have seperated IP (xxx.xx.xx.xxx), one for server interface and one for ilo interface (xxx.xx.yy.xxx) the check_ilo2_health.pl try to connect the server IP, do I really need to hardcode the ILO IP in the service definition or any surgestion for multiple IP

ex.

define host{
use ...
host_name ...
address xxx.xx.xx.xxx
_ILOADDRESS xxx.xx.yy.xxx
}

How would the service definition look for this?
Page 1 of 3