• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Is it possible to include Logrotate on PfSense

Scheduled Pinned Locked Moved General pfSense Questions
13 Posts 5 Posters 17.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    morgan14
    last edited by Mar 14, 2008, 1:22 PM

    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 ?

    1 Reply Last reply Reply Quote 0
    • C
      Cry Havok
      last edited by Mar 14, 2008, 2:02 PM

      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.

      1 Reply Last reply Reply Quote 0
      • M
        morgan14
        last edited by Mar 14, 2008, 2:22 PM

        Thanks. But my aims is just to have a copy of access.log each days.

        This file is written on hard disk no ?

        1 Reply Last reply Reply Quote 0
        • C
          Cry Havok
          last edited by Mar 14, 2008, 7:28 PM

          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.

          1 Reply Last reply Reply Quote 0
          • M
            morgan14
            last edited by Mar 17, 2008, 9:27 AM

            @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 ?

            1 Reply Last reply Reply Quote 0
            • H
              hoba
              last edited by Mar 17, 2008, 10:10 AM

              Add the developers package or install a developers version right from the start. Btw, this is not officially supported.

              1 Reply Last reply Reply Quote 0
              • M
                morgan14
                last edited by Mar 17, 2008, 10:31 AM

                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.

                1 Reply Last reply Reply Quote 0
                • C
                  Cry Havok
                  last edited by Mar 17, 2008, 2:19 PM

                  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  ;)

                  1 Reply Last reply Reply Quote 0
                  • M
                    morgan14
                    last edited by Mar 18, 2008, 8:29 AM

                    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 ?

                    1 Reply Last reply Reply Quote 0
                    • G
                      GruensFroeschli
                      last edited by Mar 18, 2008, 8:54 AM

                      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?

                      We do what we must, because we can.

                      Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                      1 Reply Last reply Reply Quote 0
                      • C
                        Cry Havok
                        last edited by Mar 18, 2008, 9:15 AM

                        RTFM:

                        http://www.freebsd.org/cgi/man.cgi?query=logrotate&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE+and+Ports&format=html

                        1 Reply Last reply Reply Quote 0
                        • M
                          morgan14
                          last edited by Mar 18, 2008, 9:22 AM

                          sorry guys I'll search by myself  ;)

                          Thanks a lot for all

                          1 Reply Last reply Reply Quote 0
                          • G
                            grndhog3rd
                            last edited by Apr 22, 2008, 4:52 AM

                            @morgan14:

                            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 $email

                            access_log $logdir_access
                            cache_log $logdir_cache
                            cache_store_log none
                            shutdown_lifetime 3 seconds
                            logfile_rotate 31  <<–- add option here

                            EOD;

                            I have mine set for 31 rotations.</eod<br>

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                              This community forum collects and processes your personal information.
                              consent.not_received