Re: Monitoring Compaq RAID
Jens Kruse <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Pete, Shelfo, Pete wrote: > Has anyone successfully monitored hard disk availability within a Compaq > RAID array? I have the Compaq MIBS but they don?t work with > check_snmp? I want to know when one of the hard disks goes bad. Yes, we do. It's not really great code, but I'm not a programmer/scripter. Find enclosed * a binary I once received from someone at Compaq (raid-status) * a perl script (i.e. for cronjobs) (check_cpq_raid_status.pl) * a perl script 'check_cpq_raid.pl' Our cronjob looks like this: */1 * * * * root /root/check_cpq_raid_cron.pl command.cfg: command[check_cpq_raid_ssh]=/usr/lib/netsaint/plugins/check_by_ssh -H $HOSTADDRESS$ -l netsaint -t 60 -C './check_cpq_raid.pl' hosts.cfg: service[zielmaschine]=zielmaschine;..;check_cpq_raid_ssh HTH, Jens
raid-status
(application/octet-stream, 15.7 KB) - not displayed
check_cpq_raid_cron.pl
(application/x-perl, 345 B)
#!/usr/bin/perl -w # $Id: check_cpq_raid_cron.pl,v 0.0.2 2002/07/03 [email protected] # $Id: check_cpq_raid_cron.pl,v 0.0.3 2002/08/19 [email protected] $device = ''; $status = ''; $device = `mount | grep 'on\ \/\ ' | awk -F "p" \'\{print \$1\}\'`; chomp ($device); $status = `/root/bin/raid-status $device > /tmp/raid_status.txt`;
check_cpq_raid.pl
(application/x-perl, 485 B)
#!/usr/bin/perl -w # $Id: check_cpq_raid.pl,v 0.0.2 2002/07/02 [email protected] $device = ''; $status = ''; $device = `mount | grep 'on\ \/\ ' | awk -F "p" \'\{print \$1\}\'`; chomp ($device); open (DATEI, "</tmp/raid_status.txt"); while ($var1 = <DATEI>) { chomp $var1; $status = $status . $var1; } close (DATEI); if ($status ne "Logical drive $device: Logical drive ok") { print "$status \n"; exit(1); } else { print "RAID i.O. \n"; exit(0); }