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
This commit is contained in:
Doug Szumski 2017-10-24 10:04:27 +01:00
parent 8bb44c4310
commit fc9f84ea8c
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@
<filter infra.*>
@type record_transformer
<record>
Hostname ${hostname}
programname ${tag_parts[1]}
</record>
</filter>

View File

@ -4,5 +4,6 @@
bind {{ api_interface_address }}
tag syslog
priority_key log_level
source_hostname_key Hostname
format /^(?<Payload>.*)$/
</source>