From a32cddca4974b9ee43c91544be19014a9748c450 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 9 Dec 2019 13:52:38 +0000 Subject: [PATCH] Fix fluentd parsing of WSGI logs WSGI log files use a different input configuration than OpenStack log files. Currently this depends on log files matching either *-access.log or *-error.log. Some services use *_access.log or *_error.log, so are not parsed correctly. This change modifies the fluentd configuration to accept an underscore or hyphen for WSGI log file names. Change-Id: I566d6cac0b6749054fd5422ec8f36f99dacb1db7 Closes-Bug: #1720371 --- ansible/roles/common/templates/conf/input/00-global.conf.j2 | 4 +++- .../common/templates/conf/input/04-openstack-wsgi.conf.j2 | 2 +- .../notes/fix-wsgi-log-collection-c9f347096394df5c.yaml | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/fix-wsgi-log-collection-c9f347096394df5c.yaml diff --git a/ansible/roles/common/templates/conf/input/00-global.conf.j2 b/ansible/roles/common/templates/conf/input/00-global.conf.j2 index 54b863f828..c44d331e36 100644 --- a/ansible/roles/common/templates/conf/input/00-global.conf.j2 +++ b/ansible/roles/common/templates/conf/input/00-global.conf.j2 @@ -49,7 +49,9 @@ "/var/log/kolla/monasca/monasca-log-api.log", "/var/log/kolla/neutron/dnsmasq.log", "/var/log/kolla/*/*-access.log", - "/var/log/kolla/*/*-error.log"] + "/var/log/kolla/*/*-error.log", + "/var/log/kolla/*/*_access.log", + "/var/log/kolla/*/*_error.log"] pos_file /var/run/{{ fluentd_binary }}/kolla-openstack.pos tag kolla.* format multiline diff --git a/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 b/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 index cf0fe83323..130d298c43 100644 --- a/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 +++ b/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 @@ -1,7 +1,7 @@ # Note (blallau): to manage Apache and WSGI log files @type tail - path /var/log/kolla/*/*-access.log,/var/log/kolla/*/*-error.log + path /var/log/kolla/*/*-access.log,/var/log/kolla/*/*-error.log,/var/log/kolla/*/*_access.log,/var/log/kolla/*/*_error.log pos_file /var/run/{{ fluentd_binary }}/kolla-openstack-wsgi.pos tag kolla.* format /^(?.*)$/ diff --git a/releasenotes/notes/fix-wsgi-log-collection-c9f347096394df5c.yaml b/releasenotes/notes/fix-wsgi-log-collection-c9f347096394df5c.yaml new file mode 100644 index 0000000000..16c92686ad --- /dev/null +++ b/releasenotes/notes/fix-wsgi-log-collection-c9f347096394df5c.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with fluentd parsing of WSGI logs for Aodh, Masakari, + Qinling, Vitrage and Zun. See `bug 1720371 + `__ for details.