[Logwatch] Weekly and monthly reports?

Mike Tremaine mgt at stellarcore.net
Sun Oct 14 08:51:44 MST 2007

Hugo van der Kooij wrote:
> Hi,
> I am looking into the weekly and monthly reports. But it seems to me
> logwatch is not clear in that area.
> I tried some options but find the results not particular clear.
> If I try `--range "last week"` as option it seems to give me only a day
> and not the whole week.
> The option `for that week` can not be added as it only seems to work for
> year, month, day, ...
> So how can one obtain weekly and monthly reports? I am not getting the
> hang of those Date::Manip options.

I have not used it but I looked in the Logwatch.pm file and see that 
Bjorn left good chunks of POD.

The format of the range option is:
    --range \"date_range [period]\"

Parameter date_range (and optional period) must be enclosed in quotes if 
it is
more than one word.  The default for date_range is \"yesterday\". Valid
instances of date_range have one of the following formats:

   between date1 and date2
   since date1

For the above, date1 and date2 have values that can be parsed with the
Date::Manip perl module.

Valid instances of the optional parameter period have one of the following
   for (that|this) (year|month|day|hour|minute|second)
   for those (years|months|days|hours|minutes|seconds)


Which seems to point to there not being a "weekly" option, sorry. You 
could wrap the call to logwatch with a bash script that could generated 
the between date1 and date2 style.


More information about the Logwatch mailing list