Solved

Generated by Webalizer Version 2.01

Posted on 2004-10-18
6
9,349 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 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

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.…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

626 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