Page 1 of 2

[REQUEST] Email alerts of drive failure conditions

PostPosted: Sun Jul 30, 2017 10:45 pm
by hvymetal86
Since starting to use the fvdw firmware on my 5big vs2 about 2 years ago I've been unfortunate enough to experience 2 drive failures. One was on v16.1 and one on 17.0. I very much appreciate the ease that 17.0 added to performing the drive replacement, however I noticed both times that when logged into the web interface while a drive was actively failed, on both versions it stated "Current System Status: No Alert" and I didn't get an alert email about the drive failure despite configuring that feature.

I would think that a failed drive is the HIGHEST possible alert condition there is other than maybe the NAS processor overheating enough to destroy itself and so was confused by the system status and lack of email. Luckily my NAS is somewhere I see it on nearly a daily basis so it didn't go unnoticed for long in either case because the front round LED button blinks red, but if someone had theirs in a place that they couldn't easily see or disabled the front LED button they could have a failed drive go unnoticed for extended periods of time. Not sure how difficult implementing this would be, but just wanted to throw the suggestion out there.

If you'd need help testing and could have a way to safely simulate this (without risking my actual data by randomly pulling a drive or something) I'd be more than willing to help test with my 5big vs2.

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Mon Jul 31, 2017 10:28 am
by Jocko
Hi Hvymeta86,

Thank you for your feedback.

But I think there is something wrong somewhere as you should receive an alert email :scratch
n both versions it stated "Current System Status: No Alert"
Yes it is a good suggestion to change this message on such events. We already made it on fan events (when the daemon is stopped)

About email alert, we need to check several things :
- notification settings (on notification menu): check if it is still enabled and do you receive an email when you send a test mail ?
- can you post the output
Code: Select all
cat /etc/mdadm.conf
you should have a line
Code: Select all
MAILADDR youremail@system
where youremail@system is the address set on Notification menu for delivering system messages

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Sun Aug 13, 2017 3:23 pm
by hvymetal86
Code: Select all
root@HvyMtlNAS:/ # cat /etc/mdadm.conf
CREATE owner=root group=root mode=0666 auto=yes metadata=1.0
PROGRAM /usr/bin/mdadm-events
DEVICE /dev/sd[abcde]8 /dev/se*
ARRAY /dev/md0 metadata=0.90 UUID=2640f25a:4ed24787:e0e498eb:d7731140

MAILADDR XXXXXXXXXX@gmail.com

Redacted email for privacy, I can PM it to you if its necessary for our troubleshooting. Notifications were still enabled. I verified my SMTP settings in comparison to this article. When I use the "Send a test email" feature it seems to work and says "email sent" on the admin page but I never get it.

All settings are:
SMTP Server: smtp.gmail.com
Port: 587 (Can't use 465 as the firmware doesn't allow forcing SSL which would require that port)
User login: XXXXXXXXXX@gmail.com
Enforce TLS for connecting: Checked
Email Address: XXXXXXXXXX@gmail.com

Sending and destination email addresses are the same email, but I did try the test with a different destination email than the sending one (still a gmail address) and the results were no different. In all tests I gave the emails at least a few minutes to arrive and checked my spam folder as well.

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Sun Aug 13, 2017 4:50 pm
by Jocko
Hi

The issue is on gmail side. Since at least one year, google blocks email from some apps (in our case openssl)

See https://support.google.com/accounts/answer/6010255 and change the related settings on your google account.

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Sun Aug 13, 2017 5:49 pm
by hvymetal86
Very good to know the reason, thanks! But I'd rather not make my Google account less secure. I looked through the NAS features to try and find an option to run a simple SMTP server from it but didn't find one. Am I just missing it or does one not exist? I guess my second choice would be creating/using free email account with an alternate provider. Does would yahoo work or have a similar problem? If it would have similar issues, can you recommend a free email service for this purpose?

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Tue Aug 15, 2017 11:17 am
by Jocko
hvymetal86 wrote:But I'd rather not make my Google account less secure.
It's your choice but this option does not have a consistency in your case (this option is done to avoid the man in middle attack)

I think the better way is to create another gmail account where you will disable the related option and it will be used only by the NAS to relay the system messages

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Wed Aug 16, 2017 12:28 am
by hvymetal86
I just created a second email account, enabled the insecure apps feature, configured it in the nas, and tried testing twice without getting anything in the destination email's inbox or spam.

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Wed Aug 16, 2017 8:43 am
by Jocko
On my side that works with these settings :
notification.PNG

Test-envoi.PNG

But if I remember well you should have an alert message on your gmail box to valid the app as a trusted one (and after you will receive any email)

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Wed Aug 16, 2017 11:25 pm
by hvymetal86
I never got an alert message, but I checked in https://myaccount.google.com/permissions and it says "You haven't granted any apps or websites access to your Google Account." Could there be an issue with password length? The one for my new NAS gmail account is 64 characters. It works fine with google.com but I'm wondering about the NAS.

Re: [REQUEST] Email alerts of drive failure conditions

PostPosted: Thu Aug 17, 2017 7:12 am
by Jocko
No password length should not be the issue but you may try with a plain word to see what happens