Closed lravelo closed 7 years ago
Yes, if you want to just keep the last 6 month use --preserve 6
or -p 6
, so use the following command in your logrotate:
/usr/bin/squid-analyzer -p 6 /opt/data/logs/squid3/access.log.1
It will do the same work as before but will remove all statistics older than 6 month.
Regards
good morning. I've tried this and, while I see the following message:
Obsolete statistics before 2016-08
it still doesn't purge the records.
SquidAnalyzer use /bin/rm -rf DIR
to remove the obsolete directories, perhaps this is the wrong path of the rm command or your system doesn't have this command.
I have verified that /bin/rm
exists in all servers running this application.
Version 6.6 might solve this issue.
I'm already on v6.5. Never tried to purge old stats before but I need to regain some disk space. I did read about this issue here but wanted to know if there was a way I could test prior to changing the code (I never upgraded to v6.5 that's the version I originally installed).
Right now on logrotate I run the following:
/usr/bin/squid-analyzer -d /opt/data/logs/squid3/access.log.1
Is this where I would need to modify in order to tell squidanalyzer to purge anything older than, say, 6 months by doing something like this?:
/usr/bin/squid-analyzer -d -p 6 /opt/data/logs/squid3/access.log.1