Solved

Generated by Webalizer Version 2.01

Posted on 2004-10-18
6
9,298 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS/RHEL 7 Linux maillog worldwide readable 2 88
How to enable sync between two yum repo? 1 39
cannot rename datastore 3 70
Linux MD5 Hash 7 36
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
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.

840 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