Is it possible to include Logrotate on PfSense
-
Hello, i would like to use logrotate on my work station PfSense to save one copy of access.log per days.
How can I install Logrotate ?
-
Search the packages forum where the topic of "how do I install package X" comes up regularly.
Keep in mind (as has been said recently on the forum) that the logs aren't written to disk. If they matter to you then you have to have a box running a syslog server to receive the logs.
-
Thanks. But my aims is just to have a copy of access.log each days.
This file is written on hard disk no ?
-
If you only want to rotate the squid log you can simply stick a call to "/usr/local/sbin/squid -k rotate" in /etc/crontab.
-
@Cry:
If you only want to rotate the squid log you can simply stick a call to "/usr/local/sbin/squid -k rotate" in /etc/crontab.
I saw that but my chief want to process on logrotate solution.
So I have the package on /usr/ports/sysutils/logrotate/
But when i try to install this package with "make install clean" i have the message : "make - command not found"
How can I get this command ?
-
Add the developers package or install a developers version right from the start. Btw, this is not officially supported.
-
I know logrotate is not officially supported but I wish it can works on pfsense :o
I install developper's version and I'll said you my configuration after that.
-
Just be warned, squid will keep writing to the old log if you rotate it with logrotate and you'll be in a world of hurt unless you restart squid or use it to rotate it's own log.
IMO it sounds like your "chief" has a solution that's looking for a problem and isn't thinking clearly ;)
-
I used logrotate yesterday and this morning a file was created name "access.log.1.gz" .
I wish this afternoon I'll have "access.log.2.gz" .
Do logrotate clean principal file (access.log) after he create a new one ? How it work ?
-
Uhm… this is a forum about pfSense.
You are asking the wrong questions in the wrong place.
http://www.linuxcommand.org/man_pages/logrotate8.html
Why not ask uncle google if there are mailinglists/forums for logrotate? -
-
sorry guys I'll search by myself ;)
Thanks a lot for all
-
sorry guys I'll search by myself ;)
Thanks a lot for all
Edit /usr/local/pkg/squid.inc
$conf .= <<<eod<br>icp_port $icp_port
pid_filename $pidfile
cache_effective_user proxy
cache_effective_group proxy
error_directory $errordir
visible_hostname $hostname
cache_mgr $emailaccess_log $logdir_access
cache_log $logdir_cache
cache_store_log none
shutdown_lifetime 3 seconds
logfile_rotate 31 <<–- add option hereEOD;
I have mine set for 31 rotations.</eod<br>