mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Use arrays in the Icinga 2 example config
This commit is contained in:
parent
45d3005f3c
commit
f6595267d6
@ -76,7 +76,7 @@ __function createService(service_type, num) {
|
||||
enable_active_checks = (service_type != "pending")
|
||||
vars.check_type = service_type
|
||||
|
||||
assign where match("*" + service_type + "*", host.vars.check_config)
|
||||
assign where service_type in host.vars.check_config
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,12 +102,12 @@ __function createHost(checkType, checkConfig, num, checkEnabled) {
|
||||
}
|
||||
|
||||
__for (num in range(10)) {
|
||||
createHost("ok", "ok", num, true)
|
||||
createHost("random", "random,flapping", num, true)
|
||||
createHost("down", "warning,critical", num, true)
|
||||
createHost("unreachable", "unknown", num, true)
|
||||
createHost("pending", "pending", num, false)
|
||||
createHost("flap", "flapping", num, true)
|
||||
createHost("ok", [ "ok" ], num, true)
|
||||
createHost("random", [ "random", "flapping" ], num, true)
|
||||
createHost("down", [ "warning", "critical" ], num, true)
|
||||
createHost("unreachable", [ "unknown" ], num, true)
|
||||
createHost("pending", [ "pending" ], num, false)
|
||||
createHost("flap", [ "flapping" ], num, true)
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user