Well, now that I've experienced some sort of disk failure on my NAS, I'm sort of annoyed that I did not set up any sort of notification system.

This is just a standard Ubuntu box sitting in the office. It doesn't have any sort of mail or cloud integration setup.

What would you recommend I use for alerting?

Anyway, I suspect a drive controller failure. It connects but the data is garbage. Can't even get SMART out of it.

@janusfox We have our machines set up so they can send outgoing mail with sendmail, which means stuff like cron email Just Worksβ„’.

We use opensmtpd, and it's pretty simple to set up opensmtpd to relay through your usual mail server _and log in to send stuff_, but you don't really have to do that if you're okay with your mails looking like spam to the mail server.

Anyway, if you've got that working, you could just have a cron job that prints some output and dies if things are horribly wrong, and then you should get mail about it.

@IceWolf I guess I just need to stop being lazy and install mail :)

Unless there's a USB plug-in klaxon, that'd be fine for me too!

@janusfox @IceWolf I rather like nullmailer as a very lightweight way to connect /usr/sbin/sendmail to an external SMTP server. There are even lighter weight ones (I don't remember the name - it was ages ago I last evaluated these things) but I went with nullmailer as it has a minimal queue so that at least you don't lose outbound mail when the SMTP server is down.

@pippin @janusfox huh! I didn't think about using something that isn't a real mailserver.

What happens to your local email then? As in emailing other local user accounts.

@IceWolf @janusfox I normally use it on servers where it's only going to be sending cron output and the like (with explicit MAILTO= settings in crontab) but I think you can tell it things like what domain to add if you email an unqualified localpart, where to send mail for system users like root, and a few other knobs to twiddle for this stuff. But I believe *all* mail gets shipped to the SMTP gateway - no local delivery at all.