Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Generated by Webalizer Version 2.01

Posted on 2004-10-18
6
Medium Priority
?
9,416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 400 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 1600 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
URL rewriting in AWS CloudFront

A quick how-to guide to implement with a Lambda function!

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
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 …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.
Suggested Courses

721 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