On Mon, 10 Dec 2007, Jacques Klein wrote:
> also "dep_behavior = hm"
> I am using mon-1.2.0 where I added
>
> shows that$sref->{"_last_failure_time"} is used but never set .
>
Try this patch and let me know if it helps:
--- mon 2007-12-10 13:35:43.0 -0500
+++ mon-dep 2007-12-10 13:38:48.0 -0500
@@ -1392,6 +1392,7 @@
$sref->{"_start_of_monitor"} = time if
(!defined($sref->{"_start_of_monitor"}));
$sref->{"_alert_count"} = 0 if
(!defined($sref->{"_alert_count"}));
$sref->{"_last_failure"} = 0 if
(!defined($sref->{"_last_failure"}));
+ $sref->{"_last_failure_time"} = 0 if
(!defined($sref->{"_last_failure_time"}));
$sref->{"_last_success"} = 0 if
(!defined($sref->{"_last_success"}));
$sref->{"_last_trap"} = 0 if (!defined($sref->{"_last_trap"}));
$sref->{"_last_traphost"} = '' if
(!defined($sref->{"_last_traphost"}));
@@ -3287,6 +3288,7 @@
$sref->{"_failure_count"}++;
$sref->{"_consec_failures"}++;
$sref->{"_last_failure"} = $tmnow;
+ $sref->{"_last_failure_time"} = $tmnow; # used by the "dep_memory"
option
if ($sref->{"_op_status"} == $STAT_OK ||
$sref->{"_op_status"} == $STAT_UNKNOWN ||
$sref->{"_op_status"} == $STAT_UNTESTED)
___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon