How to implement Filter for top level URL?

Developers
Pete Neu
2007-02-06
2012-10-11
  • Pete Neu
    Pete Neu
    2007-02-06

    Hello,

    I already asked this on the open discussion page. But nobody replied so
    I suppose there is no standard way to do this. I will have to implent
    this. Can somebody please give me a few hints on how to do this?

    I need for my statistics only the top level urls.

    Say: I have these 2 apps.

    /app1

    /app2

    I only want to know how much traffic is on app1 one or app2. I don't care for traffic on
    /app2/page2.html or /app1/misc1.html. I simply need all request either counted as
    app1 or app2.

    How can I do this?

    cheers,
    Pete

     
    • Andrew Weiner
      Andrew Weiner
      2007-02-06

      Pete,

      You can modify the source code to remove the part of the URL that is unwanted or use the Extra Section to break out the top level'appx' that you want.

      The example below filters for /appx/yyy... but you could change the filter for anything you need.

      ExtraSectionName1="Application Hits"

      ExtraSectionCodeFilter1="200 304"

      ExtraSectionCondition1="URL,^\/app.\/"
      ExtraSectionFirstColumnTitle1="Application Top Level Directory"
      ExtraSectionFirstColumnValues1="URL,\/(.
      )\/"
      ExtraSectionFirstColumnFormat1="%s"
      ExtraSectionStatTypes1=PHLB

      ExtraSectionAddAverageRow1=0

      ExtraSectionAddSumRow1=1
      MaxNbOfExtra1=20
      MinHitExtra1=1

      Input log:
      111.net - - [22/Jan/2006:20:17:05 -0600] "GET /app1/disaster_recovery.htm HTTP/1.1" 200 20223 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; http://www.ittoolkit.com/)"
      111.net - - [22/Jan/2006:20:17:05 -0600] "GET /app1/disaster_recovery.htm HTTP/1.1" 200 20223 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; http://www.ittoolkit.com/)"
      111.net - - [22/Jan/2006:20:17:05 -0600] "GET /app2/disaster_recovery.htm HTTP/1.1" 200 20223 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; http://www.ittoolkit.com/)"
      111.net - - [22/Jan/2006:20:17:05 -0600] "GET /app2/disaster_recovery.htm HTTP/1.1" 200 20223 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; http://www.ittoolkit.com/)"

      Result:

                  Application Hits
      

      Application Top Level Directory Pages Hits Bandwidth Last visit
      app2 2 2 39.50 KB 22 Jan 2006 - 20:17
      app1 2 2 39.50 KB 22 Jan 2006 - 20:17
      Total 4 4 79.00 KB

      Regards,
      Andrew