Sending test notification fails
Sending test notification fails
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
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
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Sending test notification fails
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
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
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.
Seems to work, so outgoing mail should be no problem?
Any advice is welcome to get this working. Cheerz.
WIllem
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
➜ ~ echo "Your message" | mail -s "Message Subject" [email protected]
➜ ~ echo "Your message" | mailx -s "Message Subject" [email protected]Code: Select all
telnet mail.messaging.microsoft.com 25
Trying 207.46.163.247...
Connected to mail.messaging.microsoft.com.Any advice is welcome to get this working. Cheerz.
WIllem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Sending test notification fails
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?WillemDH wrote:Code: Select all
➜ ~ echo "Your message" | mail -s "Message Subject" [email protected] ➜ ~ echo "Your message" | mailx -s "Message Subject" [email protected]
enable_notifications=1 in nagios.cfg?
Re: Sending test notification fails
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?/var/log/maillog is completely empty.
Code: Select all
service rsyslog restart
service sendmail restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Sending test notification fails
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.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.Sorry Jdalrymple if wasn't clear. I just wanted to mention I tried with these cli commands but they also failed.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?
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 @baseI 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
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Sending test notification fails
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.WillemDH wrote:Sorry Jdalrymple if wasn't clear. I just wanted to mention I tried with these cli commands but they also failed.
Re: Sending test notification fails
Nice tip I'll try the gmail option. I'll let you know how that goes.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Sending test notification fails
Let us know how it works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Sending test notification fails
The gmail option worked out. Please close.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net