Log Parser - Event Trigger Script

I’ve written a script to parse a log buffer, and trigger some action based on the log entries read.

This will allow you to monitor for events on RouterOS itself, and run any specified actions.
You can parse an entry to find IP address, host-name, user name, etc… basically anything the log data contains can be evaluated. It also runs very fast as it uses ‘print as-value’ to capture log entries into memory.

It can be found on the Wiki here: http://wiki.mikrotik.com/wiki/Log_Parser_-_Event_Trigger_Script

If you have a great parser to extract data from a log, please post it, as it may be useful to others and myself.

also, it would be nice if that would work with remote logging, as result you had to build more powerful event driven system. On linux host you have tools like expect/tcl more powerful log parsing capabilities.

I agree, using Linux to monitor logs is a lot more powerful. There are times though, when I need the router to “monitor itself” in situations, and do some actions.

Link to wiki page is broken, the last version of the wiki page was archived here: https://web.archive.org/web/20210416175553/https://wiki.mikrotik.com/wiki/Log_Parser_-_Event_Trigger_Script

Thank for digging up this gem.

That is pretty clean. Even a two-tone [:beep] – too bad most modern hardware doesn’t have a buzzer.

Likely only broken after 13 years with the recent ISO date changes :wink:.