Page 1 of 1

Rebuilding e-mail alerts for cron job tasks

Posted: Mon Oct 21, 2019 3:14 pm
by rferebee
New topic being created at the request of Nagios Support.

Prior to the cut over we would receive email notifications whenever our backup XI server would perform a failover restore. This occurs daily for us at 9AM. Well, the server is doing the failover restore, but it's not sending out the notifications telling us that's it's doing it. I must have missed a configuration file somewhere, but I'm not sure where to look.

If I PM'd you an example of the notifications we used to get, do you think you'd be able to identify what mechanism would trigger it?

The events are triggered by cron jobs (crontab -e) but, I don't know what triggers the email notifications to be sent. When viewing the maillog I see emails going out but, not the ones that are generated whenever we run the failover_restore script. This happens daily at 9AM on our failover server.

Re: Rebuilding e-mail alerts for cron job tasks

Posted: Mon Oct 21, 2019 3:34 pm
by mbellerue
Is it possible that it was cron itself that was sending out the notification? Do you still have one of the emails that was sent out? We might be able to tell from looking at it. Usually cron emails contain the full command that cron runs in the subject of the email.

Re: Rebuilding e-mail alerts for cron job tasks

Posted: Mon Oct 21, 2019 4:15 pm
by rferebee
Yes, I PM'd you the emails you requested earlier today.

Re: Rebuilding e-mail alerts for cron job tasks

Posted: Tue Oct 22, 2019 9:08 am
by mbellerue
Do you recall who you PM'd it to? It's not in my inbox, and I've asked a few people around support, and they don't have it either.

Re: Rebuilding e-mail alerts for cron job tasks

Posted: Tue Oct 22, 2019 9:15 am
by rferebee
Oh sorry, it went to another support person. Benjamin Smith.

Re: Rebuilding e-mail alerts for cron job tasks

Posted: Tue Oct 22, 2019 10:13 am
by mbellerue
Okay, perfect, I have the emails. Those are definitely cron emails. That's a outside of what we support. However, I can point you to this link. Also maybe check the mail log when a cron job is run to see if it fires off an email at that point.

https://www.nixtutor.com/linux/sending- ... ough-cron/