Community discussions

MikroTik App
 
DjM
Member Candidate
Member Candidate
Topic Author
Posts: 116
Joined: Sun Dec 27, 2009 2:44 pm

Send output from traceroute command in email as text

Sun Dec 27, 2009 3:16 pm

Hello,

I have a problem with getting output from command "/tool traceroute x.x.x.x" and saving it into a variable. I want to make a script, which will run a command "/tool traceroute x.x.x.x" and send it to email by a commad "/tool email send ..".

For example, this is working:

/tool e-mail send from="xxx@xxx.xx" to="xxx@xxx.xx" subject="monitoring" body="some text here\n\n$([/system clock get date]) $([/system clock get time])"

And this is not working:

/tool e-mail send from="xxx@xxx.xx" to="xxx@xxx.xx" subject="monitoring" body="some text here\n\n$([/tool traceroute x.x.x.x])"

Output from command "traceroute" is empty.

Can you, please help me what I am doing wrong? Or it is possible to get output from this command by some way? If the question was answered earlier, I'm sorry, but I didn't found it using a search in this forum. Version of RouterOS 4.4, RB433AH.

Thank you
 
DjM
Member Candidate
Member Candidate
Topic Author
Posts: 116
Joined: Sun Dec 27, 2009 2:44 pm

Re: Send output from traceroute command in email as text

Tue Mar 09, 2010 4:04 pm

Hello,

no ideas how to solve this, please?

Thank you :-)
 
lehonk
just joined
Posts: 7
Joined: Wed Dec 10, 2008 12:43 pm

Re: Send output from traceroute command in email as text

Wed Apr 21, 2010 4:53 pm

Any news on this request?

I'm also interesetet in saving ping oder traceroute outputs on remote cpe units of our customers.

greetings

le honk
 
DjM
Member Candidate
Member Candidate
Topic Author
Posts: 116
Joined: Sun Dec 27, 2009 2:44 pm

Re: Send output from traceroute command in email as text

Mon Mar 28, 2011 9:19 pm

Hello Mikrotik team,

any update for this topic? If it is not possible, can you, please, share some background information why it is not possible?

Thank you
 
Sulyvien
just joined
Posts: 10
Joined: Tue Dec 21, 2010 10:14 pm

Re: Send output from traceroute command in email as text

Sun Apr 03, 2011 12:51 am

I have the same problem trying to put in the body the result of /ip neigbur print where address=$IP.

My solution is print to a file what we want and send it by email as attachment

/tool e-mail send file=myfile.txt