Help please: Local contact_groups variables not working
Posted: Thu Jan 26, 2012 2:33 pm
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
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.
Here's the "s-host" host template it's using, for reference:
Here's the next step up in the inheritance chain (contacts cfg)
.....And the corresponding contact definition:
* 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!
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
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!