--On Friday, March 25, 2005 10:57 PM -0300 Raul Dias <[EMAIL PROTECTED]> wrote:


Sorry if this is covered in the docs and I missed.

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.

Did I miss something?




Is this possible? Yes. It needs to be a feature of whatever monitor script you're using.

Are there any monitor scripts that do this now? Yes.

If you pass '-a' to fping.monitor it will report failure only if all hosts fail to respond.

Another approach is to add a threshold argument to the monitor script that causes it to allow that many hosts to be down before signaling an error. I already have a modified version of fping.monitor that does essentially that, except it exits with different error codes depending upon the number of failures. i.e. if I set the threshold to 1 then if more then one host fails to respond the script returns 255. I suppose I could just commit those changes back to the main mon version, since they're entirely optional additional features, but for now that version is available at:
<https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/netsage/mon/mon.d/fping.monitor?rev=1.9&content-type=text/x-cvsweb-markup>


-David


David Nolan <*> [EMAIL PROTECTED] curses: May you be forced to grep the termcap of an unclean yacc while a herd of rogue emacs fsck your troff and vgrind your pathalias!

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to