Page 1 of 1

Help please: Local contact_groups variables not working

Posted: Thu Jan 26, 2012 2:33 pm
by Sencha
Hello forum!

I spent several days tshooting this one with no luck. Also had someone else on my team verify my config. Google/etc
Maybe someone here can solve this mystery?

For some reason, a local contact_groups variable that I've recently added to one of our host definitions is not working.
Our usual inherited contacts all receive Nagios email notifications fine for this host, but only the new contact_groups group I added does not.
I've added other local contact_groups in the past, and they've worked fine. Just this one is not working, grr :evil:


Here's the host definition for the host with my revised contacts_group variable:
Note: "admins" is our usual contact group (the one that's working fine); "DV_team" is the new one I added, which is NOT working.

Code: Select all

define host{
        use             s-host
        contact_groups  DV_team,admins    <---- THIS IS THE LINE I'VE MODIFIED. I ADDED "DV_team"
        host_name       yadda
        alias           Some Text
        address         yadda.mydomain.com
        }

Here's the "s-host" host template it's using, for reference:

Code: Select all

define host{
        name                    s-host ; Name of this template
        use                     generic-host ; Inherit default values
        check_period            24x7
        check_interval          5
        retry_interval          1
        max_check_attempts      10
        check_command           check-host-alive
        notification_period     24x7
        notification_interval   1440
        notification_options    d,r
        contact_groups          admins
        register                0 ; DONT REGISTER THIS - ITS A TEMPLATE
}

Here's the next step up in the inheritance chain (contacts cfg)

Code: Select all

define contactgroup {
        contactgroup_name       DV_team
        alias                   DV Team
        members                 dv_members
        }

.....And the corresponding contact definition:

Code: Select all

define contact {
                        contact_name                            dv_members
                        use                                     generic-contact
                        alias                                   DV Team members
                        host_notification_options               d,u,r
                        service_notification_options            w,u,c,r
                        email                                   [email protected]    <--- I'VE VERIFIED THIS EMAIL ADDRESS WORKS FINE.
                        }

* I checked my "generic-contact" template and there's nothing custom in there, regarding contacts or groups.
If needed, I can paste the contents of that file to this thread.

More info/attempts:
The new contact group I'm trying to add is an internal distribution list address. I've verified the Linux server that hosts our Nagios can send emails to this DL fine (using the "mail" command in bash)
When I check the Nagios logs, I see the emails are indeed going to our usual contacts, but Nagios never tries to include my new DL address in the notifications. It's like it's ignoring my local variable.
So it's not an email/firewall/DL issue, but somewhere in the inheritance VS local variable Contact_Groups chain I feel.


Thanks for ANY help! :D

Re: Help please: Local contact_groups variables not working

Posted: Thu Jan 26, 2012 4:20 pm
by Sencha
Forgot to mention my Nagios Core is Version 3.0.3

Re: Help please: Local contact_groups variables not working

Posted: Sun Jan 29, 2012 9:01 pm
by Sencha
Bump Sunday night.. anyone? Thanks

Re: Help please: Local contact_groups variables not working

Posted: Mon Jan 30, 2012 2:32 pm
by nscott
Do you get any wanrings or errors when you do a

/etc/init.d/nagios checkconfig

?

Re: Help please: Local contact_groups variables not working

Posted: Mon Jan 30, 2012 2:35 pm
by Sencha
Hi NScott,
No it comes back clean..

/etc/init.d/nagios checkconfig
Running configuration check... OK.

Re: Help please: Local contact_groups variables not working

Posted: Tue Jan 31, 2012 9:30 pm
by Sencha
Bump... thanks for any help

Re: Help please: Local contact_groups variables not working

Posted: Mon Feb 06, 2012 7:57 pm
by Sencha
Bump Monday evening.... anyone?

Re: Help please: Local contact_groups variables not working

Posted: Tue Feb 07, 2012 5:21 pm
by jsmurphy
Based on the information you've provided this one has me a bit stumped, I've never seen behaviour like that before... about all I can suggest is find out what happens if you only have DV_Teams defined? Even though Nagios isn't displaying anything check the mail logs and see if that has anything related at all.

Re: Help please: Local contact_groups variables not working

Posted: Tue Feb 07, 2012 5:44 pm
by Sencha
Thanks Jsmurphy, I appreciate your post.

Ok, I'll give your ideas a whirl. Very odd this problem...

Re: Help please: Local contact_groups variables not working

Posted: Mon Mar 05, 2012 8:03 pm
by Sencha
Figured out my problem. I just needed some quiet time to sit down and stare at the problem without interruption.
It was quite simple actually...

I had neglected to add the new contactgroup name to the "contact_groups" list in the toplevel "templates.cfg" file in the inheritance chain.
Now everything is working as desired.

Thanks for the attempts at help guys...appreciate it.