使用 Microsoft Log Parser,您将如何将点击计数与 IP 计数进行聚合?
我正在使用 MS Log Parser 对 IIS 日志进行简单分析。
我想要一个生成报告的查询,该报告指示命中 URL 的唯一 IP 的计数,结果类似于:
URL |唯一 IP | Total_Views
url1 3 100 url2 5 253
等。
我遇到的问题是日志解析器在使用 group by 时不允许 count(DISTINCT c-ip),并且我需要 group by 来获取每个 URL 的点击计数。
有人知道如何在 Log Parser 中进行这种查询吗?
谢谢!
I'm using MS Log Parser to do simple analytics against IIS logs.
I want a query that generates a report indicating the count of unique IPs hitting URLs, resulting in something like:
URL | Unique_IPs | Total_Views
url1 3 100
url2 5 253
etc.
The problem I'm having is that Log Parser doesn't allow count(DISTINCT c-ip) when using a group by, and I need the group by to get the hit count per URL.
Anyone know how to do this kind of query in Log Parser?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看日志解析器很棒! - 示例< em>25) 每日唯一访客应该为您提供一个起点。
由于缺少 DISTINCT,您必须创建 2 个查询。
引用上面的链接以在此处提供完整答案
25) 每天的独立访问者。这需要两次查询。第一个查询从 IIS 日志中选择到 CSV 文件,第二个查询从该 CSV 文件中选择。
查询 1
查询 2
Check out Log Parser Rocks! - example 25) Unique visitors by day should give you a starting point.
Because of the missing DISTINCT you'll have to create 2 queries.
quoting from the above link to provide a full answer here
25) Unique visitors per day. This requires two queries. The first query selects from the IIS logs into a CSV file, and the second selects from that CSV file.
Query 1
Query 2