2 object HostGroup "5872-windows-servers"{
3 display_name = "5872-windows-servers"
4 assign where match("5872-*", host.name)
7 apply Service "5872-ping4" {
8 import "test-generic-service"
9 check_command = "ping4"
10 assign where match("5872-*", host.name)
13 object Host "5872-server" {
14 import "test-generic-host"
15 address = "192.168.1.5",
18 object Host "5872-pc" {
19 import "test-generic-host"
20 address = "192.168.1.101",
23 object Host "5872-router" {
24 import "test-generic-host"
25 address = "192.168.1.1",
28 object Host "5872-switch" {
29 import "test-generic-host"
30 address = "192.168.1.2",
33 apply Dependency "5872-host-switch" to Host {
34 parent_host_name = "5872-router"
36 assign where host.name == "5872-switch"
39 apply Dependency "5872-host-pc" to Host {
40 parent_host_name = "5872-switch"
42 assign where host.name == "5872-pc"
45 apply Dependency "5872-host-server" to Host {
46 parent_host_name = "5872-switch"
48 assign where host.name == "5872-server"
51 apply Dependency "5872-service-switch" to Service {
52 parent_host_name = "5872-router"
53 parent_service_name = "5872-ping4"
55 assign where host.name == "5872-switch"
58 apply Dependency "5872-service-pc" to Service {
59 parent_host_name = "5872-switch"
60 parent_service_name = "5872-ping4"
62 assign where host.name == "5872-pc"
65 apply Dependency "5872-service-server" to Service {
66 parent_host_name = "5872-switch"
67 parent_service_name = "5872-ping4"
68 states = [ Warning, Critical ]
70 assign where host.name == "5872-server"