eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
370 stars 120 forks source link

Feature request: Regex replace filter #54

Open Talkless opened 7 years ago

Talkless commented 7 years ago

Hi,

If I understand correctly, URLWithQueryWithoutFollowingParameters works with ? parameters, but it is not helpful for so-called "clean" URLs.

For example, if there is url something like:

http://my.domain.com/some/api/get_info_since/3234324

Which means that every request with that version tag/counter will be treaded as unique URL with it's own statistics, right?

It would be nice to have, for example this way to filter/clean URLS:

RegexReplaceFilter=URL,(get_info_since)/d+,$1/_counter_

I am not sure about how/would captures work, but you probably get the point.

Multiple filters could supported, and maybe, for better performance, some conditioning could be applied:


RegexReplaceFilter1=URL,(get_info_since)/d+,$1/_counter_
RegexReplaceCodeFilter1=200
RegexReplaceCodition1=VHOST,my-webapp-with-clean-urls.com

I wish I could help implement it, if maintainer would approves, but I am not experienced in Perl...
Talkless commented 7 years ago

@eldy Could you please comment this feature request?