mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
netwatch-notify: add up hook for consistency
Also this works around the permission/policy limitations in netwatch scripts.
This commit is contained in:
parent
1c10044b24
commit
a79461aff2
|
@ -34,6 +34,10 @@
|
|||
$SendNotification ("Netwatch Notify: \E2\9C\85 " . $HostName . " up") \
|
||||
("Host " . $HostName . " (" . $HostVal->"host" . ") is up since " . $HostVal->"since" . ".\n" . \
|
||||
"It was down for " . $Count . " checks.");
|
||||
:if ([ :typeof ($HostInfo->"up-hook") ] = "str") do={
|
||||
$LogPrintExit info ("Running hook on host " . $HostName . " up: " . ($HostInfo->"up-hook")) false;
|
||||
[ :parse ($HostInfo->"up-hook") ];
|
||||
}
|
||||
}
|
||||
:set ($Metric->"notified") false;
|
||||
} else={
|
||||
|
|
Loading…
Reference in a new issue