#############################################################################################
# ICINGA TEST CONFIG BY ISSUES
# (c) 2009-2015 Icinga Development Team and Community Contributors
#
# #3441
# wrong escalation notification due to state based escalation range behaviour changes
#############################################################################################

# Check Command

define command {
        command_name                    3441check_dummy
        command_line                    /usr/lib/nagios/plugins/check_dummy $ARG1$
}



# Service Templates
define service {
        name       			3441pnp-svc
        register   			0
        action_url 			/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
}

define service {
        name                            3441domain-service
        check_interval                  5
        retry_interval                  1
        max_check_attempts              3
        notification_interval           5
        notification_options            w,c,r,s
        contact_groups                  3441dummy-group ;notification: dummy echo
        process_perf_data               1
        register                        0
}

define service {
        name                            3441domain-service-pnp
        use                             3441pnp-svc
        process_perf_data               1
        register                        0
}
define service {
        name                            3441domain-service-testconfig-24x7
        use                             3441domain-service
        check_period                    testconfig-24x7
        notification_period             testconfig-24x7
        register                        0
}

define service {
        name                            3441domain-service-passive-testconfig-24x7
        use                             3441domain-service-testconfig-24x7
        active_checks_enabled           0
        passive_checks_enabled          1
        initial_state                   o
        max_check_attempts              1
        check_command                   3441check_dummy!0 ;always return ok
        check_freshness                 0
        register                        0
}

define service {
        name                            3441domain-service-testconfig-24x7-5
        use                             3441domain-service-testconfig-24x7
        check_interval                  5
        notification_interval           5
        register                        0
}
define service {
        name                            3441domain-service-passive-testconfig-24x7-5
        use                             3441domain-service-testconfig-24x7-5,3441domain-service-passive-testconfig-24x7
        register                        0
}

define service {
        name                            3441domain-service-passive-pnp-testconfig-24x7-5
        use                             3441domain-service-passive-testconfig-24x7-5,3441domain-service-pnp
        register                        0
}

# Service itself
define service {
        use                             3441domain-service-passive-pnp-testconfig-24x7-5
        hostgroup_name                  3441domain-routers-cpds
        servicegroups                   3441domain-escalation
        service_description             3441Service Name
}

# Host

define host{
        name                            3441linux-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                             3441linux-server            ; Name of host template to use
        host_name                       3441localhost
        alias                           3441localhost
        address                         127.0.0.1
        address6                        ::1
	hostgroups			3441domain-routers-cpds
}

# Hostgroup
define hostgroup {
        hostgroup_name                  3441domain-routers-cpds
        alias                           3441domain-routers-cpds
}

# Service group for escalation
define servicegroup {
        servicegroup_name       	3441domain-escalation
        alias                   	3441ServiceGroup Name
        register                	0
}


# Contacts
define contact{
        contact_name                    3441testconfig-admin1
        use                             testconfig-generic-contact
        alias                           3441Icinga Test Admin
        email                           icinga@localhost        ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}

define contact{
        contact_name                    3441testconfig-admin2
        use                             testconfig-generic-contact
        alias                           3441Icinga Test Admin
        email                           icinga@localhost        ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}

define contact{
        contact_name                    3441testconfig-admin3
        use                             testconfig-generic-contact
        alias                           3441Icinga Test Admin
        email                           icinga@localhost        ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}

define contactgroup {
        contactgroup_name               3441domain-level1
        members                         3441testconfig-admin1
}

define contactgroup {
        contactgroup_name               3441domain-level2
        members                         3441testconfig-admin2
}

define contactgroup {
        contactgroup_name               3441domain-level3
        members                         3441testconfig-admin3
}

define contactgroup {
        contactgroup_name               3441dummy-group
#        members                         
}


# Escalation steps
define serviceescalation {
        servicegroup_name       	3441domain-escalation
        first_notification      	3
        last_notification       	0
        contact_groups          	3441domain-level1
}

define serviceescalation {
        servicegroup_name       	3441domain-escalation
        first_notification      	10
        last_notification       	0
        contact_groups          	3441domain-level2
}

define serviceescalation {
        servicegroup_name       	3441domain-escalation
        first_notification      	20
        last_notification       	0
        contact_groups          	3441domain-level3
}



