[Mon-commit] mon mon,1.18,1.19
Brought to you by:
trockij
From: David N. <vi...@us...> - 2005-11-10 23:30:46
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21884 Modified Files: mon Log Message: Bug fixes from Ed Ravin for ack alerts Fixed options parsing to make debug switch (-d) incrementable. i.e '-d -d' will set it to 2, which was the expected behavior. Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mon 7 Nov 2005 15:37:13 -0000 1.18 --- mon 10 Nov 2005 23:30:39 -0000 1.19 *************** *** 218,222 **** b|basedir=s c|configfile=s ! d|debug f|fork h|help --- 218,222 ---- b|basedir=s c|configfile=s ! d|debug+ f|fork h|help *************** *** 668,677 **** # ! # skip upalerts not paired with down alerts # disable by setting "no_comp_alerts" in period section # ! if (!$pref->{"no_comp_alerts"} && ($flags & $FL_UPALERT) && !$pref->{"_alert_sent"}) { ! syslog ('debug', "$group/$service/$periodlabel: Suppressing upalert since no down alert was sent."); next; } --- 668,678 ---- # ! # skip upalerts/ackalerts not paired with down alerts # disable by setting "no_comp_alerts" in period section # ! if (!$pref->{"no_comp_alerts"} && ($flags & ($FL_UPALERT | $FL_ACKALERT)) && !$pref->{"_alert_sent"}) { ! syslog ('debug', "$group/$service/$periodlabel: Suppressing upalert since no down alert was sent.") if ($flags & $FL_UPALERT); ! syslog ('debug', "$group/$service/$periodlabel: Suppressing ackalert since no down alert was sent.") if ($flags & $FL_ACKALERT); next; } *************** *** 3363,3366 **** --- 3364,3369 ---- || (($tmnow - $sref->{"_first_failure"}) >= $sref->{"upalertafter"})))) { + # Save the last failing monitor's output for posterity + $sref->{"_upalertoutput"}= $sref->{"_last_output"}; do_alert ($group, $service, $sref->{"_upalertoutput"}, 0, $FL_UPALERT); } |