logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: custom configuration of AWSTATS
Author
jnsunkersett



Joined: 30 Jan 2011
Posts: 23

PostPosted: Thu 29 Sep '11 12:24    Post subject: custom configuration of AWSTATS Reply with quote

Hi,

I am using AWSTATS to analyse the httpd access.log creted by Apache.

I want AWSTATS to match and count only 4 specific urls, but could not achieve it using the
OnlyFiles
and
URLWithQueryWithOnlyFollowingParameters

config parameters;

In the access.log, i am only interested in hits where the URL is

    /freePrasadAvailability.do?parameter=input
    /donation.do?parameter=reset
    /bookDarshan.do?parameter=bookDarshan
    /roomBooking.do?parameter=input


So I tried;
URLWithQueryWithOnlyFollowingParameters="parameter=input"

but awstats counted other URLs too. (I had expected onlt 2)

I also tried
OnlyFiles="REGEX[donation.do\?parameter=reset | \/bookDarshan.do\?parameter=bookDarshan | \/roomBooking.do\?parameter=input | \/freePrasadAvailability.do\?parameter=input]"

but that too failed.

Any clues will be apreciated.

thank you
jeevan
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 30 Sep '11 15:45    Post subject: Reply with quote

The docu[1]says:
Quote:

Enter here list of wanted parameters. For example, with "param", one hit on
# /mypage.cgi?param=abc&id=Yo4UomP9d and /mypage.cgi?param=abc&id=Mu8fdxl3r
# will be reported as 2 hits on /mypage.cgi?param=abc


So that param is not to do what you want. AFAIK that is not possible within awstats.
Maybe you can create a custom log only for awstats that contains only that kinda urls.

You might take a look at http://www.webmasterworld.com/forum92/2638.htm
http://stackoverflow.com/questions/1280220/how-to-use-setenv-with-a-url-parameter

and than
CustomLog logname.log FORTMAT STUFF env=environment-variable


Give it a try

[1] http://awstats.sourceforge.net/docs/awstats_config.html#URLWithQueryWithOnlyFollowingParameters
Back to top
jnsunkersett



Joined: 30 Jan 2011
Posts: 23

PostPosted: Mon 03 Oct '11 10:49    Post subject: Reply with quote

Found a solution.

Specified everything as separate REGEX[]

Quote:

OnlyFiles="REGEX[\/donation\.do\?parameter=reset] REGEX[\/bookDarshan\.do\?parameter=bookDarshan] REGEX[\/roomBooking\.do\?parameter=input] REGEX[\/freePrasadAvailability\.do\?parameter=input]"
Back to top


Reply to topic   Topic: custom configuration of AWSTATS View previous topic :: View next topic
Post new topic   Forum Index -> Other Software