Solved

Generated by Webalizer Version 2.01

Posted on 2004-10-18
6
9,189 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

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

Author Comment

by:aot2002
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

12 Experts available now in Live!

Get 1:1 Help Now