Hello all,

Am un sarg instalat care genereaza corect statisticile zilnice (cu tot cu 
index.html)!

Pentru cele saptaminale si cele lunare, desi genereaza statisticile, NU 
genereaza si pagina index.html din directorul weekly sau monthly! Din aceasta 
cauza, nu pot accesa aceste statistici via unui browser web!

Asa arata /etc/sarg/sarg.conf:
access_log /var/log/squid/access.log
output_dir /var/www/sarg/ONE-SHOT
resolve_ip yes
mail_utility mail
show_successful_message no
external_css_file /var/www/sarg/sarg.css

# ls /var/www/sarg/weekly/
2006Nov26-2006Dec02  images
Se vede ca lipseste index.html

Scriptul care genereaza statisticile zilnice arata astfel:
cat /etc/cron.daily/sarg

#!/bin/bash

# Get yesterday's date
YESTERDAY=$(date --date "1 days ago" +%d/%m/%Y)

exec /usr/bin/sarg \
        -o /var/www/sarg/daily \
        -d $YESTERDAY &>/dev/null
exit 0

Scriptul care genereaza statisticile saptaminale arata astfel:
cat /etc/cron.weekly/sarg
#!/bin/bash
LOG_FILES=
if [ -s /var/log/squid/access.log.1.gz ]; then
        LOG_FILES="$LOG_FILES -l /var/log/squid/access.log.1.gz"
fi
if [ -s /var/log/squid/access.log ]; then
        LOG_FILES="$LOG_FILES -l /var/log/squid/access.log"
fi

# Get yesterday's date
YESTERDAY=$(date --date "1 days ago" +%d/%m/%Y)

# Get one week ago date
WEEKAGO=$(date --date "7 days ago" +%d/%m/%Y)

exec /usr/bin/sarg \
        $LOG_FILES \
        -o /var/www/sarg/weekly \
        -d $WEEKAGO-$YESTERDAY &>/dev/null
exit 0

Any hints?

Alex

_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui