Sending Email Alerts to Contacts
Sending Email Alerts to Contacts
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
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
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.
Code: Select all
grep -Eir "yourcontact@emailaddresshere.com" /usr/local/* -A 22 -B 22 > /tmp/results.txt
Thanks,
Perry
-
- Posts: 96
- Joined: Tue Jan 26, 2016 5:29 pm
Re: Sending Email Alerts to Contacts
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
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
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
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