mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-14 20:14:29 +02:00
netwatch-notify: always show messages when run from terminal
Co-authored-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
c3da4ed696
commit
a0163aa487
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
:global IsDNSResolving;
|
||||
:global LogPrintExit2;
|
||||
:global ParseKeyValueStore;
|
||||
:global ScriptFromTerminal;
|
||||
:global ScriptLock;
|
||||
:global SendNotification2;
|
||||
:global SymbolForNotification;
|
||||
|
@ -143,7 +144,8 @@ $ScriptLock $0;
|
|||
:set Parent ($NetwatchNotify->$Parent->"parent");
|
||||
}
|
||||
}
|
||||
:if ($Metric->"notified" = false || $Metric->"count-down" % 120 = 0) do={
|
||||
:if ($Metric->"notified" = false || $Metric->"count-down" % 120 = 0 || \
|
||||
[ $ScriptFromTerminal $0 ] = true) do={
|
||||
$LogPrintExit2 [ $IfThenElse ($HostInfo->"no-down-notification" != true) info debug ] $0 \
|
||||
("The " . $Type . " '" . $Name . "' (" . $HostDetails . ") is down for " . \
|
||||
$Metric->"count-down" . " checks, " . [ $IfThenElse ($ParentNotified = false) [ $IfThenElse \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue