Skip to content

Commit

Permalink
Use arrays in the Icinga 2 example config
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner committed Nov 5, 2014
1 parent 45d3005 commit f659526
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .vagrant-puppet/files/etc/icinga2/conf.d/test-config.conf
Expand Up @@ -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
}
}

Expand All @@ -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

0 comments on commit f659526

Please sign in to comment.