Notification Configuration Question


#1

Currently I have a single contacts.cfg file. From one I can see, it appears that it’s split up into 2 sections. The top half lists that Contacts and the bottom half lists the Contact_Groups.

Initially I had only 1 Contact and 1 Contact Group configured in this file and all hosts in the hosts.cfg file where configured so that Nagios would notify this single Contact Group. This has worked as it should for the last year.

Now, I have created 2 additional Contacts and 2 additional Contact Groups in this contacts.cfg file. Also, I’ve changed the contact_groups option for one of my hosts and pointed it to one of the new Contact Groups. However, when this host fails a check an email continues to be sent to my original group whose members are not suppose to receive notifications for this host. Nobody in the Contact Group that is supposed to get the email notification receives it.

Below is a sample of my contacts.cfg:

define contact{
contact_name DB
alias DB
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email user@mydomain.com
}

define contactgroup{
contactgroup_name test
alias Test
members root, DB
}

Sample of hosts.cfg:

define host{
use generic-host ; Name of host template to use

    host_name                           computername

alias NT Server #1

    address                                192.168.30.110

check_command check-host-alive

    contact_groups                    test
    max_check_attempts            10
    notification_interval             120
    notification_period               24x7
    notification_options              d,u,r
    }

Thanks for any assistance.

Wanabe


#2

I don’t see anything at this point. Did you reload nagios after you made the changes?


#3

Thanks jakkedup.

Yes, as always, I restarted Nagios after I made this change. Please let me know if you think of anything else I could try.

Best,
Wanabe


#4

Notice I said reload nagios.
Never use the restart function. I think what has happened is that you are still using the old configs, because the old nagios process is still running.
So, again, never ever use restart.
/etc/rc.d/init.d/nagios stop
ps -ef |grep nagios
kill any that remain
verify with another
ps -ef |grep nagios
/etc/rc.d/init.d/nagios start
In the future, when you make a config change use:
/etc/rc.d/init.d/nagios reload