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


Revision #1
Created 3 June 2024 15:17:07 by bluecrow76
Updated 3 June 2024 16:07:08 by bluecrow76