Is there a way to use hostgroups within a check_cluster --service
check?
I've only seen examples that list out each host in the cluster individually like this:
define service{
...
check_command check_service_cluster!"Foo Cluster"!0!1!$SERVICESTATEID:host1:DNS Service$,$SERVICESTATEID:host2:DNS Service$,$SERVICESTATEID:host3:DNS Service$
...
}
But this seems very unwieldy for large clusters. Is there a way to pass it a whole hostgroup directly, $SERVICESTATEID:dns_hostgroup
?
There is no way to use hostgroups or servicegroups with this plugin, unfortunately.
However: new versions of the plugins support using an extra config ("ini") file. So you could write a script to take a host/servicegroup, look up everything in it, and generate a conf file from that.
Or, you might want to look at check_multi instead. It's much better at this sort of thing, and it's easy to generate its conf via a script.