Page 1 of 1
How to reset the log file and then backup it?
Posted: Wed Mar 08, 2006 3:33 am
by gustkiller
Hi ppl
i was wondering how to reset the system Log once a month and before reset it save it to disk.
i already know how to save the current log file to disk and script it but i dont know how to clear the log file.. n1 can helpme?
thanks
Gustavo Santos
NetStream
Posted: Wed Mar 08, 2006 2:01 pm
by cmit
You cannot clear the log. Have your MikroTik log to a remote syslog server and doing you log management/archiving there would be the solution...
Best regards,
Christian Meis
Posted: Thu Mar 09, 2006 3:19 am
by gustkiller
thanks Cmit do u know some free syslog server for windows 2003?
Posted: Thu Mar 09, 2006 5:55 am
by changeip
Mikrotik has one on their download page that works pretty decent.
Sam
Posted: Thu Mar 09, 2006 8:56 am
by odie
http://www.kiwisyslog.com/
there is also a freeware version ....
Posted: Thu Mar 09, 2006 10:41 am
by cmit
I would also heavily recommend Kiwi products - they are really good quality...
Best regards,
Christian Meis
Posted: Fri Mar 10, 2006 2:15 am
by gustkiller
thanks ppl for the help! everything running fine now !
Log to e-mail
Posted: Fri Apr 07, 2006 12:07 pm
by Nexon
I have two scripts one to make log file every day and second to e-mail to me . That is another way to solve the problem...
Re: Log to e-mail
Posted: Thu Apr 27, 2006 3:24 am
by minist@r
I have two scripts one to make log file every day and second to e-mail to me . That is another way to solve the problem...
Can you post your scripts here?
The scripts
Posted: Wed Oct 25, 2006 5:09 pm
by Nexon
Make log file: /log print file=log
Send it to mail: /tool e-mail send file=log.txt to=
xxx@xxx.xx body=logfile subject=mikrotiklog
Than reboot: /system reboot
You must set up the system scheduler to activate these scripts at a regular time.
Posted: Wed Oct 25, 2006 10:12 pm
by cmit
I have to take back my statement from above - I just stumbled upon a way to indeed clear the log!
You can set the memory-lines (or disk-lines) parameter to "1" (0 isn't valid) and then back to the value you want to have (like the default "100") - this will clear the log just leaving the first line - which will then always read "log action changed by admin"...
So:
/system logging action set [/system logging action find name="memory"] memory-lines=1
/system logging action set [/system logging action find name="memory"] memory-lines=100
to clear the memory syslog content.
You could combine this with the e-mail script Nexon posted. But no more need to reboot the machine to get rid of the memory log file...
Best regards,
Christian Meis