Problem configuring SARG + SQUID

Posted on 2006-04-12
Last Modified: 2007-12-19
Hi guys,
i just set up (im just beginner though) a proxy linux box, fedora 5.
then with webmin i installed squid (that is working , i have some test clients browsing the net through it) and i want ti install SARG.
Well..i download sarg, install it and then, when i try to generate the first time report it says like " open file error +6.5nr such file doesnt exist (referring to the /var/log/squid/access.log that indeed exist and i set with everyone full control (just to be sure it can touch it..)

whats the problem?????
I checked all parameters are correct..but still...cant create the first "report" from webmin menu...
Any idea?
Question by:djmc26
    LVL 14

    Expert Comment

    how you install squid? from source? you need to specify sarge where is the file squid/access.log that is the error. if you install in /usr/local/squid you need to specify in sarge.conf or whatever conf file that the access.log is in /usr/local/squid/log/access.log
    LVL 19

    Expert Comment

    Right. you need to tell SARG where is the squid log file.
    for Fedora squid install I guess it is at /var/log/squid/access.log

    and sarg.conf can be at /etc/sarg/sarg.conf

    mine has (I do not include most "standard" configs):
    language English
    access_log /usr/local/squid/var/logs/access.log
    graphs yes
    title "Internet User Access Reports"
    output_dir /var/www/htdocs/squid-reports
    resolve_ip yes
    user_ip no
    topuser_sort_field BYTES reverse
    overwrite_report yes
    use_comma yes
    report_type topsites sites_users users_sites date_time denied auth_failures site_user_time_date

    you can edit it to show what you want.  note the "output_dir" where all the sarg html reports will be saved. I put them at my apache html directory =)
    LVL 3

    Expert Comment

    Try to install your SARG from :-

    Choose the FC3, it should be compatible.

    Then a minimum modification of the sarg.conf file. follow the instruction as above. Your SARG should be working very easily.
    BTW, this rpm file will automatically creates CRON jobs. check out the /etc/cron.daily directory.


    Author Comment

    Actually, answering to redimido e pablo:
    i already checked that, ....the conf file ACTUALLY point to the right location, access log, as i said, exist and it is in the position i told sarg to look for start thinking its something "buggy"
    Access.log file has even permission to read and write for everyone (to avoid maybe some user perm trouble..) but still it gives that incredibly strange error:

    "sarg -l /var/log/squid/access.log
    SARG: records in file 1950, reading 0.00%
    sort: open failed: +6.5nr no such file or directory (i repeat it EXISTS !!!)
    SARG: (index) cant open the file /var/www/sarg/index.sort
    SARG: Records in file 1950, reading 100.00%"

    SARG FAILED ! see above output for detail


    i will try now kiitii solution installing this version of sarg above...
    LVL 19

    Expert Comment

    mmhh... and can SARG write to /var/www/sarg/index.sort?
    do user and the permissions are setup correctly for the temporary index file? SARG needs to write some files itself to know what records are already processed...

    Author Comment

    actually there is NO index.sort file, i expected the program to create it on the fly, i put the /www/sarg directory in write to everyone (saying in win mode :) ) just to let i create its temp file...

    Author Comment

    I SOLVED IT !!

    i have to create an "empty document" called index.sort and put into /var/www/sarg/ directory..
    Now it WORKS LIKE A CHARM !!

    quite strange nobody wrote it into the howto or readme files :) anyway i hope that this will help someone else in this task !!!


    Author Comment

    But...the problem is that when i try to generate it again...if i dont put manually an index.sort file, it still doesnt work..CRAP :(
    LVL 19

    Accepted Solution

    create a bash script with the orders you need, e.g.:
    touch /var/www/sarg/index.sort
    sarg -options_here
    and then you can use this script whenever you need.

    whoever, it seems like sarg has a patch for the problem you have, and it was fixed on newer (2.x) versions of sarg.

    maybe you need to upgrade =)
    LVL 19

    Expert Comment

    sorry:  "whoever"  should be "however"

    Expert Comment

    Hi all

    Does anyone know what the latest sarg version is and where to find it. I am having the same problem when generating reports, it fails. I am using sarg 2.1

    LVL 19

    Expert Comment


    2.1 is last version.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now