How to set up MegaRAID email alerts under Linux?
-
I have Ubuntu 10.04 and MegaRAID controller. The only tool I have is the notorious MegaCli. I need to be emailed when some disk has failed in the RAID array. How to set that up?
-
Answer:
Create script like: #!/bin/bash STATUS=`MegaCli -AdpAllInfo -aALL -NoLog|egrep '^ (Degraded|Failed)'|grep -v ' 0'`; if [ "x$STATUS" != "x" ]; then echo -e "Subject: RAID WARNING @ `hostname`\n\n$STATUS"|/usr/sbin/sendmail [email protected] fi and add it to your crontab: https://help.ubuntu.com/community/CronHowto You also need valid sendmail program on your system, simplest config via ssmtp will be enough thou.
Henno at Super User Visit the source
Other answers
You can get the MegaRAID Storage Manager http://www.lsi.com/channel/ChannelDownloads/, and it can be setup to email you on RAID events (amongst other things, like SNMP). There's no speicifc Ubuntu version of it, but LSI provides a http://kb.lsi.com/KnowledgebaseArticle16108.aspx that explains how to get the "Linux" version working; hopfully it'll work for you, or at least get you going.
techie007
I think the Nagios plugin check_raid speaks megacli. You could use it standalone to write your own script. Like all Nagios plugins, it gives you an exit code of 1 if it thinks something is wrong. A cron entry like sh -c "check_raid > /tmp/raid_status || cat /tmp/raid_status" should give you a very basic solution.
Bittrance
Related Q & A:
- How to set up an email contact list?Best solution by Yahoo! Answers
- How to set up blackberry email?Best solution by Yahoo! Answers
- How do I stop my email alerts to my phone?Best solution by Yahoo! Answers
- How to set up an email account in outlook 2003?Best solution by eHow old
- How to set up Wi-Fi connection in Linux?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.