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: I9b0239a9a24861734badbe874dc3e1139d7100c6
This commit is contained in:
Major Hayden 2018-02-23 08:44:31 -06:00
parent 879550a550
commit e4d5cd0da7
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1

View File

@ -17,3 +17,6 @@ add-header = Connection: close
buffer-size = {{ octavia_wsgi_buffer_size }} buffer-size = {{ octavia_wsgi_buffer_size }}
thunder-lock = true thunder-lock = true
logfile-chmod = 644 logfile-chmod = 644
# Avoid filling up the logs with health check requests from haproxy.
route-user-agent = ^osa-haproxy-healthcheck$ donotlog: