On Fri, 18 May 2007, Ed Ravin wrote: > I have something like this in my Mon config: > > hostgroup misc_hosts fnord > > hostgroup herd_hosts fnord word bord lord dord > > When I try to disable fnord in mon.cgi - it doesn't get disabled - > instead the hostgroup misc_hosts gets disabled. I think this code > is to blame:
... > Note how if a host is in a "singleton group" that watch gets disabled, > and then the code assumes there's nothing more to do, even though the > host might be in another group as well. I think the intended behavior of host_singleton_group is when given a host, to report if there is a group which has only that host as a member, which are groups typically created automatically by making a "watch xyz" when there is not a hostgroup named "xyz" defined elsewhere. When you do "disable host", it then disables the associated watch for these "singelton groups". David should be able to confirm whether that is what he intended. The problem was that it would not disable hosts in hostgroups if it found that the host was the only member of some other hostgroup. I made a change which fixes that, and also made host_singleton_group find all groups with only that host as a member (which is probably an unlikely case). This fix is in CVS, in the mon-1-2-branch. _______________________________________________ mon mailing list [email protected] http://linux.kernel.org/mailman/listinfo/mon
