9.37.1 ProblemYou want logwatch to print reports for a service it does not support. 9.37.2 SolutionCreate your own logwatch filter for that service or log file. Suppose you have a service called foobar that writes to the log file /var/log/foobar.log.
9.37.3 Discussionlogwatch is more a framework than a log parser. In fact, all parsing is done by auxiliary scripts in /etc/log.d/scripts/services, so for unsupported services, you must write your own scripts. You might think, "Hey, if I have to write these scripts myself, what's the value of logwatch?" The answer is convenience, as well as consistency of organization. It's helpful to have all your log groveling scripts together under one roof. Plus logwatch supplies tons of scripts; use them as examples for writing your own. To integrate a given service into logwatch, you must define three files:
Our recipe uses minimal configuration files. Plenty of other options are possible. 9.37.4 See Also/usr/share/doc/logwatch*/HOWTO-Make-Filter documents the full syntax of logwatch filters. |