Page 1 of 1

Service Definition inheritance

Posted: Wed Feb 18, 2015 6:07 pm
by stecino
Hello,

I have the following template:

define service{
name misc-services
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 0
check_freshness 0
notifications_enabled 1
notification_interval 4
notification_period 24x7
notification_options w,u,c,r
contact_groups misc
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
max_check_attempts 1
check_period 24x7
normal_check_interval 3
retry_check_interval 1
action_url /graphs/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/graphs/popup?host=$HOSTNAME$&srv=$SERVICEDESC$'
register 0
}

This is my service definition using above template

define service{
use misc-services
host_name nagios
service_description Check DEN2 DB Connection By Node and User
check_command check_conn_by_node_user!SDEN_NNS
contact_groups apps
}

My question is the following: will contact_groups apps overwrite the contact_groups misc ?

Thanks in advance

Re: Service Definition inheritance

Posted: Wed Feb 18, 2015 10:26 pm
by Box293
stecino wrote:My question is the following: will contact_groups apps overwrite the contact_groups misc ?
Yes.

However if you define your service definition like so:

Code: Select all

contact_groups +apps
Then both groups will be used, this is called additive in Nagios.