mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
netwatch-notify: increase count for every parent in chain
This commit is contained in:
@@ -50,9 +50,11 @@
|
||||
:set ($Metric->"since") ($HostVal->"since");
|
||||
:local Count [ $IfThenElse ([ :tonum ($HostInfo->"count") ] > 0) ($HostInfo->"count") 5 ];
|
||||
:local Parent ($HostInfo->"parent");
|
||||
:if ([ :len $Parent ] > 0) do={
|
||||
:while ([ :len $Parent ] > 0) do={
|
||||
:set Count ($Count + 1);
|
||||
:set Parent ($NetwatchNotify->$Parent->"parent");
|
||||
}
|
||||
:set Parent ($HostInfo->"parent");
|
||||
:local ParentNotified false;
|
||||
:while ($ParentNotified = false && [ :len $Parent ] > 0) do={
|
||||
:set ParentNotified [ $IfThenElse (($NetwatchNotify->$Parent->"notified") = true) true false ];
|
||||
|
Reference in New Issue
Block a user