Lire cron improvements
Arunas Pranckevicius
A.Pranckevicius at medbank.lt
Wed May 4 12:06:30 CEST 2005
Hello,
I missed some parts in lire cron so, writted own script.
I think, it may be usefull.
Script take multiple archived log files, pass to lire and places
directly to
web site files:
> File: lire.cron
>
> #!/bin/sh
> LOGS="/home/lire/logs"
> HTML="/home/lire/public_html"
>
> export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/
>
> zcat /var/log/syslog.4.gz /var/log/syslog.3.gz /var/log/syslog.2.gz /var/log/syslog.1.gz >"$LOGS/syslog"
> zcat /var/log/messages.4.gz /var/log/messages.4.gz /var/log/messages.2.gz /var/log/messages.1.gz >"$LOGS/messages"
> lr_log2report -o html syslog "$LOGS/syslog" "$HTML/server000/syslog"
> grep server000 "$LOGS/messages" | grep cups | cut -f 4 -d':' | cut -f 2-99 -d' ' > "$LOGS/server000/cups/page_log.lire"
> lr_log2report -o html cups_pagelog "$LOGS/server000/cups/page_log.lire" "$HTML/server000/cups"
> grep "x.x.x.x postfix" "$LOGS/syslog" > "$LOGS/server001/info"
> lr_log2report -o html postfix "$LOGS/server001/info" "$HTML/server001/postfix"
> grep "x.x.x.x apache:" "$LOGS/messages" | cut -f4-99 -d':' | cut -f2-99 -d' ' > "$LOGS/server001/httpd/access.log"
> lr_log2report -o html combined "$LOGS/server001/httpd/access.log" "$HTML/server001/apache"
Now it is idea:
lire cron may be improved to make same jobs with allowing additional
keywords in configuration, so taking multiple log files and parsing it
to various formats with various output would be nice.
Regards,
-------------------------------------------------------------------------------------
Arunas Pranckevicius
IT departament, UAB Medicinos Bankas
Programmer
Phone: (5)2644844
Mob. Phone: (+370) 686 86778
Email: A.Pranckevicius at medbank.lt
Web: http://www.medbank.lt/subcontent.php?lang=en&sublink=1.11
-------------------------------------------------------------------------------------
--
To UNSUBSCRIBE, email to development-request at logreport.org with a subject of
"unsubscribe". Trouble? Send an email with subject "help" to
development-request at logreport.org
More information about the Development
mailing list