mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 21:14:29 +02:00
netwatch-notify: also support the name from property
This commit is contained in:
parent
5767fceb39
commit
8e6eff30db
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
:global NetwatchNotify;
|
||||
|
||||
:global EitherOr;
|
||||
:global IfThenElse;
|
||||
:global IsDNSResolving;
|
||||
:global LogPrintExit2;
|
||||
|
@ -61,7 +62,7 @@ $ScriptLock $0;
|
|||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
:if ($HostInfo->"notify" = true && $HostInfo->"disabled" != true) do={
|
||||
:local Name ($HostInfo->"name");
|
||||
:local Name [ $EitherOr ($HostInfo->"name") ($HostVal->"name") ];
|
||||
|
||||
:local Metric { "count"=0; "notified"=false };
|
||||
:if ([ :typeof ($NetwatchNotify->$Name) ] = "array") do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue