New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Best Software RAID notification system?
I have raid 10 soft on my ubuntu install but want to be alerted when a drive fails. I added my email to mdadm and tried a test message but it didn't send. And I wasn't sure if mdadm would actively monitor and send me an email as soon as a drive fails.
If anyone has any suggestions, please tell me.
Comments
mdadm is your friend
Have a look at this old article on it:
https://www.novell.com/support/kb/doc.php?id=7001034
Are there any packages than can alert me if a drive fails?
Like I said - mdadm will do that
Add MAILADDR [email protected] to mdadm.conf
Have a look at the link I posted.
I added my email but I installed sendmail first, it was going to my spam, so I installed ssmtp and used mandrill, but now I get nothing at all.
So either whitelist the sender name/IP address so it doesn't go to spam. Or look at the log files for SSMTP and confirm its delivering to Mandrill. Does Mandrill show it received anything?
Ok here's what I did. I first tried the command
sudo mdadm --monitor --scan --test --oneshot
and got a sendmail error since it wasn't installed, so I installed it and the command went through fine but it was going to my spam, I was following this guide howtogeek.com/51873/how-to-setup-software-raid-for-a-simple-file-server-on-ubuntu/ and saw a link to a smtp setup guide to follow before setting up email notifications, so I went to it howtogeek.com/51819/how-to-setup-email-alerts-on-linux-using-gmail/ and followed the instructions.
So the
echo "Test message from Linux server using ssmtp" | sudo ssmtp -vvv [email protected]
went through fine. hastebin.com/yurepifaga.coffee was the output it gave, so then I did the mdadm command again and looked at the log hastebin.com/ricixekake.melWith mdadm it adds root to the email [email protected] making it root@[email protected], and I'm not even sure it's using the right email to send to.
Can you post your SSMTP config too
I had this hastebin.com/utepiniyuz.vala
but I just changed hostname by removing noreply@ and just kept the domain, sent it again, and the log had shown [email protected] but it didn't go through mandrill.
Hostname should be a FQDN
Let me see what I have setup for this. I have similar config.
This is my ssmtp.conf changed to work with Mandrill and it delivers correctly.
[email protected] mailhub=smtp.mandrillapp.com:587 hostname=myserver.mydomain.com FromLineOverride=YES UseSTARTTLS=YES AuthUser=authuser@ AuthPass=authpass UseTLS=YES UseSTARTTLS=YES TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
Well mine just won't send me the emails even though in the logs it says [email protected] which should work.
Did you set up a TXT (SPF) record properly for your domain?
So when you do
echo "Test message from Linux server using ssmtp" | sudo ssmtp -vvv [email protected]
What is the output?
http://hastebin.com/kociqowecu.coffee
And I received the email.
Ok so SSMTP + Mandril is working correctly now.
Are you just not getting the mails from mdadm?
Correct
in ssmtp.conf - change:
FromLineOverride=YES
to
FromLineOverride=NO
and make sure that root= is your destination email address.
Retest and it should work.
It worked, thanks. Will it automatically send me an email when it detects that a drive failed?
It should do when any change happens.
Thanks