Page 1 of 1

Not Receiving Notifications

Posted: Wed Jan 16, 2019 10:39 am
by ginfra
Hello,

I'm trying to setup a new environment and have started to put some hostgroups and checks in place, however I'm having no success receiving notification emails. I can see Notifications in the Event Log but do not receive them:

Host Notification 2019-01-16 15:12:28 HOST NOTIFICATION: <username redacted>;<hostname redacted>;DOWN;xi_service_notification_handler;CRITICAL - <IP redacted>: Host unreachable @ <ip redacted>. rta nan, lost 100%

My contacts.cfg:

###############################################################################

define contact {
contact_name <redacted>
alias Unix Team
contactgroups Unix_CG
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,s,
service_notification_options w,u,c,r,
host_notification_commands xi_service_notification_handler
service_notification_commands xi_service_notification_handler
can_submit_commands 1
email <redacted>
address1 <redacted>
address2 <redacted>
use xi_contact_generic
}

Host config file:

###############################################################################

define host {
host_name <hostname redacted>
use linux-server
alias <redacted>
address <redacted>
hostgroups linux-servers
check_command check-host-alive!!!!!!!!
contact_groups Unix_CG
register 1
}

###############################################################################

Can someone point me in the right direction before I jump into the sea please?

Re: Not Receiving Notifications

Posted: Wed Jan 16, 2019 12:06 pm
by mcapra
There are some Nagios XI user-level configurations that need to be set in addition to the contact object level stuff:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

The most common "thing people miss" is the individual Nagios XI user preferences that are explained on Page 2 / Page 3 of the above documentation.

Seeing the notification dispatched to the desired contact is a good first step, and tells me you've probably got the contact object figured out. I'd double check the Nagios XI user settings.

There's also some generic troubleshooting steps here:
https://support.nagios.com/kb/article.php?id=36

More granular investigation should be performed by a support tech.

Re: Not Receiving Notifications

Posted: Wed Jan 16, 2019 3:54 pm
by lmiltchev
...I can see Notifications in the Event Log but do not receive them...
Have you checked the maillog for clues?

# When using sendmail

Code: Select all

tail -50 /var/log/maillog
# When using SMTP

Code: Select all

tail -50 /usr/local/nagiosxi/tmp/phpmailer.log
Have you check user's notification options?

Log in (masquerade as) the user, click on the username in the upper right corner, review all of the Notification Options for accuracy, and send a "test" email.