Send output from traceroute command in email as text

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

Hello,

no ideas how to solve this, please?

Thank you :slight_smile:

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

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

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