SARG – Squid Analysis Report Generator and Internet Bandwidth Monitoring Tool

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

106 Responses

  1. chanthy says:

    How to fix sarg record user, I do follow like this but it not record user and record only this computer. Please help me too. http://prntscr.com/d2exvn

  2. budi says:

    hi there, i wonder if sarg can be used in integration with mikrotik?

    • Ravi Saive says:

      @Budi,

      I don’t think sarg will work with mikrotik, never tried it so far and really don’t have any clue about it..sorry..

  3. Rangachisi says:

    Hello there. Thank you for the great tutorial. i am trying to install SARG on Centos 7 and ran to the problem below when trying to run make install

    [root@localhost sarg-2.3.10]# make install
    cd po ; make install
    make[1]: Entering directory `/home/squid/sarg-2.3.10/po’
    *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19
    make[1]: *** [check-macro-version] Error 1
    make[1]: Leaving directory `/home/squid/sarg-2.3.10/po’
    make: *** [install-po] Error 2

    i have downloaded and replaced the make.in.in file in “/usr/share/gettext/po/” with a version 0.19 and also the make.in.in in “/home/squid/sarg-2.3.10/po” but i still get the same error

    someone please help

    • Ravi Saive says:

      @Rangchisi,

      Please visit the following sarg official support forum link, here they’ve discussed about the same sarg compile error, might you will find solution here..

      https://sourceforge.net/p/sarg/discussion/363374/thread/e4477b89/

    • Ashutosh says:

      @Rangachisi..

      [root@localhost sarg-2.3.10]# make install
      cd po ; make install
      make[1]: Entering directory `/home/squid/sarg-2.3.10/po’
      *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19
      make[1]: *** [check-macro-version] Error 1
      make[1]: Leaving directory `/home/squid/sarg-2.3.10/po’
      make: *** [install-po] Error 2

      So that there is this error at compile time :
      Access the po folder SARG :

      [root@localhost sarg-2.3.10]# cd po
      [root@localhost po]# pwd
      /home/squid/sarg-2.3.10/po

      Then edit :
      [root@localhost po]# vim Makefile.in.in

      Look for the line :
      GETTEXT_MACRO_VERSION = 0.18

      Put like this:
      GETTEXT_MACRO_VERSION = 0.19

      Return to previous directory to start the compilation :

      [root@localhost po]# cd ..
      [root@localhost sarg-2.3.10]# ./configure
      [root@localhost sarg-2.3.10]# make
      [root@localhost sarg-2.3.10]# make install

      Now Successful Installation Done.
      Now edit your sarg.conf as you want….

      OR
      Update gettext verision 0.18 to 0.19
      Check your gettext version- # gettext – -version

  4. JB says:

    Hi Ravi,

    I have just been asked to pull a squid report for a date that has passed, now my challenge at the moment is that I haven’t been able to configure sarg to generate auto report I manually run the sarg -x command….the date in question is on a weekend which i normally dont generate any reports as we dont usually have users in the office.

    Will it be possible to generate such a report?

    • Ravi Saive says:

      @JB,

      If you have logs in place for all previous dates, you can manually run the sarg command to generate report for that date. To be fact, I really don’t know how we can achieve this, but I am sure there is a way, just read the man pages of sarg, you will have some idea..

  5. JB says:

    Hi Ravi,

    Once again thank you so much for getting me up and running with SARG.

    I have been using it for a while now and we accessing reports. Now a new challenge for me as came up, a few of our users have complained that they can not access the internet outside of the office i.e their wfi at home or public wifi. Does this maybe have something to do with the access list in squid? whats the best way to set up the acl so that users can access the internet without having to modify internet settings all the time?

    Regards
    JB

  6. JB says:

    Hi Ravi,

    Thank you so much now my squid proxy is up and running and I can generate reports.

    Just a quick question, in the user reports under access sites,it shows localhost 26143 then its says denied.

    Do you maybe know what does that link to?

    • Ravi Saive says:

      @JB,

      Nothing to worry, it’s just a total bandwidth of request comes to localhost, but got access denied due to security…

  7. Nick says:

    To get sarg to compile without the error: “gettext version 0.18 but the autoconf macros are from gettext version 0.19” I had to edit the configure file, search for 0.19 and change that to 0.18. After that, running make install worked fine.

    • Ravi Saive says:

      @Nick,

      Thanks for updating about the gettext version problem, and I am glad that you’ve found a way to fix that, hope it will help others too..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?