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: I1a452a627aaa49adc23aa9a7e30a9d27bddac2fb
This commit is contained in:
Major Hayden 2018-02-23 08:40:19 -06:00
parent 3d767328c7
commit fb5c7c1fe1
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 3 additions and 0 deletions

View File

@ -18,3 +18,6 @@ buffer-size = {{ cinder_wsgi_buffer_size }}
thunder-lock = true
logfile-chmod = 644
pidfile = /var/run/{{ item.service_name }}/{{ item.service_name }}.pid
# Avoid filling up the logs with health check requests from haproxy.
route-user-agent = ^osa-haproxy-healthcheck$ donotlog: