From fc9f84ea8c39d21bbb62ba9228ca24bc92453bcc Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Tue, 24 Oct 2017 10:04:27 +0100 Subject: [PATCH] Add missing hostnames to fluentd log messages - Sets the hostname on rabbitmq and mariadb log messages according to the local host. - Sets the hostname on syslog log messages by extracting it from the syslog message. In many cases this will be the same as the local host, but it may also be a remote host. Closes-Bug: #1726596 Change-Id: If7c53916d5a355b3aac33d6a62d89d02474e8b53 --- .../common/templates/conf/filter/00-record_transformer.conf.j2 | 1 + ansible/roles/common/templates/conf/input/01-syslog.conf.j2 | 1 + 2 files changed, 2 insertions(+) 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 00c417392d..12b9b566c9 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 @@ -10,6 +10,7 @@ @type record_transformer + Hostname ${hostname} programname ${tag_parts[1]} diff --git a/ansible/roles/common/templates/conf/input/01-syslog.conf.j2 b/ansible/roles/common/templates/conf/input/01-syslog.conf.j2 index 762d48f977..847c0c451d 100644 --- a/ansible/roles/common/templates/conf/input/01-syslog.conf.j2 +++ b/ansible/roles/common/templates/conf/input/01-syslog.conf.j2 @@ -4,5 +4,6 @@ bind {{ api_interface_address }} tag syslog priority_key log_level + source_hostname_key Hostname format /^(?.*)$/