Notifications by hostgroup_name
Posted: Mon Jun 04, 2012 5:40 pm
Nagios core 3. We are looking at various ways to narrow down the notifications we're receiving.
How do we add service notifications to services associated with a given host group without duplicating every service for that host group? We don't want to send notifications for every host group; for now, just one; later, a selected list.
It seems that to do what we want is to have the full compliment of services defined for every service for every group to which we want notifications. This would mean a huge jump in the number of service definitions with the associated problematic overlap and increased editing that might occur when adding/removing objects.
I suppose I want to find the method to add a service notification (or contact_groups) to a hostgroup_name definition. Another way of looking at it is that we don't want to know about all our hard disks, just the ones associated with a hostgroup_name (a group of hosts).
We have service groups that are simply hollow definitions:
We have host groups (defined via simple regex):
We have services that refer to the multiple host groups:
generic-service defines the contact_group, etc...
Thanks for any tips...
How do we add service notifications to services associated with a given host group without duplicating every service for that host group? We don't want to send notifications for every host group; for now, just one; later, a selected list.
It seems that to do what we want is to have the full compliment of services defined for every service for every group to which we want notifications. This would mean a huge jump in the number of service definitions with the associated problematic overlap and increased editing that might occur when adding/removing objects.
I suppose I want to find the method to add a service notification (or contact_groups) to a hostgroup_name definition. Another way of looking at it is that we don't want to know about all our hard disks, just the ones associated with a hostgroup_name (a group of hosts).
We have service groups that are simply hollow definitions:
Code: Select all
define servicegroup {
servicegroup_name HDPartition1
alias Hard Disk Partitions 1
}Code: Select all
define hostgroup{
hostgroup_name c_dev2 ; The name of the hostgroup
alias Devlopment II ; Long name of the group
members \.dev2\.
}Code: Select all
define service{
use generic-service
hostgroup_name hostgroup1, hostgroup2, c_dev2
servicegroups HDPartition1
service_description HD Partition 1
check_command check_nrpe!check_sda1
}Thanks for any tips...