mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
netwatch-notify: better match notify-entries
This commit is contained in:
parent
45ffb7e552
commit
7f0a8cdfcd
1 changed files with 80 additions and 77 deletions
|
@ -50,9 +50,11 @@
|
|||
|
||||
$ScriptLock $0;
|
||||
|
||||
:foreach Host in=[ / tool netwatch find where comment~"^notify," disabled=no ] do={
|
||||
:foreach Host in=[ / tool netwatch find where comment~"notify" disabled=no ] do={
|
||||
:local HostVal [ / tool netwatch get $Host ];
|
||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
:if ($HostInfo->"notify" = true && $HostInfo->"disabled" != true) do={
|
||||
:local HostName ($HostInfo->"hostname");
|
||||
|
||||
:local Metric { "count"=0; "notified"=false };
|
||||
|
@ -140,4 +142,5 @@ $ScriptLock $0;
|
|||
"parent"=($Metric->"parent");
|
||||
"resolve-failed"=($Metric->"resolve-failed");
|
||||
"since"=($Metric->"since") };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue