I would like to use the cluster-zone check on my master to check if any attached zone has issues.
While i can add the service statically for every new zone attached to the master (see example below), this solution doesn’t really scale if i want to add 200+ hosts:
apply Service “agent-health” {
check_command = “cluster-zone”
display_name = “cluster-health-” + host.name
vars.cluster_zone = “somehost01.example.com”
assign where host.vars.agent_endpoint == “master.example.com”
}
Is it possible to write this service with a logic that dynamically recognizes all zones attached to the master?