Help please: Local contact_groups variables not working

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.
Locked
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Help please: Local contact_groups variables not working

Post 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
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Forgot to mention my Nagios Core is Version 3.0.3
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Bump Sunday night.. anyone? Thanks
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Help please: Local contact_groups variables not working

Post by nscott »

Do you get any wanrings or errors when you do a

/etc/init.d/nagios checkconfig

?
Nicholas Scott
Former Nagios employee
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Hi NScott,
No it comes back clean..

/etc/init.d/nagios checkconfig
Running configuration check... OK.
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Bump... thanks for any help
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Bump Monday evening.... anyone?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Help please: Local contact_groups variables not working

Post 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.
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post by Sencha »

Thanks Jsmurphy, I appreciate your post.

Ok, I'll give your ideas a whirl. Very odd this problem...
Sencha
Posts: 8
Joined: Thu Jan 26, 2012 2:09 pm

Re: Help please: Local contact_groups variables not working

Post 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.
Locked