Scripting with traceroute
POC
Running /tool traceroute with the as-value option will return the hops as an array.
{
:local trDestination 1.1.1.1;
:local trDuration 3s;
:local tr [/tool traceroute $trDestination as-value duration=3s];
:put ("number of hops in $trDuration:" . [:len $tr]);
:foreach hop in=$tr do={
:put ([$hop]->"address");
}
}
#end