summaryrefslogtreecommitdiffstats
path: root/test/config/5872.conf
blob: 0405516e33752ffb611afeaba305fa1fbd1af5e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
object HostGroup "5872-windows-servers"{
  display_name = "5872-windows-servers"
  assign where match("5872-*", host.name)
}

apply Service "5872-ping4" {
  import "test-generic-service"
  check_command = "ping4"
  assign where match("5872-*", host.name)
}

object Host "5872-server" {
  import "test-generic-host"
  address = "192.168.1.5",
}

object Host "5872-pc" {
  import "test-generic-host"
  address = "192.168.1.101",
}

object Host "5872-router" {
  import "test-generic-host"
  address = "192.168.1.1",
}

object Host "5872-switch" {
  import "test-generic-host"
  address = "192.168.1.2",
}

apply Dependency "5872-host-switch" to Host {
  parent_host_name = "5872-router"
  disable_checks = true
  assign where host.name == "5872-switch"
}

apply Dependency "5872-host-pc" to Host {
  parent_host_name = "5872-switch"
  disable_checks = true
  assign where host.name == "5872-pc"
}

apply Dependency "5872-host-server" to Host {
  parent_host_name = "5872-switch"
  disable_checks = true
  assign where host.name == "5872-server"
}

apply Dependency "5872-service-switch" to Service {
  parent_host_name = "5872-router"
  parent_service_name = "5872-ping4"
  disable_checks = true
  assign where host.name == "5872-switch"
}

apply Dependency "5872-service-pc" to Service {
  parent_host_name = "5872-switch"
  parent_service_name = "5872-ping4"
  disable_checks = true
  assign where host.name == "5872-pc"
}

apply Dependency "5872-service-server" to Service {
  parent_host_name = "5872-switch"
  parent_service_name = "5872-ping4"
  states = [ Warning, Critical ]
  disable_checks = true
  assign where host.name == "5872-server"
}