Email alerts going to 53 recipients

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Email alerts going to 53 recipients

Postby e2346437 » Tue Apr 02, 2013 8:22 pm

Hello,
Just put in a nice relaxing couple of hours getting Postfix to relay my Nagios alerts through an external email server. Problem is, Nagios is sending to 53 recipients even though my contacts.cfg only specifies my address in the admins group.

The addresses it's sending to are var@mydomain.net, root@mydomain.net, usr@mydomain.net...sys@, opt@, proc@...you get the drift. Basically, all the local accounts on my CentOS box. What is causing this and how to I fix?

Eric
e2346437
 
Posts: 5
Joined: Tue Apr 02, 2013 8:14 pm

Re: Email alerts going to 53 recipients

Postby slansing » Wed Apr 03, 2013 9:49 am

Lets start on the Nagios end, how do you have email notifications configured? Can you show us your contacts.cfg "blocking out sensitive information."

Also, it may be worth it to take a look at this guide and make sure that you covered everything already:

http://www.telnetport25.com/2012/02/con ... gios-core/
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Email alerts going to 53 recipients

Postby e2346437 » Wed Apr 03, 2013 4:17 pm

Only added my email address to contacts.cfg, didn't touch anything else.

###############################################################################
# CONTACTS.CFG - SAMPLE CONTACT/CONTACTGROUP DEFINITIONS
#
# Last Modified: 05-31-2007
#
# NOTES: This config file provides you with some example contact and contact
# group definitions that you can reference in host and service
# definitions.
#
# You don't need to keep these definitions in a separate file from your
# other object definitions. This has been done just to make things
# easier to understand.
#
###############################################################################



###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################

# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.

define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user

email me@mydomain.com <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}



###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################

# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
e2346437
 
Posts: 5
Joined: Tue Apr 02, 2013 8:14 pm

Re: Email alerts going to 53 recipients

Postby scottwilkerson » Wed Apr 03, 2013 4:32 pm

Can you post your generic-contact template along with the configs for the commands that it has specified for host_notification_commands & service_notification_commands

Also, can you verify that it is the nagios message that is being sent to them and not some bounce-back
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18435
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Email alerts going to 53 recipients

Postby e2346437 » Thu Apr 04, 2013 12:18 pm

I think this is what you are looking for. hawkeye.cfg is the local Nagios host, and it had been throwing an HTTP warning even though HTTP is working fine. I just removed that check, but that is one of the errors that was creating the alerts to all the accounts on that server.

The message is in fact going to all 53 recipients. When I tail the maillog, and an alert goes out, there are 53 separate emails generated.

Eric
e2346437
 
Posts: 5
Joined: Tue Apr 02, 2013 8:14 pm

Re: Email alerts going to 53 recipients

Postby e2346437 » Thu Apr 04, 2013 12:21 pm

Seems like Upload attachment didn't work...here is a dropbox link to a zipped archive containing the 4 config files https://dl.dropbox.com/u/31616175/Archive.zip
e2346437
 
Posts: 5
Joined: Tue Apr 02, 2013 8:14 pm

Re: Email alerts going to 53 recipients

Postby scottwilkerson » Thu Apr 04, 2013 4:58 pm

So the nagios admin contact is set to deliver mail to me@domain.local? is that really in there or did you place it there to obfuscate the real value? Also, you didn't include the commands file so we can see what notify-service-by-email and notify-host-by-email are set to
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18435
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Email alerts going to 53 recipients

Postby e2346437 » Thu Apr 04, 2013 7:42 pm

I put that address there to obfuscate the real value, but that's the only thing I changed.

commands.txt is attached.

Eric
Attachments
commands.txt
(7.86 KiB) Downloaded 255 times
e2346437
 
Posts: 5
Joined: Tue Apr 02, 2013 8:14 pm

Re: Email alerts going to 53 recipients

Postby abrist » Mon Apr 08, 2013 2:30 pm

Your email commands are correct. Can you post a tail of the maillog and of /usr/local/nagios/var/nagios.log?
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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm


Return to Community Support

Who is online

Users browsing this forum: Google [Bot] and 34 guests