Tue Aug 25, 2020 10:34 pm
Hope maybe Mikrotik is reconsidering more RFC formatting/conformance since these posts many years ago. I think remote logging and log analysis tools have become quite popular and it would be nice if Mikrotik devices were plug-and-play.
The #1 request from me would be to at least to encode SEVERITY level according to standards. So is info/warning/critical, for example, stripped in remote logging messages? I have not wiresharked to confirm this is not being passed but I would hope that my remote log server would interpret if it is. The wiki says logs are RFC 3164 but it is not coming through with simple configuration and I have selected BSD format option.
BSD option enables some options for facility and severity level but it seems like it might just allow defaults of those? Is the workaround for PRI to setup different remote logging actions for each priority, and then for every topic (or at least the main ones) to have separate rules for each topic + severity level (and + facility) you want to use? If so, adding more more info to documentation would be helpful.
And is "topic" also stripped? That would be helpful to add to the remote log output, even just in MSG rather than delineated field.
One other difficulty I have is that some MT logging is formatting events across multiple messages... basically using new messages as line feeds. So these messages do NOT have their proper context unless viewed in sequence and not really interrupted by other logs (and actually, other services on the device can also generate messages that interrupt the formatting).
For example, it is critical to view the following messages in sequence or you cannot associate messages with an interface. As such, while the formatting appears "tidy" in the device, it is NOT tidy by message logging standards and for remote logging servers. (ALSO NOTE: timestamp as shown here IS NOT SUFFICIENT TO RECONSTRUCT THE ORDER which can make the logging useless/unreliable!)
11:31:34 route,debug,event Interface change
11:31:34 route,debug,event interface=host1
11:31:34 route,debug,event status=UP,RUNNING
11:31:34 route,debug,event mtu=1500
11:31:34 route,debug,event Interface change
11:31:34 route,debug,event interface=host2
11:31:34 route,debug,event status=UP,RUNNING
11:31:34 route,debug,event mtu=1500
11:31:34 route,debug,event Interface change
11:31:34 route,debug,event interface=host3
11:31:34 route,debug,event status=UP,RUNNING
11:31:34 route,debug,event mtu=1500
Without sequencing information these message can easily lose context and usefulness. But it seems better to simply output a single line for each of the above then no sequencing is needed.
11:31:34 route,debug,event Interface change interface=host1 status=UP,RUNNING mtu=1500
11:31:34 route,debug,event Interface change interface=host2 status=UP,RUNNING mtu=1500
11:31:34 route,debug,event Interface change interface=host3 status=UP,RUNNING mtu=1500