D
D
Dmitry2011-10-12 20:46:44
network hardware
Dmitry, 2011-10-12 20:46:44

How to send a log to e-mail in RouterOS?

I have Mikrotik RouterBoard RB750GL, RouterOS 5.7.
I want to send the contents of his log in the body of the letter. In the console I write

/tool e-mail send [email protected] subject=("log") body=([/log print])



As a result, the entire log falls out to the console, and an empty letter comes to the mail. CHADNT?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2011-10-14
@seventh

Decision

H
Hayden, 2011-10-12
@Hayden

I have a script sent to my mail every day: Profit! Formed in .txt file with the name a la Mk1Log-2011oct12.txt is sent.
/log print file=([/system identity get name] . "Log-" . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6]); \
/tool e-mail send to="твое@мыло.com" from="мыло@микротика.ru" subject=([/system identity get name] . " Log " . \
[/system clock get date]) file=([/system identity get name] . "Log-" . [:pick [/system clock get date] 7 11] . \
[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".txt"); :delay 10; \
/file rem [/file find name=([/system identity get name] . "Log-" . [:pick [/system clock get date] 7 11] . \
[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".txt")]; \
:log info ("System Log emailed at " . [/sys cl get time] . " " . [/sys cl get date])

M
m08pvv, 2011-10-12
@m08pvv

... body="$[/ ...
It seems like it should be

V
Vladislav, 2015-04-09
@Navy9

As a result, the issue was resolved, not with a file, but in a letter, I’m interested precisely because I use netwatch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question