Page 1 of 2

Mail only sent to nagiosadmin

Posted: Wed May 28, 2014 12:07 am
by adriang
Hi

I add a new contact / contactgroup to objects/contacts.cfg and modify two of the hosts to send email to the new contact.
Here is the host config:
## Default
define host{
use cust ; Inherit default values from a template
host_name ptce2 ; The name we're giving to this server
alias ptce2 ; A longer name for the server
address ptce2.domain ; IP address of Remote Linux host
contact_groups fit,admins
}

Unfortunately the mails are only sending to admins contact_groups.
I also check maillog and I see only the nagiosadmin email.
I also check the config files via the web (System/Configuratuon) and it looks O.K.

Thanks advance for the help

Adrian :cry:

Re: Mail only sent to nagiosadmin

Posted: Wed May 28, 2014 9:26 am
by tmcdonald
Did you restart nagios after making the changes? You will need to run "service nagios restart" in order for nagios to pick up the changes.

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 1:49 am
by adriang
Thanks for the answer.

Sure I restart, belive my I check evrything before I post the problem.
I don't have any ideay what's wrong here because when I check the config files via the web (System/Configuratuon) it looks right.

Adrian

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 6:49 am
by eloyd
contact_groups fit,admins
Can you show where you are defining the fit contact group? Are other services/hosts using this contact group? If so, are they receiving notifications?

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 7:09 am
by adriang
Thanks for the replay

The "fit" group is defined in the /usr/local/nagios/etc/objects/contacts.cfg file.
This is a new nagios install with only 2 remote servers, and the both are not receiving notification.
I stop adding hosts because this problem.

Adrian

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 7:14 am
by eloyd
Then it looks like your problem is with the fit contact group. Are you able to post your contacts.cfg file?

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 7:25 am
by adriang
Sure, /usr/local/nagios/etc/objects/contacts.cfg is attached

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 12:51 pm
by slansing
That looks fine, unless something is wrong with your generic-contact template, which would probably mean nagiosadmin is not being alerted as well, that does not seem to be the case if that contact is receiving notifications.

The next thing to check is to make sure that the address of your contact which is assigned to the "FIT" group is not blocking the emails, we should also check your mail-log. Navigate to one of your hosts/services which has the FIT contact group assigned, or rachel for that matter since that is the only member. Once you are at the details page of that host/service object, send custom notification, here, send out a notification and then tail the maillog to see if it was sent to that contact's address, please share the mail-log tail with us and block out personal email addresses. Let us know the time you send the notification command as well.

Code: Select all

tail -50 /var/log/maillog

Re: Mail only sent to nagiosadmin

Posted: Thu May 29, 2014 10:48 pm
by adriang
Thanks for the answer.
Belive me, I check everything before I post the problem, the maillog is empty, this means that I only have the nagiosadmin email.

The "send custom notification" is working, fit and admins are getting the mail.

Adrian

Re: Mail only sent to nagiosadmin

Posted: Fri May 30, 2014 1:46 pm
by abrist
Could you post the output of your maillog (feel free to obfuscate):

Code: Select all

tail -30 /var/log/maillog