Page 1 of 1
Sending test notification fails
Posted: Sat Aug 08, 2015 1:55 pm
by WillemDH
Hello,
What can I do to troubleshoot failed test notifications? I'm posting this in General Forum, as it's an issue on my private XI instance on my Linode server. It seems unable to send email to my gmail address.
Grtz
Willem
Re: Sending test notification fails
Posted: Sat Aug 08, 2015 5:11 pm
by jdalrymple
It starts with checking on how your sending?
Sendmail or SMTP?
Have you looked at /var/log/maillog for either:
a) outgoing messages?
b) bounce messages?
Typically the easiest thing to do with XI is configure a known good SMTP server, as in one you are able to successfully configure on your iPhone and send mail from using the same settings that you pump into XI. If you have a good set of creds on a good SMTP server, that is almost always foolproof. I'm sure you've already seen it, but in case not:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Sending test notification fails
Posted: Sun Aug 09, 2015 12:45 pm
by WillemDH
Well unfortunately I do not have a known good SMTP server running. At work, I do have it configured with an SMTP server and it works fine.
So I configured Nagios to use Sendmail in the mail settings in the Admin menu. /var/log/maillog is completely empty.
Tried a bit debugging from cli but I don't get any error or info that would get me any further.
Code: Select all
telnet mail.messaging.microsoft.com 25
Trying 207.46.163.247...
Connected to mail.messaging.microsoft.com.
Seems to work, so outgoing mail should be no problem?
Any advice is welcome to get this working. Cheerz.
WIllem
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 9:15 am
by jdalrymple
Weird - this worked but sendmail is not working? Are you able to even see your notifications in the notifications view, or is it possible that Nagios isn't sending them at all?
enable_notifications=1 in nagios.cfg?
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 9:26 am
by lmiltchev
/var/log/maillog is completely empty.
Willem, is rsyslog running? It would be helpful to have something in the maillog in order to troubleshoot the issue. Can you try restarting rsyslog and sendmail?
Code: Select all
service rsyslog restart
service sendmail restart
Then try sending an email again from the CLI and check the maillog.
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 11:14 am
by WillemDH
Willem, is rsyslog running? It would be helpful to have something in the maillog in order to troubleshoot the issue.
Code: Select all
sudo systemctl status rsyslog
[sudo] password for willemdh:
rsyslog.service - System Logging Service
Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled)
Active: active (running) since Sat 2015-08-08 19:45:34 CEST; 1 day 22h ago
Main PID: 2663 (rsyslogd)
CGroup: /system.slice/rsyslog.service
└─2663 /usr/sbin/rsyslogd -n
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
I restarted it to get rid of the warning:
Code: Select all
sudo systemctl restart rsyslog
➜ ~ sudo systemctl status rsyslog
rsyslog.service - System Logging Service
Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled)
Active: active (running) since Mon 2015-08-10 17:50:18 CEST; 2s ago
Main PID: 15827 (rsyslogd)
CGroup: /system.slice/rsyslog.service
└─15827 /usr/sbin/rsyslogd -n
Aug 10 17:50:18 f1reoutside systemd[1]: Started System Logging Service.
Weird - this worked but sendmail is not working? Are you able to even see your notifications in the notifications view, or is it possible that Nagios isn't sending them at all?
Sorry Jdalrymple if wasn't clear. I just wanted to mention I tried with these cli commands but they also failed.
Is it possible I'm not using 'sendmail' on CentOS 7 but 'mailx'?
Code: Select all
yum list installed | grep "mail"
fail2ban-sendmail.noarch 0.9.2-1.el7 @epel
mailcap.noarch 2.1.41-2.el7 @base
mailx.x86_64 12.5-12.el7_0 @base
Should I install sendmail? Looking at the core notification command I would think if I get /bin/mail to work the core notification handlers should work?
I can see this is not really a Nagios issue, so I posted my question on the Linode forum (
https://forum.linode.com/viewtopic.php? ... 070#p68070) and the CentOS forum (
https://www.centos.org/forums/viewtopic ... 48&t=53692)
Grtz
Willem
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 1:46 pm
by jdalrymple
WillemDH wrote:Sorry Jdalrymple if wasn't clear. I just wanted to mention I tried with these cli commands but they also failed.
Bingo - sorry I misunderstood. If that failed it is a network restraint being imposed somewhere between your machine and your Internet routable interface. SMTP is usually the simple answer - you can use a Gmail account, it will just appear to be coming from
[email protected] - for testing (which it seems you're doing now?) this should be fine though.
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 3:32 pm
by WillemDH
Nice tip I'll try the gmail option. I'll let you know how that goes.
Re: Sending test notification fails
Posted: Mon Aug 10, 2015 4:51 pm
by tgriep
Let us know how it works for you.
Re: Sending test notification fails
Posted: Fri Oct 30, 2015 9:57 am
by WillemDH
The gmail option worked out. Please close.