Skip logging for haproxy health checks

The health check requests from haproxy cause uwsgi to write a
lot of useless log lines. This can make it more difficult to find
a problem with a particular service.

This patch adds a route to look for the `osa-haproxy-healthcheck`
user agent string, which haproxy uses when performing health checks.
Any requests with that user agent are not logged.

Closes-Bug: 1742718
Change-Id: Ia163d1686274bd3b80a046a945fb7d7ceb5f721c
(cherry picked from commit 943b5c560b)
This commit is contained in:
Major Hayden 2018-02-23 08:38:33 -06:00
parent 4615eb0fb2
commit 48019740f8
1 changed files with 3 additions and 0 deletions

View File

@ -18,3 +18,6 @@ lazy-apps = true
add-header = Connection: close
buffer-size = 65535
thunder-lock = true
# Avoid filling up the logs with health check requests from haproxy.
route-user-agent = ^osa-haproxy-healthcheck$ donotlog: