File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,13 @@ $ScriptLock $0;
143143 :set Parent ($NetwatchNotify->$Parent->"parent");
144144 }
145145 }
146- $LogPrintExit2 [ $IfThenElse ($HostInfo->"no-down-notification" != true) info debug ] $0 \
147- ("The " . $Type . " '" . $Name . "' (" . $HostDetails . ") is down for " . \
148- $Metric->"count-down" . " checks, " . [ $IfThenElse ($ParentNotified = false) [ $IfThenElse \
149- ($Metric->"notified" = true) ("already notified.") ($CountDown - $Metric->"count-down" . \
150- " to go.") ] ("parent " . $Type . " " . $Parent . " is down.") ]) false;
146+ :if ($Metric->"notified" = false || $Metric->"count-down" % 120 = 0) do={
147+ $LogPrintExit2 [ $IfThenElse ($HostInfo->"no-down-notification" != true) info debug ] $0 \
148+ ("The " . $Type . " '" . $Name . "' (" . $HostDetails . ") is down for " . \
149+ $Metric->"count-down" . " checks, " . [ $IfThenElse ($ParentNotified = false) [ $IfThenElse \
150+ ($Metric->"notified" = true) ("already notified.") ($CountDown - $Metric->"count-down" . \
151+ " to go.") ] ("parent " . $Type . " " . $Parent . " is down.") ]) false;
152+ }
151153 :if ((($CountDown * 2) - ($Metric->"count-down" * 3)) / 2 = 0 && \
152154 [ :typeof ($HostInfo->"pre-down-hook") ] = "str") do={
153155 $NetwatchNotifyHook $Name $Type "pre-down" ($HostInfo->"pre-down-hook");
You can’t perform that action at this time.
0 commit comments