diff options
Diffstat (limited to 'netwatch-notify')
-rw-r--r-- | netwatch-notify | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netwatch-notify b/netwatch-notify index eecfa9f..966d415 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -117,6 +117,9 @@ $Metric->"count" . " checks, " . [ $IfThenElse ($ParentNotified = false) [ $IfThenElse \ ($Metric->"notified" = true) ("already notified.") ($Count - $Metric->"count" . " to go.") ] \ ("parent host " . $Parent . " is down.") ]) false; + :if ((($Count * 2) - ($Metric->"count" * 3)) / 2 = 0 && [ :typeof ($HostInfo->"pre-down-hook") ] = "str") do={ + $NetwatchNotifyHook $HostName "pre-down" ($HostInfo->"pre-down-hook"); + } :if ($ParentNotified = false && $Metric->"count" >= $Count && $Metric->"notified" != true) do={ :local Message ("Host " . $HostName . " (" . $HostVal->"host" . ") is down since " . $HostVal->"since" . "."); :if ([ :typeof ($HostInfo->"down-hook") ] = "str") do={ |