?
Solved

Problem configuring SARG + SQUID

Posted on 2006-04-12
14
Medium Priority
?
7,224 Views
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?
THANKS IN ADVANCE !!!
0
Comment
Question by:djmc26
12 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16436580
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
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16442751
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 =)
0
 
LVL 3

Expert Comment

by:kiitii
ID: 16442813
Try to install your SARG from :-
http://dag.wieers.com/packages/sarg/

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.



0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:djmc26
ID: 16443090
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 it...im 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...
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16443389
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...
0
 

Author Comment

by:djmc26
ID: 16444258
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...
hmmm...
0
 

Author Comment

by:djmc26
ID: 16444265
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 !!!
THANKS TO YOU ALL GUYS !!!
i.

0
 

Author Comment

by:djmc26
ID: 16444271
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 :(
0
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 500 total points
ID: 16449758
create a bash script with the orders you need, e.g.:

regenerate_again.sh
--------------------------
!#/bin/sh
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 =)
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16449760
sorry:  "whoever"  should be "however"
0
 

Expert Comment

by:jacoventer
ID: 16673269
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

Thanks
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16679933
http://sarg.sourceforge.net/

2.1 is last version.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

616 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