Solved

Generated by Webalizer Version 2.01

Posted on 2004-10-18
6
9,231 Views
Last Modified: 2008-01-09


all logs are here from apache

/etc/httpd/logs/


each one for each site is like so !

wwwsite1-access.log
wwwsite1-error.log
wwwsite3-access.log
wwwsite3-error.log
wwwsite2-access.log
wwwsite2-error.log


how can i run webalizer on the files to show me the information i need
i tried runnning it as

webalizer /etc/httpd/logs/siteone.com-access_log

also tried

webalizer /etc/httpd/logs/*


but i get  all the sites mixed from the *


Correct me if im wrong but i thought i had to have some type of conifiguration in either the httpd.conf to catch the information i needed ?

Or can i do it as im stating and run it on the apache access logs ?


0
Comment
Question by:aot2002
  • 4
6 Comments
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 100 total points
ID: 12337911
You'll have to have a webalizer conf file for each site and in that site you'll specify the name of that site's log files and where to place the site's stat pages. Then you'll run webalizer with each of the config files.
0
 
LVL 1

Author Comment

by:aot2002
ID: 12344858
in my apache config file ????

if so show me a quick example as i removed the default virtual ones with mine along time ago
0
 
LVL 1

Accepted Solution

by:
pfinch earned 400 total points
ID: 12345524
Hey,

I just wrote a quick script to do what you are looking for.

This does not work off webalizer config files.

<snip>
LOGDIR=/etc/httpd/logs/
WEBALIZER=/path/to/webalizer
OUTPUTDIR=$HOME/test
$TITLE="Web Stats for - "

for config in $(dir -1 $LOGDIR |grep access); do
        mkdir $OUTPUTDIR"/"$config
        cat $(echo $LOGDIR"/"$config) |$WEBALIZER -o $OUTPUTDIR"/"$config -t $TITLE$config:
done
</snip>

this will output webalizer reports in the dir
$OUTPUTDIR/whateverthelogfilenameis/*

Hope this helps,

Regards,
Peter
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 1

Author Comment

by:aot2002
ID: 12355466
Error: Can't open log file Stats
mkdir: cannot create directory `MYDOMIAIN FILE NAME' : File exists
0
 
LVL 1

Author Comment

by:aot2002
ID: 12355470
Also i had to change line 4 the $title to TITLE


LOGDIR=/etc/httpd/logs/
WEBALIZER=/usr/bin/webalizer
OUTPUTDIR=/var/www/html/usage
TITLE="Web Stats for - "

for config in $(dir -1 $LOGDIR |grep access); do
        mkdir $OUTPUTDIR"/"$config
        cat $(echo $LOGDIR"/"$config) |$WEBALIZER -o $OUTPUTDIR"/"$config -t $TITLE$config:
done
0
 
LVL 1

Author Comment

by:aot2002
ID: 12438793
its not working ?
what should it be doing as im getting errors ?

Error: Can't open log file Stats
mkdir: cannot create directory `/var/www/html/usage/toosoonbyme.com-access_log.4': File exists
Error: Can't open log file Stats
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now