Monitoring logs with Sauron

Sauron is a simple self-contained Python 2.3 script, without any dependency, useful to monitor errors on log files in real time from the command-line.

Photo by Samuel Scrimshaw on Unsplash

By default it follows all log files in /var/log directory and shown the rows containing an "error" word (bad, cannot, error, exception, fail, fails, failed, failure, incorrect, invalid, unable, unexpected, wrong).

$ sauron [options] [paths (default /var/log)]

-h, --help show this help message and exit
filename regex (default 'log$')
-a, --all the log file are followed from the begin
-w WORDS, --words=WORDS
comma-separed words which filters the lines (default:
error, exception, fail, fails, failed, failure,
cannot, unable, unexpected, incorrect, invalid, bad,
regex to filter the log lines (it overwrites the
--words option)
interval in seconds before to scan again the paths
(default 1)

Originally published on 13 February 2013.