LogParser 查询仅从 IIS 日志中获取外部 IP 地址?

发布于 2024-08-20 05:13:17 字数 403 浏览 3 评论 0原文

我在 ServerFault 并且没有任何运气,所以我想我应该在这里尝试一下。

我正在开发一个供外部访问者和内部员工使用的公共网站。我正在追踪外部访问者的点击量,但我想不出过滤掉内部 IP 范围的好方法。

使用 LogParser,按 IP 范围过滤 IISW3C 日志的最佳方法是什么?

这是我到目前为止所想到的,这不可能是最好或最有效的方法。

WHERE [c-ip] NOT LIKE (10.10.%, 10.11.%)

感谢任何帮助。

I tried this question over at ServerFault and didn't have any luck, so I thought I'd try here.

I'm working on a public website that is used by both external visitors and internal employees. I'm after the external visitor hits, but I can't think of a good way to filter out the internal IP ranges.

Using LogParser, what is the best way to filter IISW3C logs by IP range?

This is all I've come up with so far, which can't possibly be the best or most efficient way.

WHERE [c-ip] NOT LIKE (10.10.%, 10.11.%)

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁年轻赶紧闹 2024-08-27 05:13:17

唯一的其他选项是在 where 子句中使用 IPV4_TO_INT 和 Bitwise 函数。就我个人而言,我认为您现在所拥有的将更具可读性并且更易于维护。

The only other option is to use IPV4_TO_INT and Bitwise functions in your where clause. Personally I think what you have right now will be more readable and easier to maintain.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文