Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: cool34000 on December 31, 2006, 06:19:03 PM

Title: SARG not reporting correctly with DansGuardian
Post by: cool34000 on December 31, 2006, 06:19:03 PM
Hi there !

I'm running SARG and DansGuardian on SME 7 server and I've noticed that SARG is not reporting IPs correctly in the web reports (127.0.0.1)

After doing a
Code: [Select]
config setprop sarg language French
config setprop sarg values abbreviation
config setprop sarg logfile dansguardian
/usr/bin/sarglog dansguardian
and of course changing the loglevel to squid in dansguardian.conf
SARG is still reporting localhost !!!

It seems that one line have not been commented in the template :
Quote
# sarg.conf
#

{
 my $language = $sarg{'language'} || 'English';
 my $logfile  = $sarg{'logfile'}  || 'squid';
 my $values   = $sarg{'values'}   || 'bytes';

 $OUT .= "language $language\n";
 $OUT .= "access_log /var/log/$logfile/access.log\n";
 $OUT .= "title \"$logfile user access reports\"\n";
 $OUT .= "displayed_values $values\n";

 if ($logfile eq 'dansguardian')
 { $OUT .= "dansguardian_conf /etc/dansguardian/dansguardian.conf\n"; }

}

# sarg.conf
#
# TAG:  language
#   Available languages:
#      Bulgarian_windows1251
#      Catalan
#      Czech
#      Dutch
#      English
#      French
#      German
#      Greek
#      Hungarian
#      Indonesian
#      Italian
#      Japanese
#      Latvian
#      Polish
#      Portuguese
#      Romanian
#      Russian_koi8
#      Russian_UFT-8
#      Russian_windows1251
#      Serbian
#      Slovak
#      Spanish
#      Turkish
#
#language English

# TAG:  access_log file
#       Where is the access.log file
#       sarg -l file
#
#access_log /usr/local/squid/var/logs/access.log
access_log /var/log/squid/access.log
The last line should be commented !!!

So here's a quick fix for those running both SARG and DansGuardian : (it's not need if you don't use DansGuardian, but should be corrected anyway)
Code: [Select]
sed -e "s/access\_log \/var\/log\/squid\/access.log/#access\_log \/var\/log\/squid\/access.log/" /etc/e-smith/templates/etc/sarg/sarg.conf >/etc/e-smith/templates/etc/sarg/sarg.conf.new
mv -f /etc/e-smith/templates/etc/sarg/sarg.conf.new /etc/e-smith/templates/etc/sarg/sarg.conf
Reapply parameters and expand SARG's template again. SARG will reports correctly !
Title: SARG not reporting correctly with DansGuardian
Post by: Franco on December 31, 2006, 06:53:52 PM
Stephen Noble from dungog has prepared a sarg package specially for those that use sarg and Dans.
You should try that!

Thanks,
Title: SARG not reporting correctly with DansGuardian
Post by: cool34000 on January 01, 2007, 02:59:39 AM
I forgot to say which rpms I'm using...
It's of course the ones from dungog.net (the ones based on MasterSleepy's)
Quote
sarg-2.2.1-1.el4.rf.i386.rpm
smeserver-sarg-2.2.1-2.noarch.rpm
Title: SARG not reporting correctly with DansGuardian
Post by: Franco on January 01, 2007, 04:16:46 AM
How are you using sme, Server-only or Gateway?
You should open a bug in the bugtracker for this.

Thanks,
Title: SARG not reporting correctly with DansGuardian
Post by: cool34000 on January 01, 2007, 06:12:53 AM
I'm running in server-only at home and server+gateway at work and both have the same problem.

This is the first time I found a bug so I've managed to create an account on bugzilla...
But now I'm totally lost in the bugzilla webpages as it's really not readable and understandable for a noob like me. Kind of confused, I don't know what fields need to filled...
Title: SARG not reporting correctly with DansGuardian
Post by: Franco on January 01, 2007, 06:59:00 AM
Once you're logged in:
-Enter a new bug report: http://bugs.contribs.org/enter_bug.cgi
-Choose SME Contribs
-Choose smeserver-dansguardian
-Write what's happening with all the important information

Thanks,
Title: SARG not reporting correctly with DansGuardian
Post by: cool34000 on January 01, 2007, 08:20:10 AM
Done, it's here (http://bugs.contribs.org/show_bug.cgi?id=2217)
Was trying to set the but to SARG but it wasn't in the list... Thanks for giving me the way :oops:
Title: SARG not reporting correctly with DansGuardian
Post by: Franco on January 01, 2007, 03:53:14 PM
Merci à toi

Thanks,