Contact not receiving notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Contact not receiving notifications

Post 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]
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Contact not receiving notifications

Post by vAJ »

Is the contact just a contact, or a defined user account in NagiosXI as well?
Andrew J. - Do you even grok?
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Contact not receiving notifications

Post by jkinning »

Just a contact.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Contact not receiving notifications

Post 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.
Andrew J. - Do you even grok?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Contact not receiving notifications

Post 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.
Former Nagios Employee
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Contact not receiving notifications

Post 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 -
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked