#############################################################################################
# ICINGA TEST CONFIG BY ISSUES
# (c) 2009-2015 Icinga Development Team and Community Contributors
#
# #1367
# add notifications to stalking hosts/services, not only logging/event handlers
#############################################################################################

# templates
define contact{
        name                            	generic-contact-1367         ; The name of this contact template
        service_notification_period     	testconfig-24x7                    ; service notifications can be sent anytime
        host_notification_period        	testconfig-24x7                    ; host notifications can be sent anytime
        service_notification_options    	w,u,c,r,f,s             ; send notifications for all service states, flapping events, and scheduled downtime events
        host_notification_options       	d,u,r,f,s               ; send notifications for all host states, flapping events, and scheduled downtime events
        service_notification_commands   	testconfig-notify-service-by-email ; send service notifications via email
        host_notification_commands      	testconfig-notify-host-by-email    ; send host notifications via email
        register                        	0                       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
        }

define host{
	name                           		test-generic-host-1367
	check_interval                 		1
	check_period                   		testconfig-24x7
	event_handler_enabled          		1
	failure_prediction_enabled     		1
	flap_detection_enabled         		1
	max_check_attempts             		5
	notification_interval          		0
	notification_options           		d,u,r,f
	notification_period            		testconfig-24x7
	notifications_enabled          		1
	process_perf_data              		1
	register                       		0
	retain_nonstatus_information   		1
	retain_status_information      		1
	retry_interval                 		1
}

define service{
	name                           		test-generic-service-1367
	active_checks_enabled          		1
	check_freshness                		0
	check_interval                 		1
	check_period                   		testconfig-24x7
	event_handler_enabled          		1
	failure_prediction_enabled     		1
	flap_detection_enabled         		1
	is_volatile                    		0
	max_check_attempts             		3
	notification_interval          		0
	notification_options           		w,u,c,r,f
	notification_period            		testconfig-24x7
	notifications_enabled         		1
	obsess_over_service            		1
	parallelize_check              		1
	passive_checks_enabled         		1
	process_perf_data              		1
	register                       		0
	retain_nonstatus_information   		1
	retain_status_information      		1
	retry_interval                 		1
}



# hosts

define host{
	use                            		test-generic-host-1367
	host_name                      		1367_host_001
	address                        		127.0.0.1
	alias                          		1367_up_001
	check_command                  		testconfig-check-host-alive!up
	check_period                   		testconfig-24x7
	# stalk it ok, down, up
	stalking_options		 	o,d,u
	# simulate passive check with output change only
	active_checks_enabled		 	0
	passive_checks_enabled         		1
	# set special contactgroup
	contact_groups                 		test_group_1367_hosts
}


# services

define service{
	service_description            		1367_ok_01
	host_name                      		1367_host_001
	use                            		test-generic-service-1367
	check_command                  		testconfig-check_service!ok
	# stalk it ok, warning, unknown, critical
	stalking_options		 	o,w,u,c
	# simulate passive check with output change only
	active_checks_enabled		 	0
	passive_checks_enabled         		1
	# set special contactgroup
	contact_groups                 		test_group_1367_services
}

define service{
	service_description            		1367_ok_02
	host_name                      		1367_host_001
	use                            		test-generic-service-1367
	check_command                  		testconfig-check_service!ok
	# stalk it ok, warning, unknown, critical
	stalking_options               		o,w,u,c
	#stalking_options               	w,u,c
	# simulate passive check with output change only
	active_checks_enabled          		0
	passive_checks_enabled         		1
	# set special contactgroup
	contact_groups                 		test_group_1367_services
}



# contacts
define contactgroup{
        contactgroup_name       		test_group_1367_hosts
        alias                   		stalking notifications test
        members                 		testconfig-test_contact_1367_stalk_all,testconfig-test_contact_1367_stalk_hosts
}

define contactgroup{
        contactgroup_name       		test_group_1367_services
        alias                   		stalking notifications test
        members                 		testconfig-test_contact_1367_stalk_all,testconfig-test_contact_1367_stalk_services
}



define contact{
	contact_name				testconfig-test_contact_1367_stalk_all
	use					generic-contact-1367
	alias					1367_stalk_all
	email					root@localhost
}

define contact{
	contact_name				testconfig-test_contact_1367_stalk_hosts
	use					generic-contact-1367
	alias					1367_stalk_all
	email					root@localhost
}

define contact{
	contact_name				testconfig-test_contact_1367_stalk_services
	use					generic-contact-1367
	alias					1367_stalk_all
	email					root@localhost
}
