On Fri, Mar 25, 2005 at 10:57:26PM -0300, Raul Dias wrote: > Is it possible to have an monitor to OR the hosts in a hostgroup and if > one SUCCEED the service is considered SUCCESS? > > An example for this is to have a hostgroup with a few internet hosts > and fping them. If one of them succeeds then the internet conection is > ok. Some may fail and the conection still be ok. > > However if all of them fails, then the internet conection is supposed to > be considered down.
Yes, you can do this, but you'll need to code it yourself in the monitor script. At the beginning of the script, get a count of the hosts being polled, then at the end of the script, count the failures - if you still have at least one host up, adjust the exit status appropriately. You could also write this as a wrapper script that would invoke the desired monitor script. Your wrapper would need to know something about the options syntax for the monitor script, but this could be done generically by passing the options or a flag of some kind (like "--") to the wrapper. _______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon