Environmental

check_ilo2_health

Description:

Check hardware health of HP Proliant Servers by querying the iLO2/3/4/5 Management Controller.

Current Version

1.66

Last Release Date

2021-04-21

Compatible With

License

GPL


Project Files
Project Notes
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) Add a Review
Install on XI
by tonyclemmey, August 31, 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`



Proliant Gen10 MegaRaid ?
by adhafera, November 30, 2022

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)



ilo3 doesn't work
by marcototal, February 28, 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/#



Doesn't work on CentOS 8
by B0ris, January 31, 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 ?



HTTP/1.1 501 Not Implemented
by jroberson, October 31, 2021

To resolve the HTTP/1.1 501 Not Implemented error, be sure to use the -3 option on the check command.



Great plugin but not on GitHub?
by riahc3, September 30, 2021

Hello This is a great plugin but is there a reason why it isnt on GitHub? Would make it easier to contribute code....



Ignore Fan
by paulc33, 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?



works - ubuntu20.04
by trommelfeuer, June 30, 2021

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'



What´s wrong?
by pvaky21, 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. -----



Unknown status while checking drives
by accepter, May 31, 2020

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?



Exclude an Battery-Status from an Check-Output
by maze-m, May 31, 2019

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.



1.63
by rstevens, December 31, 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 ) {



ILO3 v1.88 not works
by sandmannmi, August 31, 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.



ILO 3 configuration
by juangranados, February 28, 2018

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



SSL Error
by Tsintaris, September 30, 2017

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



Timeout issue on iLO4
by unexus, March 31, 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.



iLO2 on HP ProLiant DL380 G6
by Pitone_Maledetto, November 30, 2016

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



TLS error
by migibtsnet, November 30, 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+



Patch to use Monitoring::Plugin
by jpro, April 30, 2016

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(



Service definition for multiple IP
by tj@onemarketing, February 29, 2016

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?



ILO4 Firmware Version 7.3 not working
by marcel.oliveira, January 31, 2016

It's a very good tool, working very well with ilo 2/3/4, but when I try to use with newest ilo4 version it's not working and i got the message: CHECK_ILO2_HEALTH.PL UNKNOWN - plugin timed out (timeout 15s) but for all ILO 2/3 and 4 firm version below 7 it's working properly. COuld you please help me to solve it?



Option -g is failing
by offlinehoster, September 30, 2015

./check_ilo2_health.pl -u username -p password -n -H 10.0.1.2 -t 60 -g This failing with the error: ILO2_HEALTH UNKNOWN - ERROR: Syntax error: Line #0: syntax error near "" in the line: "". But withour -g i get: ILO2_HEALTH OK - (Board-Version: ILO2)



Problem with 380 G6 iLO2 v.2.27 and OpenSSL
by pappapo, August 31, 2015

Throws ERROR: Failed to establish SSL connection just as the ones below. This is on FreeBSD 10-STABLE with OpenSSL 1.0.1p and IO-Socket-SSL-2.016. Setup worked OK on previous versions and so far have not figured out how to patch - not very good at Perl... Works great on a lot of other combos of DL360/380 G5/6/7/8!



force TLSv1 - Handshake Problem with Debian 8 / openssl 1.x
by thyphus, July 31, 2015

there is a problem with Debian 8 or rather openssl 1.x to fix the problem you have to replace following: new(PeerAddr => $host, SSL_verify_mode => SSL_VERIFY_NONE, $sslv3 ? 'SSLv3' ) : () ); --- > $client = new IO::Socket::SSL->new(PeerAddr => $host, SSL_verify_mode => SSL_VERIFY_NONE, SSL_version => $sslv3 ? > 'SSLv3' : 'TLSv1' );



All drives: Spun Down
by norcon, July 31, 2015

Hi, i get the following error: ILO2_HEALTH CRITICAL - Drive Bay 1: Spun Down, Drive Bay 2: Spun Down, Drive Bay 3: Spun Down, Drive Bay 4: Spun Down, Drive Bay 5: Spun Down, Drive Bay 6: Spun Down, Drive Bay 7: Spun Down, Drive Bay 8: Spun Down With this command:$USER1$/check_ilo2_health.pl -H $ARG3$ -u $ARG1$ -p $ARG2$ -c -o -d -n -t 60 Is this an unsupported Server for "-c: check drive bays"? ProLiant DL380 G6



SSL_VERIFY_NONE strict subs - line 384
by rvieira, June 30, 2015

First of all, thanks for this plugin! :) I'm getting this error: ./check_ilo2_health.pl -H [iLO] -u [USER] -p [PASSWORD] Bareword "SSL_VERIFY_NONE" not allowed while "strict subs" in use at ./check_ilo2_health.pl line 384. How can i solve this?



Great plugin - some problem since HP ILO4 firmware update
by 4eversr, February 28, 2015

Hello from Germany. We use this plugin for some years now and it is great. Current Version 1.56 is installed on our nagios system. But at the moment we ran in a little problem since we installed the latest ILO 4 2.03 firmware HP submitted in january 2015. - Now nagios/the plugin shows a "Power_Supply Inlet Temperature Warning" on some ILO4 servers although the ILO4 itself is happy with all temperatures. ILO2_HEALTH WARNING - (Board-Version: ILO=3) Power_Supply_2: Inlet Temperature Warning Any ideas on that ?



good plugin
by alaselva, January 31, 2015

It does what it says. Thanks



ERROR: No parseable output
by basante, October 31, 2014

./check_ilo2_health.pl -H x.x.x.x -u user -p password and i get: ILO2_HEALTH UNKNOWN - ERROR: No parseable output.



needed a fix after ubuntu upgrade
by tanelv, October 31, 2014

needed to add SSL_version => 'TLSv1' to connect command to make it work after ubuntu upgrade. if i did not do that, i got SSL error $client = new IO::Socket::SSL->new(PeerAddr => $host, SSL_verify_mode => SSL_VERIFY_NONE, SSL_version => 'TLSv1') or die "error=$!, ssl_error=$SSL_ERROR";



Where can I get the newest version?
by Hodgson, November 30, 2013

Seems like the link posted for the updated version of this plugin is dead. Is there an alternative location to download from?



Fix for ILO4
by trevrobwhite, October 31, 2013

Good plugin, we had problems with it working on ILO4 for two reasons, one the ILO can take a while to return the results, fix this by specifying -t 120 (but make sure your timeout for nagios is long enough in the nagios.cfg). The second issue is that the ILO4 often returns N/A in its temperatures, you can fix this as, by not trying to set the perdata if the value contains N/A follows: Line 439: if ( defined($cautiontemp) && defined($criticaltemp) && ($cautiontemp !~ m"^n/a$"i)) { if ($criticaltemp =~ m"^n/a$"i) { $p->set_thresholds( warning => $cautiontemp, ); } else { $p->set_thresholds( warning => $cautiontemp, critical => $criticaltemp, ); }



iLO4 problem
by Ripprapp, October 31, 2013

Hi, I am trying this script (version 1.58) with an iLO4 (sw=1.30) DL360p Gen8. I only get temperature values in return. If I add the -n option it looks like: ./check_ilo2_health.pl -u USER -p PWD -3 -n -H 10.10.10.10 -t 60 ILO4_HEALTH OK - (Board-Version: ILO>=3) Running it in verbose mode (-v) it looks like it can get info about fans, cpu etc. But it is not displayed. Can this line in the verbose output be a hint what is missing? Scripting utility should be updated to the latest version. HAve anyone else had the same problem? Any idea what might be wrong?



ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with ...
by Cyril, September 30, 2013

Very excellent. For me, with ilo2 and latest firmware, i have aa error : ILO2_HEALTH UNKNOWN - ERROR: Failed to establish SSL connection with ***** Changed : $client = new IO::Socket::SSL->new(PeerAddr => $host); to: $client = new IO::Socket::SSL->new(PeerAddr => $host,SSL_verify_mode => SSL_VERIFY_NONE); After, check is fully ok.



Need help with ILO4
by meirickc, March 31, 2013

I would love to make this work on our iLO4 servers, has anyone been able to get it working? I downloaded the latest version via the review by: "Link to Version 1.55 / ILO4 bypeetsche, March 8, 2013" but when I run the command I only end up with [CHECK_ILO2_HEALTH UNKNOWN - plugin timed out (timeout 15s)]. I followed the instructions to install it and already had the 3 modules installed and can reach the management interface via https. I get the same output whether I try it on the commandline as root or via Nagios interface as nagios user. Any response would be helpful.



Link to Version 1.55 / ILO4
by peetsche, March 31, 2013

Works for me for years! Here you can find the newest version: https://www.monitoringexchange.org/attachment/download/Check-Plugins/Hardware/Server-%2528Manufacturer%2529/HP-%2528Compaq%2529/check_ilo2_health/12-08-5_08-33-56_check_ilo2_health.pl



Works on iLO2
by burns498, January 31, 2013

This plugin is great. The source plugin is well documented, installation dependencies well documented, works out of the box in nagios. I am fairly new to nagios and was able to figure this out. I could get nitpicky and ask for more features but 5/5 since it does exactly what it says it does. Some notes. The nagios box we are using is *nix based and I was able to find all the dependencies via yum. yum install perl-IO-Socket-SSL.noarch yum install perl-XML-Simple.noarch yum install perl-Nagios-Plugin.noarch The only small hiccups I had were in configuring nagios. I needed to setup the host.cfg hostaddress as the hostname as opposed to the IP address for some reason. Also, our particular iLO2 password has odd characters that confuse the shell so I needed to add quotation marks around the password in the nagios config. Just some tips that were difficult for me to figure out since I am new to this. Plugin is great.



Works good with iLO3 - But iLO4?
by Kajmaj, November 30, 2012

Works great with iLO3 but cannot make it work on iLO4 - Assistance appreciated



Awesome
by Napsty, September 30, 2012

Keep up the good work. Working very well with ILO3 (with -3 parameter).



Put up the latest version
by Xaneth, April 30, 2012

I really like this script, but this listing needs to be updated to the latest version. I'm currently using 1.52 from the page: https://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Server-%2528Manufacturer%2529/HP-%2528Compaq%2529/check_ilo2_health Which is now working properly on my iLO2. It would be nice to see all the switch options as well, such as -o for checking power, -a for checking fans and -c for checking drives.



ILO version 3
by stuarts24@hotmail.com, March 31, 2012

Works great with HP's ILO version 2. Anyone know how to make it work with ILO version 3 firmware?



Thanks Its work like a charm
by teguh, December 31, 2011

This plugin is great. Anyway I have question after read the code. There is commented warning "do not override previous return value from overall health", what's the effect if I try to override the value? I want to override ambient temperature warning and critical values to lower value, since one day I found that the air conditioner in my server room didn't work and the temperature hit about 30 C (some reference said ideally it should be about 20). Is it OK to ask question here? thanks In advance



Works.
by steffan, December 31, 2011

Works great.. i had a little trouble getting all the packages to work that this script needs, but finally got them all and now it runs perfect :) Tho i have some idears that would make this plugin alot better: 1. to support iLO1 (we have a couple of old servere, with iLO-1 cards.) 2. if you have a server with a lot of temperature sensors, the output list from this plugin is HUGE and confusing (i have a server with 25 temperature sensors!) and this plugin just outputs them all as "temp_" would be great with the names description/name there too. 3. we use the "service description" in nagios a lot, and the description from this plugin is confusing and shows a lot more info than needed. a great feature would be to have the plugin monitor only 1 thing, for example the temperatures only. or the HDD's only. that way i would create a server check for each to make out nagios installation clean and easy to understand. 4. maybe an option to choose a specific temperature sensors to check? (e.g "temp_15") 5. a option to only veiw the RAID/disk status. i think all the above is possible the way this plugin is already checking the health of the server, since all that output is in the XML, but some of it gets ignored. But that was just my thoughts on what could make this plugin better :) else this is an awesome plugin, and thanks alot for sharing it!!



Good
by MarininMV, September 30, 2011

Good plugin! Had to patch it to make it work with iLO2 on HL DL360 G6 (iLO2 drive status issue)



Great!
by dermaniac, April 30, 2011

Really nice! Also works with ilo3! For me I had to define /usr/lib/perl before the command line in the commands.cfg



Null
by richarddekker1981, November 30, 2010

What is the reason that he return Null??



Works!
by morten, February 28, 2010

Hi, just tested this plugin against HP BladeCenter iLO, and it works very well. Running nagios 3.0.x on Debian 5.0.x. Had to install some of the perl modules using cpan, but the rest were avaiable in Debian's apt tree.



Thanks!
by plagat0x, August 31, 2009

I used this plugin to check the status on a farm of HP Servers. It worked very well. Too bad the old iLO vers 1 doesnt provide the hardware info. I installed it on a Debian Lenny Nagios Server using the info provided by the author. My special Thanks to the author of this script.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.4 (63)
Favorites
12
Views
221,273