Page 1 of 1

Recovery Notification not sent to all contacts in the group

Posted: Mon Mar 06, 2017 11:27 am
by vtadisina
I have a service to which the recovery email notifications is sent to only one contact in the group and all other group members did not receive any notifications. I have recovery notifications enabled for all contacts. I see the notification being sent in /var/log/messages for service recovery. But i cannot see the email being sent to all contacts in /var/log/maillog.

Code: Select all

Mar  6 11:10:31 xxxxxxxx nagios: SERVICE ALERT: xxxxxxxx;xxxxxxxx;OK;HARD;5;xxxxxxxx-Client: Running
Mar  6 11:10:31 xxxxxxxx nagios: SERVICE NOTIFICATION: admin;xxxxxxxx;xxxxxxxx;OK;xi_service_notification_handler;xxxxxxxx-Client: Running
Mar  6 11:10:31 xxxxxxxx nagios: SERVICE NOTIFICATION: contact_1;xxxxxxxx;xxxxxxxx-Client;OK;xi_service_notification_handler;xxxxxxxx-Client: Running
Mar  6 11:10:31 xxxxxxxx nagios: SERVICE NOTIFICATION: contact_2;xxxxxxxx;xxxxxxxx-Client;OK;xi_service_notification_handler;xxxxxxxx-Client: Running
Mar  6 11:10:31 xxxxxxxx nagios: GLOBAL SERVICE EVENT HANDLER: xxxxxxxx;xxxxxxxx-Client;OK;HARD;5;xi_service_event_handler

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 2:15 pm
by mcapra
Can you PM me a system profile? From the Nagios XI GUI, you can gather a profile via Admin -> System Profile -> Download Profile.

I will also need to know which services specifically we are referencing in the above logged events as well as the output of:

Code: Select all

echo "SELECT xi_users.username, xi_usermeta.* FROM xi_users RIGHT JOIN xi_usermeta ON xi_users.user_id=xi_usermeta.user_id  WHERE xi_usermeta.keyname LIKE '%notif%';" | mysql -uroot -pnagiosxi nagiosxi
You may need to alter the mysql command if the default credentials were changed.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 3:14 pm
by vtadisina
I have attached the profile zip file.

The service Host: 75A-216.3-HUB-RACK03-cat00
The service: hcat - Pop3Client

I added a text file with the output of the following command

Code: Select all

echo "SELECT xi_users.username, xi_usermeta.* FROM xi_users RIGHT JOIN xi_usermeta ON xi_users.user_id=xi_usermeta.user_id  WHERE xi_usermeta.keyname LIKE '%notif%';" | mysql -uroot -pnagiosxi nagiosxi
The users who are not getting the recovery notifications are sbell and nagiosadmin

Mod Edit: Removed profile and shared with techs.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 4:00 pm
by mcapra
It looks like the profile script failed to grab today's Nagios log for some reason. Can you also share the following files (not all may exist, share the ones that do):

Code: Select all

/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/archives/nagios-03-06-2017-00.log
/usr/local/nagios/var/archives/nagios-03-05-2017-00.log

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 4:07 pm
by vtadisina
Attached the file you asked for

Mod Edit: Removed log and shared with techs.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 4:27 pm
by mcapra
Looking over the host and service definitions in play:

Code: Select all

define service {
	host_name			75A-216.3-HUB-RACK03-cat00
	service_description		hcat - Pop3Client
	notification_options		c,r,
	notifications_enabled		1
	contacts			skumar
	contact_groups			Roadside
	_xiwizard			windowsserver
	register			1
	}	


define host {
	host_name			75A-216.3-HUB-RACK03-cat00
	contacts			hardcat,skumar
	contact_groups			Roadside
	first_notification_delay	0
	notification_options		d,u,
	notifications_enabled		1
	}	
Based on those alone, since nagiosadmin doesn't exist in the contacts directive or the Roadside contactgroup (that I can find) I would not expect the nagiosadmin user to receive notifications regarding recovery of hcat - Pop3Client.

Since sbell is in the Roadside contact group, we would expect them to receive CRITICAL and RECOVERY notifications per the c,r, options for the hcat - Pop3Client service. However, the sbell user appears to have service recovery notifications disabled:

Code: Select all

sbell	1873	59	notify_service_recovery	0	0
I would suggest having that user enable their service recovery notifications via the GUI like so:
2017_03_06_15_26_23_Account_Information_Nagios_XI.png
An admin account can also do this on their behalf using the "Notification Management" component on the "Admin" page.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 4:28 pm
by vtadisina
Attaching additional files(forgot to attach these)

Mod Edit: Removed logs and shared with techs.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 4:47 pm
by vtadisina
Thanks!!
Its working now the user is able to get Recovery notifications.

Re: Recovery Notification not sent to all contacts in the gr

Posted: Mon Mar 06, 2017 5:58 pm
by mcapra
Awesome! Is it ok if we close this thread and mark the issue as resolved?