Hi,
I am trying to set up a log rotation/report generating scheme for squid and sarg. Since I'm not real steady on the basics of logging and cron I was wondering if my plan will work or if anyone has a better idea on how I could do this.
1) newsyslog rotates the squid access.log on midnight to an uncompressed .0:
2) cron then runs sarg that generates report from the access.log.0 file 5 min later.
3) newsyslog then archive the access.log.0 file an 5 min later.
Is this a good plan or am I oblivious to reason this won't work?
I am trying to set up a log rotation/report generating scheme for squid and sarg. Since I'm not real steady on the basics of logging and cron I was wondering if my plan will work or if anyone has a better idea on how I could do this.
1) newsyslog rotates the squid access.log on midnight to an uncompressed .0:
Code:
/var/log/squid/access.log 644 1 * @T00 B /var/log/squid/squid.pid 30
2) cron then runs sarg that generates report from the access.log.0 file 5 min later.
Code:
5 * * * * root sarg
3) newsyslog then archive the access.log.0 file an 5 min later.
Code:
/var/log/squid/acess.log.0 600 6 * @T0010 BZ
Is this a good plan or am I oblivious to reason this won't work?