when does lr_log2report output tar, merging reports (was: Re: DocBook... won't work??)
Joost van Baal
joostvb at logreport.org
Sun Apr 20 16:30:00 CEST 2003
Hi Steve,
On Sun, Apr 20, 2003 at 05:13:31AM +0200, Steve Quartly wrote:
> Francis wrote:
> > This is because HTML reports are output in a tar file. The garbage you
> > are seeing is part of the tar format. When using HTML output, you
> > should
> > use lr_log2report -o html combined < log_file > report.tar and use tar
> > to unpack the report.
>
> Thanks for the tip, whoever maintains the documentation may want to
> check this link:
> http://download.logreport.org/pub/current/doc/user-manual/ch03s02.html
>
> It says that the output is html.
>
> Quote...
> Example 3.3. Generating A HTML Report
>
> To generate a HTML report from the same log file as above, you would use
> the following command:
>
> $ lr_run lr_log2report -o html combined < \
> /var/log/apache/access_log > ~/apache.html
>
> Unquote...
>
> This suggests to me that the output is raw HTML. Perhaps it should be...
>
> $ lr_run lr_log2report -o html combined < \
> /var/log/apache/access_log > | tar xfC /tmp
You've found a bug in our documentation. It's fixed in CVS now, thanks
for reporting this!
<snip>
> What do most people do
> with log rotation? I want to be able to generate a report whenever I
> want, but ultimately end up with a monthly log report. Do I have to let
> my log files grow over a month before I rotate them?
Lots of different solutions exist. E.g.:
1) simply cat your logs together afterwards. Do something like
i=7; while test $i -gt 1; do zcat /var/log/squid/access.log.$i.gz; \
i=`expr $i - 1`; done | cat - /var/log/squid/access.log.1 | lr_run \
lr_log2mail -s "`hostname` weekly `date +\%Y\%m\%d`" proxy
squid_access joe at example.com
2) generate a daily report, and merge the XML reports monthly. See the
User Manual's section on Merging Reports on how to do this. (The new
lr_store command which is in current Lire CVS, and will get shipped with
Lire 1.3, will make this more easy.) The benefit of using log merging
is: you use the work you did for your daily logs again to generate the
monthly logs; no need to wade throught the logs twice.
3) don't reuse the daily XML reports, but reuse the daily DLF files:
more CPU load, but also more reliable and flexible monthly reports.
BTW: when merging, the daily output format is independent of the monthly
one. E.g. you can have daily flat text reports, and monthly HTML
reports.
Let us know if you encounter any difficulties with any of these.
Bye,
Joost
--
. . http://logreport.com/
| '.| /^LogReport$/
| Lire http://logreport.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/questions/attachments/20030420/5a0666b9/attachment.bin
More information about the Questions
mailing list