Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: ping & tracert
Topic Summary:
Created On: 01/09/2013 06:27 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/09/2013 06:27 AM
User is offline View Users Profile Print this message

Author Icon
MatthewKoch
Apprentice (20-49)

Posts: 26
Joined: 12/19/2011

Hello,

I am looking for some advice on how to proceed with the development of a workflow that will do the following:

1) Ping an IP address.
2) If the Ping succeeds, end the task. If the Ping fails, perform a 'tracert' command on the IP address in order to see the path it takes (hops).
3) Parse the results of the tracert command. (From what I understand, the tracert command will need to be performed via a "run" action, which basically just runs inside of a CMD window. What I mean by "parse" is that I'd like to store the results of each hop in a file or a database. Would this require some sort of custom VB solution? So far I've been able to store the raw output in a text file, but I'd like to have the data saved as a data-set or in a temporary table.)

Please let me know your thoughts.


 Category Survey
 01/09/2013 07:39 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Matthew, a command like
C:\windows\system32>tracert 91.121.85.65 >c:\temp\tracert.txt
results in a txt file containing something like

Détermination de l'itinéraire vers www.ville-saint-ay.fr [91.121.85.65]
avec un maximum de 30 sauts :

1 1 ms 1 ms 1 ms livebox.home [192.168.1.1]
2 18 ms 16 ms 17 ms AOrleans-156-1-41-1.w86-221.abo.wanadoo.fr [86.2
21.160.1]
3 19 ms 17 ms 17 ms 10.125.146.202
4 18 ms 18 ms 23 ms xe-3-3-0-0.ncorl201.Orleans.francetelecom.net [1
93.253.83.82]
5 20 ms 23 ms 22 ms bundle-ether45.ntpst101.Paris.francetelecom.net
[193.252.98.22]
6 25 ms 26 ms 30 ms lag-1.nopst601.Paris.francetelecom.net [193.252.
98.14]
7 31 ms * 147 ms th2-5-6k.fr.eu [91.121.131.109]
8 20 ms 19 ms 19 ms th2-g1-a9.fr.eu [213.186.32.202]
9 247 ms 204 ms 105 ms rbx-g1-a9.fr.eu [91.121.215.133]
10 38 ms * 132 ms rbx-2-6k.fr.eu [213.186.32.234]
11 155 ms 204 ms 101 ms rbx-23-m1.fr.eu [213.251.191.192]
12 50 ms 35 ms 36 ms ns352656.ovh.net [91.121.85.65]

Itinéraire déterminé.

that you could parse, eliminating the 3 top and 2 bottom lines
trimming each line to remove leading spaces
replacing all multiple space sequences by a single ,
which results in a csv file
then sql the file to make a dataset.


 Category Survey


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 01/18/2013 09:06 AM
User is offline View Users Profile Print this message

Author Icon
MatthewKoch
Apprentice (20-49)

Posts: 26
Joined: 12/19/2011

Thanks Jean, I will give this a shot.

 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1723 guests browsing this forum, which makes a total of 1723 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog