Mail only sent to nagiosadmin

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.
User avatar
adriang
Posts: 9
Joined: Tue May 27, 2014 11:59 pm

Mail only sent to nagiosadmin

Post 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:
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Mail only sent to nagiosadmin

Post 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.
Former Nagios employee
User avatar
adriang
Posts: 9
Joined: Tue May 27, 2014 11:59 pm

Re: Mail only sent to nagiosadmin

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Mail only sent to nagiosadmin

Post 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?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
adriang
Posts: 9
Joined: Tue May 27, 2014 11:59 pm

Re: Mail only sent to nagiosadmin

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Mail only sent to nagiosadmin

Post by eloyd »

Then it looks like your problem is with the fit contact group. Are you able to post your contacts.cfg file?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
adriang
Posts: 9
Joined: Tue May 27, 2014 11:59 pm

Re: Mail only sent to nagiosadmin

Post by adriang »

Sure, /usr/local/nagios/etc/objects/contacts.cfg is attached
Attachments
contacts.cfg
(2.59 KiB) Downloaded 477 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Mail only sent to nagiosadmin

Post 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
User avatar
adriang
Posts: 9
Joined: Tue May 27, 2014 11:59 pm

Re: Mail only sent to nagiosadmin

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Mail only sent to nagiosadmin

Post by abrist »

Could you post the output of your maillog (feel free to obfuscate):

Code: Select all

tail -30 /var/log/maillog
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked