Alerts going to the wrong mailing group?


#1

All,

I’m new to Nagios so please bear with me. I have a specific mailing address that I want a certain group of servers to alert to, but the alerts are going to the wrong mailing address.

my contacts.cfg file is configured as follows:

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

    email                           [dtvalerts@xxxx.com](mailto:dtvalerts@xxxx.com)	; <<***** CHANGE THIS TO YOUR EMAIL 

ADDRESS ******
}

define contact{
contact_name cacssupport ; Short name of user
use generic-contact ; Inherit default values from generi
c-contact template (defined above)
alias CACS Support ; Full name of user

    email                           [cacs_support@xxxx.com](mailto:cacs_support@xxxx.com)	; <<***** CHANGE THIS TO YOUR EMAIL 

ADDRESS ******
}

define contact{
contact_name system.dbalerts ; Short name of user
use generic-contact ; Inherit default values from generi
c-contact template (defined above)
alias DB Alerts ; Full name of user

    email                           [system.dbalerts@xxxx.com](mailto:system.dbalerts@xxxx.com)	; <<***** CHANGE THIS TO YOU

R EMAIL ADDRESS ******
}

define contact{
contact_name netc.alerts ; Short name of user
use generic-contact ; Inherit default values from generi
c-contact template (defined above)
alias Netcredit Alerts ; Full name of user

    email                           [netc.alerts@xxxx.com](mailto:netc.alerts@xxxx.com)	; <<***** CHANGE THIS TO YOUR EMAIL 

ADDRESS ******
}

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}

define contactgroup{
contactgroup_name cacs_ops
alias CACS Operators
members cacssupport
}

define contactgroup{
contactgroup_name dba
alias Oracle Operators
members system.dbalerts
}

define contactgroup{
contactgroup_name netcredit
alias Netcredit Operators
members netc.alerts
}

From above, anything in my server group that is to alert to the “netcredit” group goes to (I’m assuming) the defualt “dtvalerts” group. The other 2 mailing lists work perfectly fine. Below is an example of one of my server.cfg files with the mailing group specified.

define host{
use windows-server ; Inherit default values from a template
host_name netcwls1
alias netcwls1
address 192.168.x.x
contact_groups netcredit
}

Can anyone explain to me why this isn’t working or what I’m missing? Any assistance is greatly appreciated!**


#2

Hi,

It is my understanding that Nagios doesn’t default to anything. It will notify the groups or contacts that you specify, and that’s it. Can you confirm that your emails are “defaulting” to another contact? Also, do you get any feedback when you verify your configuration files? The only other thing I can think of is that you are overriding the contact or host information in a different configuration file. Nagios allows this, but should provide a warning when you verify your configuration. Check on that, and find out EXACTLY where your emails are going (if they are being sent at all). The more information you provide, the better we will be able to help you. Let us know.

Regards

Chris