Fix check_hpasm for 3.x kernels

After upgrading one of my HP ProLiant servers to Ubuntu 12.04 LTS (better late than never) the check_hpasm Nagios plugin broke, resulting in no regular checks of the internal arrays being performed.

Apparently that’s a known bug with the hpacucli utility doing the actual checks, which can’t uname returning a 3.x kernel version. You can manually fix this by running it like this:

Usage:
 setarch x86_64 --uname-2.6 [[program] [program arguments]]
Example:
 setarch x86_64 --uname-2.6 hpacucli ctrl all show

Therefore a quick and dirty fix for check_hpasm would be to open up /usr/lib/nagios/plugins/check_hpasm and go to the part that reads:

if [ -x "$hpacucli" ]; then
 for i in config status
 do
$hpacucli ctrl all show $i | while read line
 do
 printf "%s %s\n" $i "$line"
 done
 done
 fi

and replace the line (553 in my case) calling hpacucli with:

/usr/bin/setarch x86_64 --uname-2.6 $hpacucli ctrl all show $i | while read line

Worked just fine for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.