email configuration

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sflennik
Posts: 3
Joined: Mon Feb 20, 2017 2:54 pm

email configuration

Post 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?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: email configuration

Post 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
...
}    	
Former Nagios employee
https://www.mcapra.com/
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: email configuration

Post 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
Be sure to check out the Knowledgebase for helpful articles and solutions!
sflennik
Posts: 3
Joined: Mon Feb 20, 2017 2:54 pm

Re: email configuration

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: email configuration

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked