mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
netwatch-notify: also support the name from property
This commit is contained in:
@ -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={
|
||||
|
Reference in New Issue
Block a user