Page 2 of 2

Re: Mail alerts received by users, not by contacts

Posted: Mon Apr 14, 2014 3:39 am
by Valouch312
I'm not sure i've choose the right handler for admins and contacts...
Can you tell me the right handler for contacts and admins (notify-host-by-email, notify-service-by-email, xi_host_notification_handler, xi_service_notification_handler) ?
I'm a bit lost :/
Thanks

Re: Mail alerts received by users, not by contacts

Posted: Mon Apr 14, 2014 9:53 am
by slansing
Sure! As the documentation states, you need to use (notify-host-by-email, notify-service-by-email) for your contacts, if you are using USER based notifications you need to use the (XI) handlers, you said contacts and admins, this does not mean much to us out of context, are you saying that these contacts were created with an associated user, and are defined as admins in the web interface? If so they should be using the XI handlers, not (notify-host-by-email, notify-service-by-email).

Re: Mail alerts received by users, not by contacts

Posted: Fri Apr 25, 2014 4:01 am
by Valouch312
When i create a new user with associated contact, he receive the Nagios mail alert ! But when i create a simple contact with notify-host-by-email and notify-service-by-email he don't...
I' tried to duplicate the contact created with the Nagios user and modify the infos of the contact but it doesn't work either... :(

Re: Mail alerts received by users, not by contacts

Posted: Fri Apr 25, 2014 9:43 am
by slansing
It should work fine, you need to follow the guidelines here:

http://exchange.nagios.org/directory/Do ... ns/details

Re: Mail alerts received by users, not by contacts

Posted: Mon May 05, 2014 6:20 am
by Valouch312
I've import configuration files of existing Nagios Core. Everything work properly except contacts...
They don't receive Nagios mail alerts while they receive them in Nagios Core...
What should I do ?

Re: Mail alerts received by users, not by contacts

Posted: Mon May 05, 2014 12:00 pm
by lmiltchev
Can you show us the contact definition of one of the contacts (that doesn't receive alerts)?
Does nagios *think* that notifications have been sent? Can you search for this contact under the "Notifications" page (Reports->Notifications)?

Re: Mail alerts received by users, not by contacts

Posted: Tue May 06, 2014 8:09 am
by Valouch312
define contact {
contact_name systeme
alias Info Systeme
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period workhours
service_notification_period workhours
host_notification_options d,u,r,f,s,
service_notification_options w,u,c,r,f,s,
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email [email protected]
use generic-contact
}

Re: Mail alerts received by users, not by contacts

Posted: Tue May 06, 2014 9:25 am
by slansing
When those notifications are send run the following and share the output with us:

Code: Select all

tail -50 /var/log/maillog
Be sure to use CODE WRAPS, there is a button in the section above your text box when you start to reply, simply highlight the log dump and click "Code."