October 18, 2020 | 12:20

Conditional Logging with Apache

I’ve started using Apache-Exporter1 for monitoring and checking this weekend how useful it is and how it can be integrated into my Prometheus2 monitoring enviroment. The server-status requests inevitably lead to more “background noise” in the Apache logfiles. The screenshot below clearly shows in the upper less section: Of course the requests cannot be prevented, but you can manipulate what Apache writes in its logfiles. It’s called conditional logging and allows you to set variables with SetEnvIf3 to any regex on each request. With SetEnvIfExpr it is even possible to perform expressions4, for instance to check if a request comes from your inside network segments: Read more

© 2026 Tomas Jakobs - Imprint and Legal Notice

Member of UberBlgr Webring:   < Back > Next >  

Support this blog - Donate a Coffee