Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
4f5c9085
Commit
4f5c9085
authored
6 years ago
by
Zuul
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Monasca specific config for Fluentd"
parents
53cf3be7
e9a196f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2
+36
-0
36 additions, 0 deletions
...ommon/templates/conf/filter/00-record_transformer.conf.j2
with
36 additions
and
0 deletions
ansible/roles/common/templates/conf/filter/00-record_transformer.conf.j2
+
36
−
0
View file @
4f5c9085
...
@@ -35,3 +35,39 @@
...
@@ -35,3 +35,39 @@
programname haproxy
programname haproxy
</record>
</record>
</filter>
</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
# *parsed* by Fluentd to a field which is part of the event and *is*
# therefore forwarded to Monasca. If no timestamp is parsed, then this
# should stamp the event with the current time. Note that since Kolla
# configures Fluentd to keep the time key, the original, *unparsed*
# timestamp, if present, will also be forwarded to Monasca as part of the
# event. However, because the logs which are collected by Fluentd use a
# variety of time formats the format of this timestamp is irregular and
# is therefore dropped in the Monasca log pipeline in favour of the
# timestamp added here. In the future we could investigate getting the
# Fluentd Monasca plugin to add this timestamp.
<filter *.**>
@type record_transformer
<record>
timestamp ${time}
</record>
</filter>
{% endif %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment