Search squid archive

Re: Daily log rotate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bora Özden wrote:
Hi Amos,

Thanks for your answer. What i have on the  /etc/logrotate.d/squid on
an  Redhat Enterprise 5.2 installation is

/var/log/squid/access.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
}
/var/log/squid/cache.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
}
/var/log/squid/store.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
    postrotate
/usr/sbin/squid -k rotater

... has an extra 'r  '  that should not be there.

this place also needs the script that does
    endscript
}


I dont know all the words /options on this script. so thats what i want
to find out. when i look at the examples at google i nearly all see that

See the logrotate manual "man logrotate" for details on all the options it accepts.

(while giving example and also troubleshooting questions)  no one nearly
talks about any other path on the script except /var/log/squid
(access.log,store.log)  . It sound strange to me am i the one only uses
different path for proxy logs  (i use something /data...) or this script
only wants this /var/log path.  Cause ill edit it to use my real
/data... path.

Not a problem, logrotate makes no assumptions about the logs.
Wherever you put them is what its filenames need to use.

All the descriptions use /var/log/squid or /var/logs/squid because those are the default locations for Linux/BSD. Many people have other locations, but the defaults are better used for public documents.


And also the server was giving error while making squid -k
rotate/reconfigure etc.  service squid stop didnt worked and it seemed
that system couldnt find the pid of the squid (or an old pid which is
not recently used). Restarting the whole system worked and i did a
manual squid -k rotate and it made the access.log change.

(extra 'r  ', see above.)


Regards

Bora Ozden





Amos Jeffries wrote:
Bora Özden wrote:
Hi,
I would like to make the squid logs to be rotated  and looking at the
/etc/logrotate.d/squid file but not sure about all the parameters (what
they mean) written there. I need then make them archived (send to a
server via ftp, have an old script doing this at the old server , will
look at it and copy it to the production one) .And also when i give the
command
squid -k rotate command to rotate the log files i get " No running copy"
, but the proxy is working and still giving service, also can see  on
the  tail -f access.log.

So for doing this logrotate smoothly (not to fail) i wanted also to ask
to the list.

Regards

Bora Ozden

Something like this:

set squid.conf:
  logfile_rotate 0

Then in logrotate.d/squid (this is just off the top of my head, check
the docs for corrections):

  postrotate {
    squid -k rotate
    /script/to/process/logfile /var/logs/suid/access.log.1
  }

Amos



--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
  Current Beta Squid 3.1.0.5

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux