Answer the question
In order to leave comments, you need to log in
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])
Answer the question
In order to leave comments, you need to log in
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])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question