Page 1 of 1
Contact not receiving notifications
Posted: Fri Apr 29, 2016 8:47 am
by jkinning
I have a service that is checking a web services call but the contact isn't receiving the notification. I looked at Nagios XI 'View Service Notifications' and I see the contact listed but noting was received. I have asked our Exchange Admins to look and they don't see Nagios even sending anything to the email address. I tried using both notify-service-by-email and xi_service_notification_handler and neither worked. When we first set this check up and tested everything did work. Is there a way I can run a test email to this email address from Nagios command line to test each method to see what errors I may be getting. Or is there a log file I can look at to see why the notification wasn't dispatched to our mail server? The email address is somewhat strange which could also be creating the problem as it has an _ in it,
[email protected]
Re: Contact not receiving notifications
Posted: Fri Apr 29, 2016 9:00 am
by vAJ
Is the contact just a contact, or a defined user account in NagiosXI as well?
Re: Contact not receiving notifications
Posted: Fri Apr 29, 2016 9:19 am
by jkinning
Just a contact.
Re: Contact not receiving notifications
Posted: Fri Apr 29, 2016 9:24 am
by vAJ
Contacts are a little tricky in XI.
Read up here:
https://support.nagios.com/kb/article.php?id=36
Contacts
The contact must be either directly associated with the host or service or be part of a contactgroup that is connected to the host or service.
Make sure users and contacts that were added within Nagios XI are set up with the proper notification handlers:
If you are using Users, which are also Contacts (you've added a Contact to them):
xi_host_notification_handler and xi_service_notification_handler
If you are using Contacts only:
notify-host-by-email and notify-service-by-email
Contacts and users are similar but not the same - read more about it here:
Documentation - Nagios XI - Users And Contacts
If you are not receiving notifications, it also possible that the nagiosadmin user was set to use the generic_template contact template, which resulted in notifications not being controlled through the XI interface. This can be corrected by changing the user's contact template to be xi_generic_template is the Core Config Manager. This bug was corrected in 2009R1.2 and only affects systems that had/have previous versions installed.
Re: Contact not receiving notifications
Posted: Fri Apr 29, 2016 10:35 am
by rkennedy
Thanks @vAJ!
@jkinning - let us know if you have any further questions, or if that helped. You'll need a user, and the xi_host_notification_handler or xi_service_notification_handler commands assigned to that contact.
Re: Contact not receiving notifications
Posted: Fri Apr 29, 2016 10:43 am
by bwallace
Thanks vAJ!
More about the mail settings for a 'contact only....'
If your XI is configured to use SMTP ---- you'll have to execute the steps outlined in this doc, beginning at page two in order for the 'contact only' to receive notifications
https://assets.nagios.com/downloads/nag ... Mailer.pdf
Once this is complete, please run the test notification mentioned in the KB article vAJ linked or:
+ from the Nagios XI web interface, click on
Home > Details > Host Detail and click on any host for whom the contact is supposed to receive alerts on. Then go to the "Advanced" tab, and click on "Send custom notification". Select the "Forced" check-box, type a comment, and click "Submit". The contact should have an email in their in box. Nagios XI should show a record of the test notification being sent:
Home > Incident Management > Notifications.
**If running though the steps in the doc above is to much of a pain, a faster method is to just create a user and associate it with the contact -