From 943b5c560b6b9618c35ad5a80b43f781abcc5750 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 23 Feb 2018 08:38:33 -0600 Subject: [PATCH] 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 --- templates/keystone-uwsgi.ini.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/keystone-uwsgi.ini.j2 b/templates/keystone-uwsgi.ini.j2 index b40a9588..bd2c61b5 100644 --- a/templates/keystone-uwsgi.ini.j2 +++ b/templates/keystone-uwsgi.ini.j2 @@ -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: