From 61864637dcbf256acbd408dce96948dc5b3b9521 Mon Sep 17 00:00:00 2001 From: Bertrand Lallau Date: Mon, 28 Aug 2017 09:18:45 +0200 Subject: [PATCH] Fluentd "progname" field not always generated 'progname' is actually only fullfilled for Openstack services logs. They are missing for MariaDB and RabbitMQ logs. When using Kibana, "progname" field appears empty, hence it's difficult to known where logs comes from. Change-Id: Ifcbfd981a34a8d64ea69d37934c7f0fae10a90b5 Closes-Bug: #1713412 --- .../templates/conf/filter/00-record_transformer.conf.j2 | 7 +++++++ .../roles/common/templates/conf/input/02-mariadb.conf.j2 | 2 +- .../roles/common/templates/conf/input/03-rabbitmq.conf.j2 | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2 b/ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2 index 1dbfaf5ecb..1db6f47cb7 100644 --- a/ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2 +++ b/ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2 @@ -6,3 +6,10 @@ programname ${tag_parts[5]} + + + @type record_transformer + + programname ${tag_parts[1]} + + diff --git a/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 b/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 index d71c663207..b435cb1a48 100644 --- a/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 +++ b/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 @@ -3,7 +3,7 @@ @type tail path /var/log/kolla/mariadb/mariadb.log pos_file /var/run/{{ fluentd_dir }}/mariadb.pos - tag mariadb.* + tag infra.mariadb format multiline format_firstline /^\d{6}/ format1 /^(?