如何从访问日志中删除负载均衡器污染
我有一对 Sun Web 服务器 (iws6),位于负载平衡器后面。 它想知道 Web 服务器是否已启动并不断请求 /alive.html。 这很好,但我如何不将其记录在我的访问日志中?
如果做不到这一点,我怎样才能让归档程序删除在处理文件时所访问的内容?
我更喜欢比 cron 调用 grep -v alive.html 更优雅的东西
I have a pair of Sun web servers (iws6) sitting behind a load balancer. It likes to know if the web servers are up and continually asks for /alive.html.
That is fine but how do I not log that in my access log?
Failing that, how could I have the archiver strip out that accesses when it roles the file over?
I would prefer something more elegant that cron calling grep -v alive.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以为 Apache 提供有关要抑制哪些日志的规则。 也许IWS也有类似的东西?
http://httpd.apache.org/docs/1.3/logs.html#有条件
You can give Apache rules about what logs to suppress. Maybe IWS has something similar?
http://httpd.apache.org/docs/1.3/logs.html#conditional
日志通常每个条目一行,以便您可以 grep 找到您想要的内容。 这个想法是在文件中包含所有内容,但使用 grep 来读取您关心的部分。 当你阅读它们时,Grep 除了负载均衡器之外的所有内容。
Logs are usually one line per entry so that you can grep for what you want. The idea is to have everything in the file, but to use grep in order to read the parts you care about. Grep for everything but load balancer stuff when you read them.