|
|

04-05-2008, 00:33
|
|
Junior Member
|
|
Join Date: Jul 2007
Location: Switzerland
Posts: 20
|
|
HP SMART Array Controller Monitoring
To monitor HP SMART arrays, I use the hpacucli utility in version 8.x together with a small perl script and a little shell script running in a cronjob. Here is my recipe for redhat based distros (e.g. CentOS 4 / 5):
1) download and install hpacucli rpm from hp homepage (must be version >8.0)
2) create a simple script /etc/zabbix/bin/custom.smartstate and chmod 700 (see below)
3) create a fifo in /root:
cd /root
mkfifo raidstatepipe
4) create a file /etc/cron.hourly/smartstate.cron and chmod 700 (see below)
5) execute /etc/cron.hourly/smartstate.cron and tail /var/log/messages to verify the result
Now your system logs the state of each logical and physical drive to the syslog hourly (for later analysis) and logs the return code to zabbix simultaneously. I have used the key "custom.raidstate" which indicates 0=ok, >0=error.
I hope this is useful for someone else, too.
Regards
--Marcel
/etc/zabbix/bin/custom.smartstate:
#----------------------------------
#!/usr/bin/perl
#
# process output of the command
# /opt/compaq/hpacucli/bld/hpacucli controller all show config
# and generate zabbix events
#
use strict;
use warnings;
my $zabbixserver = $ARGV[0];
my $hostname = $ARGV[1];
my $zabbix_sender = "/usr/sbin/zabbix_sender";
my $term = -1;
while (<STDIN>) {
my $line = $_;
if ($line =~ m/icaldrive/) {
if ($term<1) {
if ($line =~ m/, OK[\)\,]/) {
$term=0;
} else {
$term=1;
};
};
};
};
if ($term >= 0) {
my $cmd = $zabbix_sender." -z ".$zabbixserver." -s ".$hostname." -k custom.raidstate -o ".$term;
my $return = `$cmd`;
};
exit 0;
#-------------------------------
/etc/cron.hourly/smartstate.cron:
(remove the backslashes, put everything except the #!/bin/bash on one line)
(replace zabbix.host.lan by your zabbix server's DNS name or IP address)
(replace zabbix_hostname by the name of your host within ZABBIX)
#-------------------------------
#!/bin/bash
/opt/compaq/hpacucli/bld/hpacucli controller all show config | \
/bin/fgrep icaldrive | /usr/bin/tee /root/raidstatepipe | \
/usr/bin/logger -t raidstate & \
/etc/zabbix/bin/custom.smartstate zabbix.host.lan zabbix_hostname < /root/raidstatepipe
Last edited by milprog; 04-05-2008 at 00:38.
|

03-07-2008, 20:56
|
|
Member
|
|
Join Date: Jan 2008
Posts: 41
|
|
I just use SNMP with my HP boxes and the HP template from the wiki. Works great. Monitors all hardware including drive, smart array, power supplies, memory temp., ram, etc.. Also have an overall system status, so if anything else goes bad that it doesn't specifically monitor, it'll change the overall system status and alert me.
|

05-07-2008, 22:45
|
|
Junior Member
|
|
Join Date: Jul 2007
Location: Switzerland
Posts: 20
|
|
...thanks for the idea. My suggestion was meant for these cases where one needs to check the SMART controller alone, e.g. when running in a cheap box that does not support HP insight management (we often use the ML110G5, which is available in a configuration with dual core XEON, SMART BBWC SAS/SATA controller at about 400 euros here).
|

18-07-2008, 10:23
|
|
Senior Member
|
|
Join Date: Aug 2007
Location: London
Posts: 143
|
|
Quote:
Originally Posted by OneLoveAmaru
I just use SNMP with my HP boxes and the HP template from the wiki. Works great. Monitors all hardware including drive, smart array, power supplies, memory temp., ram, etc.. Also have an overall system status, so if anything else goes bad that it doesn't specifically monitor, it'll change the overall system status and alert me.
|
What exactly are you querying with SNMP though? Or is this a windows only thing?
|

18-07-2008, 15:12
|
|
Member
|
|
Join Date: Jan 2008
Posts: 41
|
|
We only have Linux(Debian) on our HP boxes. I use HP's monitoring tools, they make deb and rpm packages. I query the SNMP on the HP boxes with Zabbix of course! The 3 windows boxes we have are on Dell servers. I use SNMP with them too... with Dell OMSA and Windows SNMP. Works great!
Oh and I monitor the status of Hard Drives, Drive Enclosures, Ram, CPU, Heat, etc. with HP's SNMP. Just grab the template from the wiki for the HP's and check it out. That's what I use.
Last edited by OneLoveAmaru; 18-07-2008 at 15:14.
|

18-07-2008, 15:32
|
|
Senior Member
|
|
Join Date: Aug 2007
Location: London
Posts: 143
|
|
Quote:
Originally Posted by OneLoveAmaru
We only have Linux(Debian) on our HP boxes. I use HP's monitoring tools, they make deb and rpm packages. I query the SNMP on the HP boxes with Zabbix of course! The 3 windows boxes we have are on Dell servers. I use SNMP with them too... with Dell OMSA and Windows SNMP. Works great!
Oh and I monitor the status of Hard Drives, Drive Enclosures, Ram, CPU, Heat, etc. with HP's SNMP. Just grab the template from the wiki for the HP's and check it out. That's what I use.
|
We run Ubuntu, what/where is the SNMP package? Is it its own snmpd or does it add to the snmpd.conf?
|

18-07-2008, 16:50
|
|
Member
|
|
Join Date: Jan 2008
Posts: 41
|
|
http://h20392.www2.hp.com/portal/swd...umber=T8569AAE
You need the hp-OpenIPMI and it needs to compile it, so you need all the build crap like, build-essential, linux-headers-`uname -r`, etc. If it doesn't compile right, the HP stuff will never work right. You also need to make sure you don't have the regular openipmi package installed. If you do, remove it.
Read about all the different software on that page and figure out what you need to install and what you don't want. It was a tad difficult to get everything working but I got it all working perfectly now.
If you need more help, let me know. I won't baby step you through it though....
|

18-07-2008, 17:10
|
|
Senior Member
|
|
Join Date: Aug 2007
Location: London
Posts: 143
|
|
Quote:
Originally Posted by OneLoveAmaru
http://h20392.www2.hp.com/portal/swd...umber=T8569AAE
You need the hp-OpenIPMI and it needs to compile it, so you need all the build crap like, build-essential, linux-headers-`uname -r`, etc. If it doesn't compile right, the HP stuff will never work right. You also need to make sure you don't have the regular openipmi package installed. If you do, remove it.
Read about all the different software on that page and figure out what you need to install and what you don't want. It was a tad difficult to get everything working but I got it all working perfectly now.
If you need more help, let me know. I won't baby step you through it though....
|
The HP site is almost impossible to navigate, thank you for the link I think I should be able to take it from there!
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 16:31.
|