Page 1 of 1
Mail notifications out of organisation's domain
Posted: Thu Sep 03, 2020 7:20 am
by IkaIka
Hello! I'm having problems with email notifications. They seem to work fine when sending to contacts within my organisation. However, there seems to be a problem sending to addresses outside of our domain.
I looked up the knowledge base on this (
https://support.nagios.com/kb/article.php?id=36#), changed the settings under Admin -> Email Settings to SMTP and provided the address and access credentials to my company's mail server (I also contacted the person in charge of it to make sure our Exchange server is configured to relay mail properly). After saving the settings and sending a test email I got a reassuring green message box and found the message in my inbox (see the attachment).
Unfortunately, the notifications still seem to only be reaching people within my organisation and the person in charge of our Exchange server told me that Nagios doesn't seem to be using the new SMTP settings. It seems almost as if XI is only using the new settings for test emails and old ones for regular notifications. Is that possible?
My XI version is 5.6.12, running on Centos 7.
Re: Mail notifications out of organisation's domain
Posted: Thu Sep 03, 2020 4:19 pm
by benjaminsmith
Hi,
Just wondering if this has always been a problem or something the cropped up recently? If so, have you made any recent changes to the XI server or your Exchange server.
It seems almost as if XI is only using the new settings for test emails and old ones for regular notifications. Is that possible?
That could happen if some of the monitoring contacts are using the default Nagios Core notification handlers, those would use the default MTA in Linux to send notifications ( instead of SMTP).
If you let me know which contacts outside your organization that are not receiving emails, I can take a look at the configurations for you in the system profile. Also, make sure to enable the logging on PHP mailer, so we can capture any possible errors in the log.
Just go to Admin > Email Settings > Outbound and check the Enable Logging box.
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
Re: Mail notifications out of organisation's domain
Posted: Thu Sep 10, 2020 5:50 am
by IkaIka
Thanks for the reply. We noticed this problem only recently, however, there were no modifications to our XI or Exchange servers that I know of. The contact I can't notify is
[email protected].
Re: Mail notifications out of organisation's domain
Posted: Fri Sep 11, 2020 11:37 am
by benjaminsmith
Hi,
Thank you for the profile. So the contact associated with that address is the following:
Code: Select all
define contact {
contact_name Ferrodo Serwis
alias [email protected]
service_notification_period 24x7
host_notification_period 24x7
service_notification_options r,w,u,c,f,s
host_notification_options r,d,u,f,s
service_notification_commands notify-host-by-email-outside
host_notification_commands notify-host-by-email-outside
email [email protected]
minimum_importance 0
host_notifications_enabled 1
service_notifications_enabled 1
can_submit_commands 1
retain_status_information 1
retain_nonstatus_information 1
}
This contact is setup to use the
notify-host-by-email-outside notification handler. I noticed a number of other contacts using this same notification handler, are they receiving notifications?
This notification is using Sendmail for notifications.
Code: Select all
define command {
command_name notify-host-by-email-outside
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTALIAS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/sbin/sendmail "** $NOTIFICATIONTYPE$ Host Alert: $HOSTALIAS$ is $HOSTSTATE$ **" $CONTACTEMAIL$ -- -f [email protected]
}
If you changed your XI server to use SMTP, then your would want to configure the contacts to use the XI notification handler. We have step by step instructions for setting this up in the following guide.
https://assets.nagios.com/downloads/nag ... Mailer.pdf
Try to re-configure Ferrodo Serwis to use those notification commands and let me know if he receives the notification. A good way to test this is to send passive check results to force a host or service they are assigned to go into non-ok state and send out a notification. This can be done from the Advanced Tab on the host or service details.
passive-checks.png
Re: Mail notifications out of organisation's domain
Posted: Thu Sep 17, 2020 9:38 am
by IkaIka
This solved the issue, I got a confirmation that the notifications were received. Thank you for your assistance!
Re: Mail notifications out of organisation's domain
Posted: Fri Sep 18, 2020 10:58 am
by benjaminsmith
HI,
This solved the issue, I got a confirmation that the notifications were received. Thank you for your assistance!
Great! Happy to help. We'll go ahead a close out this out.
Re: Mail notifications out of organisation's domain
Posted: Fri Sep 18, 2020 10:58 am
by benjaminsmith
HI,
This solved the issue, I got a confirmation that the notifications were received. Thank you for your assistance!
Great! Happy to help. We'll go ahead a close out this out.