Email not working for one contact

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email not working for one contact

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post by blackrino9 »

Hello,

Here's everything from the /etc directory with the exception of contacts.cfg.
Last edited by blackrino9 on Tue Feb 20, 2018 1:45 am, edited 1 time in total.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email not working for one contact

Post by npolovenko »

@blackrino9, Everything looks good to me. Can you navigate to:

Code: Select all

cd /var/log/
And run:

Code: Select all

sudo grep -i "clemail@domain.com"  messages-20180211
*I think the messages log gets replaced every 7 days, so I need the one that includes the 14th of February 
sudo grep -i "email@domain.com"  messages
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email not working for one contact

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post by blackrino9 »

Hello,

Thanks for removing the address. :D


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));
?>
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email not working for one contact

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Email not working for one contact

Post by blackrino9 »

Yup, email is flowing like a champ now for those Azure CLI based alerts.


Thanks for all your help!
Locked