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
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 :
# 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)
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 !