--On Tuesday, March 29, 2005 11:25 AM +0200 Anquijix Schiptara <[EMAIL PROTECTED]> wrote:
if i start heartbeat, all services get up without any problems. now i want to test mon, if it tries to restart the httpd-service, if i stop it. mon sees, that the service isnt running anymore, but it automatically calls the bring-ha-down.alert script in RESTART_FAILED period instead of the restart-httpd script in the RESTART period. if i comment out the RESTART_FAILED entries, it works with restarting the service. the funny thing is, this configuration worked the first time i used it, but not the next few times. and i got the examples from a linux-magazine, which should work.
You have two periods defined. Neither period has an alertafter entry, so *BOTH* alerts will be called when a failure occurs. Which one is run first is random chance (probably based on the random order from a hash table key lookup.)
If you want one to be called before the other you should put alertafter definitions in both periods. I suggest something like:
period ATTEMPT_RESTART_FIRST: alert httpd_restart.alert alertafter 2 alertevery 30s period RESTART_FAILED: alert bring-ha-down.alert ... alertafter 1m alertevery 1m
You also might want an upalert entry in the second period that would bring the heartbeat service back up.
-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