#############################################################################################
# ICINGA TEST CONFIG BY ISSUES
# (c) 2009-2015 Icinga Development Team
#
# #1066
# Object Inheritance and Important values
#############################################################################################


define host{
	name				1066linux-server
	use				test-generic-host
	check_period			testconfig-24x7
	check_interval			5
	retry_interval			1
	max_check_attempts		10
        check_command           	testconfig-check-host-alive
	notification_period		testconfig-workhours
	notification_interval		120
	notification_options		d,u,r
	contact_groups			testconfig-group-admin
	register			0
}

define host{
        use                     	1066linux-server
        host_name               	1066localhost
        display_name            	1066display_localhost
        alias                   	1066localhost
        address                 	127.0.0.1
}


define contactgroup{
        contactgroup_name       	1stlevel
        alias                   	Icinga Administrators
        members                 	testconfig-admin
}

define contactgroup{
        contactgroup_name       	2ndlevel
        alias                   	Icinga Administrators
        members                 	testconfig-admin
}

define timeperiod{
        timeperiod_name 		1066notification_period
        alias           		24 Hours A Day, 7 Days A Week
        sunday          		00:00-24:00
        monday          		00:00-24:00
        tuesday         		00:00-24:00
        wednesday       		00:00-24:00
        thursday        		00:00-24:00
        friday          		00:00-24:00
        saturday        		00:00-24:00
        }


define command{
        command_name                    1066check_proc
        command_line                    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -C ido2db
}

### commands/default.cfg
define command {
	command_name 			check_cert
	command_line 			/usr/bin/sudo /usr/lib/nagios/plugins/check_cert -C $ARG1$ -w $ARG2$
}

define command {
	command_name 			1066check_dummy_custom
	command_line 			/usr/lib/nagios/plugins/check_dummy -H "$HOSTNAME$" -n "$ARG1$" -D "$ARG2$" -l "$ARG3$"
}

### servers/default.server.cfg
define service {
	name                           	1066default-servicecheck
	register                       	0
	service_description             ServiceCheck Template: default
	check_command                   1066check_dummy_custom!$SERVICEDESC$!$SERVICEDISPLAYNAME$!$LASTSERVICECHECK$
	max_check_attempts              3
	check_interval                  7
	retry_interval                  3
	active_checks_enabled           0
	check_period                    testconfig-24x7
	obsess_over_service             0
	check_freshness                 1
	event_handler_enabled           0
	notification_interval           10
	notification_period             1066notification_period
	contact_groups                  1stlevel,2ndlevel
}

### servers/defaults.cfg
define service {
	use                             1066default-servicecheck
	name                            proc:httpd
	service_description             sys[proc]: httpd
	check_command                   1066check_proc!$HOSTNAME$!httpd!1!200
	register                        0
}
define service {
	use                             1066default-servicecheck
	name                            cert:expiry
	register                        0
}

### servers/vs-9.cfg
#
define service {
	use                 		proc:httpd
	host_name           		1066localhost
}
#
define service {
	use                    		cert:expiry
	host_name              		1066localhost
	service_description    		cert[exp]: thomas-1.office.crt
	check_command          		check_cert!/vservers/thomas-1/etc/httpd/ssl.crt/thomas-1.office.crt!60
}
