[Logwatch-Devel] Service Script self-configuration

Kirk Bauer kirk at kaybee.org
Fri Jun 10 07:54:41 MST 2005


On Fri, 10 Jun 2005, Gary Allen Vollink wrote:

> Is there an official stance on having a service script read that
> service's configuration file prior to doing it's work?  I haven't found
> any that currently do, but I was wondering, because I'm thinking of
> exploring this route.  The idea being to take logwatch one more step
> into 'it just works'.

I thought there was one service that did this, but I don't remember
which one.  I certainly think that is the ideal situation -- a script
reads the config for it service, if necessary, to create better reports.

> I've been hacking around and noticed that most service scripts are based
> on "default shipping" configurations, but a large number of the messages
> that are being picked up and sorted in some form or fashion are
> configurable (not all packages, but some).  I don't know how easy it
> will/won't be.  Besides the difficulty in finding a package's
> configuration file, there's the overhead involved in parsing the
> configuration (which, when done across multiple services in a nightly
> run, could be cumbersome).

Given all of the inefficiencies present, and the amount of logs that are
typically processed, I don't think the overhead is a big deal, also
since it is generally run nightly.

I would recommend adding a config option that points to the config file
for the service, with a default value.  Then the filter should continue
on with defaults if the specified file can't be located (perhaps give
the user a warning).

-- 
Kirk Bauer <kirk at kaybee.org>
http://linux.kaybee.org | www.autorpm.org | www.logwatch.org


More information about the Logwatch-Devel mailing list