Difference between revisions of "Raid:LSI Monitoring"
From SME Server
Jump to navigationJump to search (Created page with '(:title LSI Controller Monitoring:) == LSI Controller Monitoring under Linux == === Download === From http://www.drugphish.ch/~ratz/mpt-status/ http://www.drugphish.ch/~…') |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Level|Medium}} | |
+ | == LSI Controller Monitoring == | ||
− | == | + | === Introduction === |
+ | Dell Servers - and others (I guess) come the LSI Logic Raid controllers, but .. | ||
+ | |||
+ | The excellent native Raid monitoring in SME is bypassed, this howto describes how to install the mpt-status package and write a small customizable monitoring app | ||
+ | |||
+ | Establish a Console session to do this. | ||
=== Download === | === Download === | ||
From | From | ||
− | http:// | + | http://sven.stormbind.net/mpt-status-rhel/ |
− | |||
download | download | ||
− | + | [http://sven.stormbind.net/mpt-status-rhel/mpt-status-1.2.0-2.el6.i686.rpm mpt-status-1.2.0-2.el6.i686.rpm] | |
=== Install === | === Install === | ||
− | yum localinstall mpt-status-1.2. | + | yum localinstall mpt-status-1.2.0-2.el5.centos.i386.rpm |
=== Support Program === | === Support Program === |
Latest revision as of 14:05, 21 June 2013
LSI Controller Monitoring
Introduction
Dell Servers - and others (I guess) come the LSI Logic Raid controllers, but ..
The excellent native Raid monitoring in SME is bypassed, this howto describes how to install the mpt-status package and write a small customizable monitoring app
Establish a Console session to do this.
Download
From http://sven.stormbind.net/mpt-status-rhel/ download mpt-status-1.2.0-2.el6.i686.rpm
Install
yum localinstall mpt-status-1.2.0-2.el5.centos.i386.rpm
Support Program
- CheckMPT
#!/usr/bin/perl # With credit to : # => check_mpt.pl Copyright (C) 2006 Claudio Messineo <claudio@zero.it> $mpt_path="/usr/sbin/mpt-status"; $num_raid=2; $enabled=1; $sendto="admin"; $sendfrom="admin"; `/sbin/modprobe mptctl`; sleep 1; if ( ! open( MPT_STAT, " $mpt_path | " ) ) { print "ERROR: could not open $mpt_path\n"; exit 1; } else { while (<MPT_STAT>) { if ( $_ =~ m/ENABLED/ ) { # print "$_"; $enabled--; } if ( $_ =~ m/ONLINE/ ) { # print "$_"; $num_raid--; } next; } my $hostname=`/bin/hostname -f 2>&1`; chomp($hostname); if (($num_raid==0) and ($enabled==0)) { # sendEmail( $sentto, $sendfrom, "$hostname Mpt-status OK", "$results" ); # print "$hostname Mpt-status OK\n"; exit 0; } else { sendEmail( $sentto, $sendfrom, "$hostname Mpt-status Alert", "$results" ); print "$hostname Mpt-status Alert\n"; exit 1; } } # Simple Email Function # ($to, $from, $subject, $message) sub sendEmail { my ($to, $from, $subject, $message) = @_; my $sendmail = '/var/qmail/bin/sendmail'; open(MAIL, "|$sendmail -f $from -oi -t"); print MAIL "From: $from\n"; print MAIL "To: $to\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$message\n"; close(MAIL); }