Page 1 of 1
Sending Email Alerts to Contacts
Posted: Mon Jan 24, 2022 4:27 pm
by p4ben
Are there any special considerations to be made for sending an alert to a contact instead of a user? Email alerts to users work just fine, but not to contacts. I've verified I can manually send an email from the Nagios host through the configured external SMTP server, but Nagios itself doesn't seem to send alerts, though I believe I have it configured to do so. The contact is part of a Contact Group which is configured as a destination for a Host Escalation.
Re: Sending Email Alerts to Contacts
Posted: Tue Jan 25, 2022 10:38 am
by pbroste
Hello
@p4ben
Thanks for reaching out, want to start by quickly looking over the current results on that email address. This will result in the Core config for that contact and the 'eventman' log activity. If the contact is associated with a group then we will hit a wall and will require the System Profile.
Please send over the '/tmp/results.txt' in a Private Message.
Thanks,
Perry
Re: Sending Email Alerts to Contacts
Posted: Thu Jan 27, 2022 7:21 pm
by Maxwellb99
Hi p4ben,
By all means Listen to Nagios & you've got some complexity with the host escalations. But in general to your question "Are there any special considerations to be made for sending an alert to a contact instead of a user?" We found the following
https://www.devopsschool.com/pdf/nagios ... mailer.pdf very helpful. To summarize, we set up two new commands (notify_host_xi_contact, notify_service_xi_contact). Then within the
Contact Template ->
generic-contact ->
Alert Settings ->
Manage <Service/Host> Notification Commands we applied the command (notify_<host/service>_xi_contact). Then we had all our contacts inherit from
generic-contact.
There may be additional steps within the documentation or you might need to play with the stuff in
Admin -> Users -> Notification Management or
Admin -> System Config -> Email Settings. Or I could be way off

but, that worked for us a few years back. Good Luck.
Maxwell Ramirez
Re: Sending Email Alerts to Contacts
Posted: Fri Jan 28, 2022 3:54 pm
by pbroste
Hello
@p4ben and
@Maxwellb99
Just following up, to let you know that I just setup a contact following the instructions
@Maxwellb99 posted.
Verified that the instructions included in the
linked article functioned correctly and emails from the contact are sent out using the notification configuration/template outlined in the article.
Please let us know if you need further help on this.
Thanks,
Perry