Set log message field name in Monasca Fluentd plugin

Let the Monasca Fluentd output plugin handle mapping of the log
message.

Change-Id: I4a74a91b9b38d5c172397a7e7204e626bcedcfac
Closes-Bug: #1830184
Depends-On: https://review.opendev.org/#/c/660988/
This commit is contained in:
Doug Szumski 2019-05-23 12:03:14 +01:00
parent 3dfa857013
commit a5cd622396
3 changed files with 3 additions and 14 deletions

View File

@ -37,20 +37,6 @@
</filter>
{% if enable_monasca | bool %}
# Kolla Fluentd input config configures Fluentd to save all log messages
# under the 'Payload' field, however the fluentd-monasca plugin assumes
# that log messages are saved under the 'message' field. Here we map the
# 'Payload' field to the 'message' field so that log can be forwarded to
# Monasca.
<filter *.**>
@type record_transformer
enable_ruby true
<record>
message ${record["Payload"]}
</record>
remove_keys Payload
</filter>
# Kolla configures Fluentd to extract timestamps from OpenStack service
# logs, however these timestamps are not saved in the event and are not
# forwarded to Monasca. Here we save the timestamp which has been

View File

@ -27,6 +27,7 @@
password {{ monasca_agent_password }}
domain_id default
project_name {{ monasca_control_plane_project }}
message_field_name Payload
</store>
{% endif %}
</match>
@ -62,6 +63,7 @@
password {{ monasca_agent_password }}
domain_id default
project_name {{ monasca_control_plane_project }}
message_field_name Payload
</store>
{% endif %}
</match>

View File

@ -9,5 +9,6 @@
password {{ monasca_agent_password }}
domain_id default
project_name {{ monasca_control_plane_project }}
message_field_name Payload
</store>
</match>