The contact group is specified in a host template directive and the additional contact is defined in the service definition. But when there is a problem, only Joe receives a notification. Can someone please help me understand where I've gone wrong with the inheritance?
Code: Select all
# host templates
define host{
name generic-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_period 24x7
register 0
}
define host{
name linux-server
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period workhours
notification_interval 120
notification_options d,u,r
contacts +roddie
register 0
}
define host{
name rhel-server
use linux-server
hostgroups +rhel-servers
register 0
}
define host{
name appx-server
use rhel-server
action_url https://$HOSTNAME$.domain.com:1234/
hostgroups +appx-version2-servers
contact_groups appx
register 0
}
define host{
name appx-db-server
use appx-server
hostgroups +db-servers
register 0
}
define host{
name appx-int-server
use appx-db-server
notes App X Version 2 $_HOSTENV$ Integration Server
hostgroups +int-servers
register 0
}
define host{
name appx-test-server
hostgroups +test-servers
_env Test
register 0
}
# host definition
define host{
use appx-int-server,appx-test-server
host_name appx2inttest2
address 10.0.0.5
}
# service template
define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 3
check_interval 10
retry_interval 2
notification_options w,u,c,r
notification_interval 0
notification_period 24x7
register 0
}
# service definition
define service{
service_description Service X
servicegroups os-services,backup-services
hostgroup_name db-servers
use generic-service
check_command check_nrpe!check_servicex
contacts +joe
}
# contactgroup definition
define contactgroup{
contactgroup_name appx
alias App X
members roddie,tom,dick,harry
}