Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Documentation for Extra Sections incorrect?

Developers
2004-11-10
2012-10-11
  • The or is now "||"
    and the AND is still not available

     
  • Hi,

    I'm also, a lot interested into the AND implementation in
    ExtraSectionCondition. It seems to not be reimplemented, isn't it?
    I need count the nb of hits for a specific URL on a specific Virtual Host
    stored into an extra1 in the log file. How you will suggest to do it? For me,
    it would be an AND operator on the ExtraSectionCondition like:
    ExtraSectionCondition1="extra1,^my.virtual.host$ && URL,^\/myrul$"
    I can work on the patch if you want but It seems to me complex to combine the
    AND and the OR, so I plan to limit the usage only to a succession of OR or of
    AND. What do you think?

    Thanks.

     
  • Jean-Luc
    Jean-Luc
    2010-10-07

    Hi,

    It is true that there is no AND in extra sections, but I guess that you do not
    need to change awstats.pl to do what you want.

    Just put the condition about the virtual host in ExtraSectionConditon1 and the
    condition about the URL in ExtraSectionFirstColumnValues1 and you are done.

    Jean-Luc, InternetOfficer AWStats
    Support

     
  • Hi,

    First thanks a lot for this quick reply.
    Sorry to not have been enough clear but in fact what I want exactly is the nb
    of hits per user for a specific VHost on a specific URL. The only solution I
    see for that (but I may be wrong) is:

    ExtraSectionCondition5="extra1,^my.virtual.host(:80)? && URL,\/+index.psp$"
    ExtraSectionFirstColumnTitle5="User"
    ExtraSectionFirstColumnValues5="HOST,(.*)"
    ExtraSectionFirstColumnFormat5="%s"
    ExtraSectionStatTypes5=HL

    Or may be there is a solution by doing a plugin?

    You may also be surpeise by the (:80)?, but this is because with my LogFormat
    = "%extra1:%extra2 %host %other... extra1 should capture the VHost and extra2
    the port, but when I display the extran, they all have the value
    my.virtual.host:80 even extra3 that should not exist. As I cannot figure out
    why, I found this workaround. May be I should open an other topic for that?

    Thanks.
    Best regards, Christophe.

     
  • Jean-Luc
    Jean-Luc
    2010-10-07

    Christophe,

    Sorry that my suggestion above does not work for you.

    You might need a special software development or try with a separate config
    file for my.virtual.host. I mean that it would generate a complete set of
    AWStats reports with %virtualname in LogFormat and with
    SiteDomain="my.virtual.host" or SiteDomain="my.virtual.host:80"
    and it would include the extra section showing the hosts with the condition on
    the URL. Not sure that it meets your requirements though.

    Jean-Luc, InternetOfficer AWStats
    Support