Update documentation about logrotate configuration. Thanks to Gill Bates for the report.
This commit is contained in:
parent
1cdee5fed1
commit
2b8a4f3c66
35
README
35
README
|
@ -127,21 +127,32 @@ INSTALLATION
|
|||
If your squid logfiles are rotated then cron isn't going to give the
|
||||
expected result as there exists a time between when the cron is run and
|
||||
the logfiles are rotated. It would be better to call squid-analyzer from
|
||||
logrotate, eg:
|
||||
logrotate, create file /etc/logrotate.d/squid with the following
|
||||
content:
|
||||
|
||||
/var/log/proxy/squid-access.log {
|
||||
daily
|
||||
compress
|
||||
rotate 730
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
|
||||
/usr/bin/squid-analyzer -d -l /var/log/proxy/squid-access.log.1
|
||||
endscript
|
||||
/var/log/squid/*.log {
|
||||
daily
|
||||
compress
|
||||
delaycompress
|
||||
rotate 5
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate
|
||||
/usr/local/bin/squid-analyzer -d -l /var/log/squid/access.log.1
|
||||
endscript
|
||||
}
|
||||
|
||||
Be sure that the paths used in this script correspond to your system.
|
||||
|
||||
5. Adjust the configuration
|
||||
|
||||
Make sure that the LogFile path is correct in your squidanalyzer.conf
|
||||
file. For instance:
|
||||
|
||||
LogFile /var/log/squid/access.log
|
||||
|
||||
You can also use network name instead of network ip addresses by using
|
||||
the network-aliases file. Also if you don't have authentication enable
|
||||
and want to replace client ip addresses by some know user or computer
|
||||
|
|
|
@ -130,21 +130,32 @@ or run it manually. For more information, see README file.
|
|||
|
||||
If your squid logfiles are rotated then cron isn't going to give the expected
|
||||
result as there exists a time between when the cron is run and the logfiles
|
||||
are rotated. It would be better to call squid-analyzer from logrotate, eg:
|
||||
are rotated. It would be better to call squid-analyzer from logrotate, create
|
||||
file /etc/logrotate.d/squid with the following content:
|
||||
|
||||
/var/log/proxy/squid-access.log {
|
||||
daily
|
||||
compress
|
||||
rotate 730
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
|
||||
/usr/bin/squid-analyzer -d -l /var/log/proxy/squid-access.log.1
|
||||
endscript
|
||||
/var/log/squid/*.log {
|
||||
daily
|
||||
compress
|
||||
delaycompress
|
||||
rotate 5
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate
|
||||
/usr/local/bin/squid-analyzer -d -l /var/log/squid/access.log.1
|
||||
endscript
|
||||
}
|
||||
|
||||
Be sure that the paths used in this script correspond to your system.
|
||||
|
||||
5. Adjust the configuration
|
||||
|
||||
Make sure that the LogFile path is correct in your squidanalyzer.conf file.
|
||||
For instance:
|
||||
|
||||
LogFile /var/log/squid/access.log
|
||||
|
||||
You can also use network name instead of network ip addresses by using the
|
||||
network-aliases file. Also if you don't have authentication enable and
|
||||
want to replace client ip addresses by some know user or computer you
|
||||
|
|
Loading…
Reference in New Issue