Page 1 of 1
Notifications to contacts not working after upgrade
Posted: Thu Jul 05, 2018 3:33 pm
by sujitt
Nagios is not sending any notifications to any contacts who is not a user.
I see a message in the /usr/local/nagiosxi/var/eventman.log
Could not find user_id for contact.
I am on
Nagios XI Version : 5.4.13
gaatlp82u.priv.aglrsc.com 3.10.0-693.17.1.el7.x86_64 x86_64
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Gnome is not installed
Thanks
Re: Notifications to contacts not working after upgrade
Posted: Thu Jul 05, 2018 4:33 pm
by npolovenko
@sujitt, Please check the notification commands for this contact. Are you using xi_host_notification_handler and xi_service_notification_handler? If so please replace them with notify-host-by-email and notify-service-by-email. Notification_handler commands do require contacts to have user accounts.
Re: Notifications to contacts not working after upgrade
Posted: Fri Jul 06, 2018 10:39 am
by sujitt
Here is how I have it
I have modified the xi_contact_generic template as follows
1. for Host Notification commands I have
notify-host-by-email
xi_host_notification_handler
and
2. for service Notification commands I have
notify-service-by-email
xi_service_notification_handler
Re: Notifications to contacts not working after upgrade
Posted: Fri Jul 06, 2018 12:32 pm
by npolovenko
@sujitt, I do not recommend having both notification commands at the same time. If both commands fire at the same time you will receive a notification 2 times. Under generic template leave only xi_host_notification_handler and xi_service_notification_handler. And for the contact that is not working manually select notify-host-by-email and notify-service-by-email.
However, if you're using SMTP to send notification emails, notify-host/service-by-email will not work, so your only option would be to create a user.
Re: Notifications to contacts not working after upgrade
Posted: Fri Jul 06, 2018 1:51 pm
by sujitt
Can I configure both SMTP and sendmail ?
Re: Notifications to contacts not working after upgrade
Posted: Fri Jul 06, 2018 2:01 pm
by sujitt
Is there a way to convert contacts to users in bulk ?
Re: Notifications to contacts not working after upgrade
Posted: Fri Jul 06, 2018 3:52 pm
by npolovenko
@sujitt
Is there a way to convert contacts to users in bulk?
Unfortunately, no.
Can I configure both SMTP and sendmail ?
You can. For contacts that do not have corresponding users, select the following notification commands -> {notify-host-by-email} and {notify-service-by-email}. This will force XI to use the sendmail script instead of SMTP.