From db0f469614b9542939e4112d476a8be5c1469474 Mon Sep 17 00:00:00 2001 From: Tatsuma Matsuki Date: Wed, 26 Jul 2017 01:33:39 +0000 Subject: [PATCH] Unified Apache access log format Apache access log formats are modified to be consistent with the format defined in wsgi-keystone.conf, which includes the response time (%D) and X-forwarder-For fields. Change-Id: I02aa5eb106fb894196dfb6e22daf2968e27ed3cb Closes-Bug: #1703571 --- ansible/roles/aodh/templates/wsgi-aodh.conf.j2 | 3 ++- ansible/roles/cinder/templates/cinder-wsgi.conf.j2 | 3 ++- ansible/roles/freezer/templates/wsgi-freezer-api.conf.j2 | 3 ++- ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 | 3 ++- ansible/roles/horizon/templates/horizon.conf.j2 | 3 ++- ansible/roles/panko/templates/wsgi-panko.conf.j2 | 3 ++- ansible/roles/zun/templates/wsgi-zun.conf.j2 | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 index 95fe8462b0..33294f3a8a 100644 --- a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 +++ b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 @@ -19,7 +19,8 @@ TraceEnable off ## Logging ErrorLog "/var/log/kolla/aodh/aodh_wsgi_error.log" ServerSignature Off - CustomLog "/var/log/kolla/aodh/aodh_wsgi_access.log" combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog "/var/log/kolla/aodh/aodh_wsgi_access.log" logformat WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }} WSGIProcessGroup aodh diff --git a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 index 23327fce57..1935bdcb79 100644 --- a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 +++ b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 @@ -13,5 +13,6 @@ TraceEnable off ErrorLogFormat "%{cu}t %M" ErrorLog /var/log/kolla/cinder/cinder-api.log - CustomLog /var/log/kolla/cinder/cinder-api-access.log combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat diff --git a/ansible/roles/freezer/templates/wsgi-freezer-api.conf.j2 b/ansible/roles/freezer/templates/wsgi-freezer-api.conf.j2 index dd76ae7c5d..0206235ae5 100644 --- a/ansible/roles/freezer/templates/wsgi-freezer-api.conf.j2 +++ b/ansible/roles/freezer/templates/wsgi-freezer-api.conf.j2 @@ -11,7 +11,8 @@ TraceEnable off WSGIScriptAlias / {{ python_path }}/freezer_api/cmd/wsgi.py ErrorLog {{ freezer_log_dir }}/freezer-api.log - CustomLog {{ freezer_log_dir }}/freezer-api_access.log combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog {{ freezer_log_dir }}/freezer-api_access.log logformat LogLevel info diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 index e66df6910c..b518197f43 100644 --- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 +++ b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 @@ -7,7 +7,8 @@ TraceEnable off ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log" - CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" logformat WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }} WSGIProcessGroup gnocchi diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2 index 83d1c6164a..2e7f2a8910 100644 --- a/ansible/roles/horizon/templates/horizon.conf.j2 +++ b/ansible/roles/horizon/templates/horizon.conf.j2 @@ -6,7 +6,8 @@ TraceEnable off LogLevel warn ErrorLog /var/log/kolla/horizon/horizon.log - CustomLog /var/log/kolla/horizon/horizon-access.log combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog /var/log/kolla/horizon/horizon-access.log logformat WSGIScriptReloading On WSGIDaemonProcess horizon-http processes={{ openstack_service_workers }} threads=1 user=horizon group=horizon display-name=%{GROUP} python-path={{ python_path }} diff --git a/ansible/roles/panko/templates/wsgi-panko.conf.j2 b/ansible/roles/panko/templates/wsgi-panko.conf.j2 index a0fff61b2c..402e216d5f 100644 --- a/ansible/roles/panko/templates/wsgi-panko.conf.j2 +++ b/ansible/roles/panko/templates/wsgi-panko.conf.j2 @@ -6,7 +6,8 @@ TraceEnable off ErrorLog "/var/log/kolla/panko/panko-api-error.log" - CustomLog "/var/log/kolla/panko/panko-api-access.log" combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog "/var/log/kolla/panko/panko-api-access.log" logformat WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess panko group=panko processes={{ openstack_service_workers }} threads=1 user=panko python-path={{ python_path }} WSGIProcessGroup panko diff --git a/ansible/roles/zun/templates/wsgi-zun.conf.j2 b/ansible/roles/zun/templates/wsgi-zun.conf.j2 index 1c40715292..c4f2753cbd 100644 --- a/ansible/roles/zun/templates/wsgi-zun.conf.j2 +++ b/ansible/roles/zun/templates/wsgi-zun.conf.j2 @@ -19,7 +19,8 @@ TraceEnable off ## Logging ErrorLog "/var/log/kolla/zun/zun_api_wsgi_error.log" ServerSignature Off - CustomLog "/var/log/kolla/zun/zun_api_wsgi_access.log" combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat + CustomLog "/var/log/kolla/zun/zun_api_wsgi_access.log" logformat WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess zun group=zun processes={{ openstack_service_workers }} threads=1 user=zun python-path={{ python_path }} WSGIProcessGroup zun