0
Script to Save Logs & Send Via Email
Copy Paste on Mikrotik TerminaL


/system script add name="LogDump" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff
#read log
:local logcontent
:foreach int in=[/log find ] do={
:set logcontent (“$logcontent\r\n” .[/log get $int time]. ” – ” .[/log get $int message])
}
#send email
/tool e-mail send to=”log@xxxx.xxx” subject=([/system identity get name] . ” Log ” . [/system clock get date]) body=$logcontent
#delete old log
/system logging action set memory memory-lines=1
/system logging action set memory memory-lines=65000

Post a Comment

 
Top