Page 2 of 3
Re: Email not working for one contact
Posted: Fri Feb 16, 2018 12:08 pm
by blackrino9
Hi,
Please use this debug log instead. The other one was capped at 1mb which didn't really capture anything. I tailed this one as I was triggering the alert and saw all kinds of good information being generated.
Re: Email not working for one contact
Posted: Fri Feb 16, 2018 6:00 pm
by npolovenko
@blackrino9, Can you download and zip the whole /usr/local/nagios/etc/ folder on the Nagios Server using Filezilla or WinSCP and upload it here?
Re: Email not working for one contact
Posted: Mon Feb 19, 2018 10:46 am
by blackrino9
Hello,
Here's everything from the /etc directory with the exception of contacts.cfg.
Re: Email not working for one contact
Posted: Mon Feb 19, 2018 6:02 pm
by npolovenko
@blackrino9, Everything looks good to me. Can you navigate to:
And run:
Re: Email not working for one contact
Posted: Mon Feb 19, 2018 8:02 pm
by blackrino9
0 results when searching messages*
There were a couple dozen hits when searching maillog*. I cross-referenced the alerts and matched them up to emails we received from other host/service checks.
Could you do me a favor and remove that email address from the thread? Last thing I want is for some bot to grab that and start spamming an address we use for critical system monitoring.
Everything looks good to me too. Where do we go from here? We can see the notification event firing but no emails are sent. It's like the message dies somewhere between Nagios and PostFix.
Thanks
Re: Email not working for one contact
Posted: Tue Feb 20, 2018 4:39 pm
by npolovenko
@blackrino9, Yeah, I removed your email address. Please let me know if I missed it somewhere else.
The only thing I can think of is a difference in time, please check your Linux system time and also the php time, and see if it matches up.
Re: Email not working for one contact
Posted: Wed Feb 21, 2018 10:10 am
by blackrino9
Hello,
Thanks for removing the address.
PHP time and System time are the same
[user]$ php time
2018-02-21, 3:07 pm
[user]$ date
Wed Feb 21 15:07:46 UTC 2018
Quick and dirty PHP time script
<?php
$t=time();
echo (date("Y-m-d, g:i a",$t));
?>
Re: Email not working for one contact
Posted: Wed Feb 21, 2018 2:35 pm
by blackrino9
Holy crap, I just figured it out.
I had a special character (`) in the Host Description that all of those service checks were attached to. That was breaking the something in the event handler so the message never made it to PostFix.
Re: Email not working for one contact
Posted: Wed Feb 21, 2018 5:55 pm
by npolovenko
@blackrino9, Haha Wow, I thought we won't be able to solve this one!
` sign, interesting... So everything is working for you now?
Re: Email not working for one contact
Posted: Wed Feb 21, 2018 7:24 pm
by blackrino9
Yup, email is flowing like a champ now for those Azure CLI based alerts.
Thanks for all your help!