Skip to content
Snippets Groups Projects
Commit d89a89c2 authored by Doug Szumski's avatar Doug Szumski
Browse files

Format internal Fluentd logs

This change formats internal Fluent logs in a similar way to other
logs. It makes it easier for a user to identify issues with Fluent
parsing logs. Any failure to parse a log will be ingested into the
logging framework and can easily be located by searching for
'pattern not match' or by filtering for Fluent log warnings.

Change-Id: Iea6d12c07a2f4152f2038d3de2ef589479b3332b
parent cfeb9dd9
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,27 @@
</record>
</filter>
# Rename internal Fluent message field to match other logs. This removes
# all other fields by default, including the original message field. This is
# intented to avoid duplication of the log message and to prevent passing
# invalid dimensions to Monasca, if it is enabled. Note that if this step
# is moved to the format folder, then it will applied after the second step
# below which will break the logic.
<filter fluent.**>
@type parser
key_name message
format /^(?<Payload>.*)$/
</filter>
<filter fluent.**>
@type record_transformer
<record>
Hostname "#{Socket.gethostname}"
programname ${tag_parts[0]}
log_level ${tag_parts[1]}
</record>
</filter>
{% if enable_monasca | bool %}
# Kolla configures Fluentd to extract timestamps from OpenStack service
# logs, however these timestamps are not saved in the event and are not
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment