Suppress Log Messages Caused by Scripts

I am using a script that acts as a ping watchdog to ping different gateways. It does various things to check the health of the gateway, but’s unnecessary to go into too much detail as the script is somewhat complicated. However, I am having one issue that kind of annoys me about it.

When checking the health of a gateway I use a static route of 0.0.0/0 that has a routing mark called “FAILOVER” that I have setup exclusively for the script to use. The script needs to change the gateway IP address of the FAILOVER route before it can check the next gateway and send pings through it. When the script runs it changes the FAILOVER gateway 4 times when it checks my 4 different gateways. This causes me to get 4 messages in my log when the script changes the gateway IP. The 4 entries read “system info route changed by admin”. I get four of these messages every minute when the script runs and it is really just unnecessary and is spamming my log.

This problem is causing me to not be able to read any other messages that may have been logged during the day. So, I was wondering if it is possible to suppress certain types of messages in the log or just suppress messages generated by scripts. For example, a script setting to ignore messages about route changes or at the beginning of the script type something like “ECHO OFF”.

If this isn’t a feature it should be. It seems like it would be simple to implement a filter to keep certain messages out of memory or out of a syslog server, or even filter only certain messages to be sent to memory or to a syslog server.

Thanks for any insight guys.

It’s not the script generating the logs, the script cannot stop something else from being logged. It’s the fact that the route info is being changed that is being logged… no different that if you go into winbox and change it manually. The log doesn’t know how it got changed, whether you did it manually in winbox or in cli or with a script. You can either turn off “system info” logs or you can send all log output to a SysLog with filtering capabilities.