Page 1 of 1

Reading Syslog from MT

Posted: Wed May 20, 2020 9:55 pm
by andrius8
Hi,
Can anyone provide some insight how does syslog work on MT.
I have Dude configured to accept syslog and it is not forwarding them to remote syslog server. I am pointing my devices to MT to dump syslogs. When I connect with Dude to MT I can see messages under Logs from my devices. Where does MT stores syslog messages? Can I read the messages directly from MT without using Dude?

Thanks

Re: Reading Syslog from MT

Posted: Thu May 21, 2020 11:30 am
by mada3k
Have you enabled remote logging?

Example:
/system logging action
set remote remote=192.168.xxx.xxx
/system logging
add action=remote topics=info
add action=remote topics=warning
add action=remote topics=error
add action=remote topics=critical

Re: Reading Syslog from MT

Posted: Thu May 21, 2020 2:12 pm
by andrius8
Why do I need to set remote logging?
I do not want MT to send logs to remote syslog server. I want MT to act as syslogs server. It actually does already as messages are being logged and stored. I just need to find where and how to access them. This is the part that I am missing.

Re: Reading Syslog from MT

Posted: Thu May 21, 2020 2:35 pm
by girts
If you have enabled ssh, you could execute "/log print follow" command over an ssh connection.
In UNIX terminal:
ssh username@IP /log print follow

Re: Reading Syslog from MT

Posted: Thu May 21, 2020 4:20 pm
by andrius8
Thanks for input.
This prints the output that I see in Log but unfortunately I do not see syslog messages in the log only MT logs. It could be that I missed but is there a way to get syslog messages in Logs?

Re: Reading Syslog from MT  [SOLVED]

Posted: Fri May 22, 2020 1:01 am
by bpwl
Thanks for input.
This prints the output that I see in Log but unfortunately I do not see syslog messages in the log only MT logs. It could be that I missed but is there a way to get syslog messages in Logs?
Dude uses the RouterOS logging functions to store the syslog captured.
viewtopic.php?f=2&t=161209#p793687

Topic used is "dude", action as you like (e.g. writing to disk).
Klembord-2.jpg
The file is plain text and can be downloaded (or read while written? , didn't test!) . I open it with PSPad or other text editor.
Klembord-3.jpg

Re: Reading Syslog from MT

Posted: Fri May 22, 2020 11:07 am
by andrius8
Thank you very much. This is exactly what I needed.
I was looking for syslog topic but it is dude(logical)