Nagios plugin to monitor 3ware/LSI RAID
by bigpresh on Mar.31, 2011, under Perl, System Administration
I wrote a basic Nagios plugin named nagios_3ware_raid_check to monitor the status of RAID arrays on 3ware/LSI hardware RAID controllers, but it was pretty limited.
Today I got a chance to improve it as I needed it for some machines at work; it now automatically figures out which card(s) are present, and checks the status of each RAID array on it. This means you don’t need to configure it to know which card number and unit to monitor, it just Does The Right Thing.
It uses the tw_cli utility available from the LSI website, which supports a wide range of 3ware/LSI RAID cards.
Example:
[dave@rasputin:~]$ /usr/local/bin/nagios_3ware_raid_check -v Card 6 is a 8006-2LP Unit u0 on card6 is a RAID-1 array of 931 GB and is OK RAIDCHECK OK - Card 6 unit u0 RAID-1 OK (931GB)
When actually using it from Nagios, don’t use the -v (verbose) option – just use something like the following in nrpe_local.cfg:
# Monitor RAID status command[check_raid]=/usr/local/bin/nagios_3ware_raid_check
4 Comments for this entry
1 Trackback or Pingback for this entry
-
SMART monitoring drives on 3ware cards « PreshBlog
June 29th, 2011 on 1:51 pm[…] monitor the status of the RAID array itself using my nagios_3ware_raid_check Nagios plugin (which I previously blogged about), but I wanted to use SMART monitoring to look for signs of imminent drive trouble, rather than […]
March 31st, 2011 on 12:24 pm
Can’t quite remember *why* I added you blog to my feed reader. I never understand a single word.
March 31st, 2011 on 12:32 pm
Haha, yeah, I’m considering splitting my blog into “techie” and “normal person” blogs.
You can subscribe to category feeds, e.g.:
http://www.preshweb.co.uk/category/personal/feed/
I could do with adding a “Non-geeky” category to contain all non-technical posts, and publicise the URL of that feed, and change my blog -> Facebook subscription to use that feed too; techy stuff getting posted to Facebook is kind of pointless too, since it means nothing to the majority of my Facebook friends.
March 31st, 2011 on 12:43 pm
And, in fact, you’ve just given me the kick up the arse I needed to actually do so.
The “non-geeky” feed URL is:
http://www.preshweb.co.uk/category/non-geeky/feed/
I’ve also (after much searching for the option) changed my Facebook account to import from that feed URL instead, so my Facebook friends don’t get technical posts they won’t understand shown to them.
Thanks!
August 22nd, 2013 on 1:38 pm
Hi. Nagios noob here. The plugin works well for me if I call it by hand, but the Nagios ePN (Embedded Perl Nagios!) doesn’t like it. I’ve had to add this line right near the top:
# nagios: -epn
so that Nagios uses real Perl to run it.
Thanks for making the plugin!
Andy