Page 1 of 1
email configuration
Posted: Mon Feb 20, 2017 6:37 pm
by sflennik
A person on our team is getting nagios email notifications. I matched my config to their's in the client.cfg file and reloaded nagios. However, I'm not getting any emails. I used /bin/mail from the command line to send email to myself and that worked. Is there some other config that I need to change to receive emails?
Re: email configuration
Posted: Tue Feb 21, 2017 11:39 am
by mcapra
Have you verified your host/service definitions include the appropriate settings for the
contacts/
contact_groups directive? Like so:
Code: Select all
define host {
...
contacts nagiosadmin,contact1,contact2
contact_groups my_big_contact_group
...
}
Re: email configuration
Posted: Tue Feb 21, 2017 11:43 am
by bwallace
Also, refer to this doc on configuring new contacts / notifications in Nagios Core:
http://www.thegeekstuff.com/2009/06/4-s ... ification/
If you're not concerned about contact groups then the basic steps are (after you've defined a 'generic-contact' template, see link above):
- Define Individual contacts in contacts.cfg
/usr/local/nagios/etc/objects/contacts.cfg
- Attach Indivual Contacts to Service and Host definitions
Re: email configuration
Posted: Fri Feb 24, 2017 6:53 pm
by sflennik
Thanks for the responses.
My configuration was OK. My confusion was that I thought you should get emails for the existing errors everytime the error is found. I now know that there is a lot more configuration to control how emails are sent out so you are not flooded with errors that you already know about.
This page was helpful for me:
https://assets.nagios.com/downloads/nag ... tions.html
Re: email configuration
Posted: Mon Feb 27, 2017 10:41 am
by dwhitfield
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!