Results 1 to 4 of 4

Thread: squid/sarg log file problem

  1. #1
    Join Date
    Sep 2010
    Beans
    120

    Question squid/sarg log file problem

    Hi,

    Im having a slight issue with squid/sarg, I think my issue is more on the squid side....

    I have noticed lately that squid isnt creating a new log file everything is being dumped into the access.log all the cache is also being stored in the cache.log and as a result
    when sarg creates its daily logs, the log file starts from

    2014Feb24-2014Mar10 Mon Mar 10 08:06:53 2014 49 14.40G 294.00M
    2014Feb24-2014Mar08 Sat Mar 8 06:31:53 2014 49 13.91G 284.02M
    2014Feb24-2014Feb27 Thu Feb 27 14:35:03 2014 41 7.09G 173.07M
    2014Feb24-2014Feb26 Wed Feb 26 15:35:53 2014 38 2.46G 64.82M
    2014Feb14-2014Feb17 Mon Feb 17 08:09:36 2014 31 800.30M 25.81M
    2014Jan25-2014Feb14 Fri Feb 14 16:24:52 2014 59 22.67G 384.32M


    does anyone know how i could possibly resolve this?


    thanks in advance.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,853
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: squid/sarg log file problem

    I've not understood this question when you posted it in the past. Are you saying you want to have SARG generate a daily report? Probably the simplest solution is to rotate the access logs daily using logrotate.

    Create a file called "squid" in /etc/logrotate.d/ with the following content:
    Code:
    /var/log/squid/access.log
    {
            rotate 15
            daily
            missingok
            notifempty
            postrotate
                /usr/sbin/squid -k rotate 2>/dev/null
            endscript
    }
    This generates a new squid log every day and preserves the prior fifteen days of logs in /var/log/squid.
    Last edited by SeijiSensei; March 10th, 2014 at 02:59 PM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Sep 2010
    Beans
    120

    Re: squid/sarg log file problem

    Thanks dude Ill give this a try

    my squid is not currently generating a new squid log file so all the data is being stored in 1 file and it seems like when i do my Report using sarg, it generates a report with all the information in 1 report

    2014Feb24-2014Mar10 Mon Mar 10 08:06:53 2014 49 14.40G 294.00M

    will let you know what happens.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,853
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: squid/sarg log file problem

    Oh, one other thing. You'll need to tell SARG to analyze /var/log/squid/access.log.1, since that will be yesterday's data after rotation.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •