Webalizer spitting out BS stats

Red Squirrel

[H]F Junkie
Joined
Nov 29, 2009
Messages
9,223
I setup Webalizer a while back on my old web server. Since apache does not put the domain in the log file I had to split up my logs on a per sub/domain basis and created separate webalizer scripts to run so as to ensure it's putting proper stats from right domain into right graphs etc...

So I wrote some scripts to automate this to some extent so it's easier when I add a new sub domain or new domain. It worked fine.

on new server, I don't know WTH is going on, but all the stats are completely bloated. Sites that I know as a fact barely get any traffic are showing up as having like 200,000 page views per month. What's messed is that they are almost all identical stats, but enough that they arn't actually 100% the same, just very close.

It also seems that some webalizer data is somehow making it into other data, it's like if everything is just being mish mashed together. I really don't get what's going on.

This is my script:

Code:
#!/bin/bash

TEMPCONF="/tmp/tmpwebalizerconf.conf"


DOMAIN=$1
LOGFILE=$2

if [ $# -ne 2 ] ; then
echo "Usage: webalizescript.sh [domain] [fulllogfilename]"
exit
fi


echo "Running webalizer for ${DOMAIN} (${LOGFILE})..."


mkdir -p "/localdata/sysweb/secure/webalizer/${DOMAIN}" >/dev/null


echo "LogFile         /var/log/httpd/${LOGFILE}" > $TEMPCONF

echo "LogType clf" >>  $TEMPCONF

echo "OutputDir       /localdata/sysweb/secure/webalizer/${DOMAIN}" >> $TEMPCONF

echo "Incremental     yes" >> $TEMPCONF

echo "HostName        ${DOMAIN}" >> $TEMPCONF

echo "PageType        htm*" >> $TEMPCONF
echo "PageType        cgi" >> $TEMPCONF
echo "PageType        php" >> $TEMPCONF
echo "PageType        pl" >> $TEMPCONF

/usr/bin/webalizer -v -c $TEMPCONF

rm $TEMPCONF

There is then another script called runall with entries like this:


Code:
./webalizescript.sh example.com example.com-access.log
./webalizescript.sh forums.example.com forums.example.com-access.log

etc...

One for each apache log, as specified in the virtual host config of each sub domain.

This then creates (or is suppose to) a separate webalizer "instance" for each sub domain, so I see the stats only for that one sub domain.

This USED to work. Now for some reason it seems everything is just being mish mashed together. Really not sure why it's doing this.

Is there perhaps a better way to accomplish what I'm trying to do? I just want every single domain/sub domain to have it's own set of stats.

When I try to run it manually it also seems to fail a lot with these errors:

Code:
Child 3 back in task pool
Giving 16 bytes to Child 3
Child 4 getnameinfo failed!
Child 4 could not resolve: 175.25.243.22 (no cache)
Child 4 back in task pool
Giving 16 bytes to Child 4
Child 4 getnameinfo failed!
Child 4 could not resolve: 198.44.0.158 (no cache)
Child 4 back in task pool
Giving 16 bytes to Child 4
Child 4 getnameinfo failed!
Child 4 could not resolve: 192.126.184.18 (no cache)
Child 4 back in task pool
Giving 16 bytes to Child 4
Child 3 getnameinfo failed!
Child 3 could not resolve: 180.247.180.170 (no cache)
Child 3 back in task pool
Giving 16 bytes to Child 3
Child 3 getnameinfo failed!
Child 3 could not resolve: 186.182.254.47 (no cache)
Child 3 back in task pool
Giving 16 bytes to Child 3
Child 3 getnameinfo failed!
Child 3 could not resolve: 193.128.33.248 (no cache)
Child 3 back in task pool
Giving 16 bytes to Child 3
Child 3 getnameinfo failed!
Child 3 could not resolve: 41.215.147.98 (no cache)
Child 3 back in task pool
Giving 16 bytes to Child 3
Child 3 getnameinfo failed!
Child 3 could not resolve: 204.124.135.198 (no cache)
Child 3 back in task pool
Child 4 getnameinfo failed!
Child 4 could not resolve: 46.102.234.88 (no cache)
Child 4 back in task pool
Child 2 getnameinfo failed!
Child 2 could not resolve: 116.106.179.146 (no cache)
Child 2 back in task pool
Child 8 getnameinfo failed!
Child 8 could not resolve: 173.208.36.138 (no cache)
Child 8 back in task pool

Just keeps spamming that non stop.

Worked fine on my old server, not sure what's up with this one. OS is CentOS 6.6.
 
Last edited:
Back
Top