Skip to content

Commit a0163aa

Browse files
mgisberseworm-de
andcommitted
netwatch-notify: always show messages when run from terminal
Co-authored-by: Christian Hesse <[email protected]>
1 parent c3da4ed commit a0163aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

netwatch-notify

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
:global IsDNSResolving;
1818
:global LogPrintExit2;
1919
:global ParseKeyValueStore;
20+
:global ScriptFromTerminal;
2021
:global ScriptLock;
2122
:global SendNotification2;
2223
:global SymbolForNotification;
@@ -143,7 +144,8 @@ $ScriptLock $0;
143144
:set Parent ($NetwatchNotify->$Parent->"parent");
144145
}
145146
}
146-
:if ($Metric->"notified" = false || $Metric->"count-down" % 120 = 0) do={
147+
:if ($Metric->"notified" = false || $Metric->"count-down" % 120 = 0 || \
148+
[ $ScriptFromTerminal $0 ] = true) do={
147149
$LogPrintExit2 [ $IfThenElse ($HostInfo->"no-down-notification" != true) info debug ] $0 \
148150
("The " . $Type . " '" . $Name . "' (" . $HostDetails . ") is down for " . \
149151
$Metric->"count-down" . " checks, " . [ $IfThenElse ($ParentNotified = false) [ $IfThenElse \

0 commit comments

Comments
 (0)