aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netwatch-notify4
1 files changed, 3 insertions, 1 deletions
diff --git a/netwatch-notify b/netwatch-notify
index d2d256b..85a1ee5 100644
--- a/netwatch-notify
+++ b/netwatch-notify
@@ -25,10 +25,12 @@
:if ($HostVal->"status" = "up") do={
$LogPrintExit debug ("Host " . $HostName . " (" . $HostVal->"host" . ") is up.") false;
+ :local Count ($Metric->"count");
:set ($Metric->"count") 0;
:if ($Metric->"notified" = true) do={
$SendNotification ("Netwatch Notify: " . $HostName . " up") \
- ("Host " . $HostName . " (" . $HostVal->"host" . ") is up since " . $HostVal->"since" . ".");
+ ("Host " . $HostName . " (" . $HostVal->"host" . ") is up since " . $HostVal->"since" . ".\n" . \
+ "It was down for " . $Count . " checks.");
}
:set ($Metric->"notified") false;
} else={