More logging questions - hostname again

Gaute Amundsen gaute at pht.no
Tue Jun 26 15:52:03 CEST 2007


Hi again.

Still fumbling around with the logs..
I have a feeling this has been mentioned before, but I can't find it right 
now.

The problem is that AWstats really need a separate field for server hostname 
(apache: %v) to filter separate vhosts on.

I'ts not good to use a simple regexp filter since referer could trigger a 
false match.

I've tried various variants of:

varnishncsa -c -I 'hostname' -r /var/log/varnish/varnish.log

but without luck.

The only option I can think of right now is to make my own log preprocessor to 
split the hostname out of the request. 
(quite unusual place to have it, is it not?)

Any sed wizards out there?
sed -e 's#\("\([A-Z]\+\) http://\([^/]*\)\)#\3 \1#g'

Or any better sugestions?

Regards 

Gaute Amundsen



More information about the varnish-misc mailing list