Community discussions

MikroTik App
 
User avatar
bjorncmtec
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 98
Joined: Thu Apr 19, 2012 1:10 pm

ROS command / Script to return trace hop #

Mon Oct 01, 2012 5:08 pm

I'm trying to create a script which will report the # number hop in a traceroute.

I have managed to get the router to display the entire traceroute but for this purpose I only want it to show "GATEWAY = _______" in the device label

See the command I have created already

"
[oid("1.3.6.1.2.1.1.5.0")]
[Device.Name]
[device_performance()][Device.ServicesDown]
[ros_command("/tool traceroute 168.210.2.2")]

"

Assistance would be greatly appreciated
Certified

* MTCNA
* MTCRE
* MTCTCE
* MTCINE


South Africa
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: ROS command / Script to return trace hop #

Fri Oct 05, 2012 11:53 am

Hi,
not sure this will work, but instead of
[ros_command("/tool traceroute 168.210.2.2")]
try this
[array_size(ros_command("/tool traceroute 168.210.2.2"))]
 
User avatar
bjorncmtec
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 98
Joined: Thu Apr 19, 2012 1:10 pm

Re: ROS command / Script to return trace hop #

Wed Oct 24, 2012 10:41 am

Hi there, thanks for the script but that just returns the size of the array which is 1.

I don't want to return the HOP #. I actually want it to return the hop value
You do not have the required permissions to view the files attached to this post.
Certified

* MTCNA
* MTCRE
* MTCTCE
* MTCINE


South Africa

Who is online

Users browsing this forum: No registered users and 7 guests