Page 1 of 1

Send output from traceroute command in email as text

Posted: Sun Dec 27, 2009 3:16 pm
by DjM
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

Re: Send output from traceroute command in email as text

Posted: Tue Mar 09, 2010 4:04 pm
by DjM
Hello,

no ideas how to solve this, please?

Thank you :-)

Re: Send output from traceroute command in email as text

Posted: Wed Apr 21, 2010 4:53 pm
by lehonk
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

Re: Send output from traceroute command in email as text

Posted: Mon Mar 28, 2011 9:19 pm
by DjM
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

Re: Send output from traceroute command in email as text

Posted: Sun Apr 03, 2011 12:51 am
by Sulyvien
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