info:webalizer

Action disabled: source

webalizer

Analyser les logs d'Apache avec Webalizer

http://www.panix.com/web/faq/logs/webalizer_man.html

find  /var/local/apache2/blogs/ -name  "access*.gz" | while read i
do
echo $i
webalizer $i -o /w3/stats
done
  1. a name HideAgent. Hide user agents matching name.
  1. r name HideReferrer. Hide referrer matching name.
  1. s name HideSite. Hide site matching name.
  1. u name HideURL. Hide URL matching name.

(attention au droits) genre:

su webadmi
crontab -l
#tout ok
crontab -e

#stat for vhost www.trucmuche.ch
00 07 * * * /w3/trucmuche/stats/stats.sh 2>&1

et le fichier /w3/trucmuche/stats/stats.sh

cd /w3/acultu/fsville/stats
webalizer -u /intranet /var/local/apache2/trucmuche.ch/access_log -o /w3/trucmuche/stats

ici on exclut DocumentRoot/intranet des statistiques

FIXME attention aux droits!

Faire une analyse mensuelle

#!/usr/bin/ksh
#script to launch webalizer on apache gzipped log files from previous month
apachelogrep="/var/local/apache2/blogs/"
str1="access_log."
str2="."
str3=".*"
ladate=`date -u "+%d-%m-%Y-%H-%M"`
lemois=`date -u "+%m"`
lannee=`date -u "+%Y"`
if [[ $lemois == "12" ]]; then
    lannee=`expr $lannee - 1`
    prevM=01
else
    prevM=`expr $lemois - 1`
fi
i=$apachelogrep$str1$lannee$str2$prevM$str3
bla=`ls $i`  
echo webalizer $bla -o /w3/blogs/stats
webalizer $bla -o /w3/blogs/stats

Voir aussi

  • info/webalizer.txt
  • Dernière modification : 2022/05/03 15:30
  • de radeff