Repository navigation
Conversation
Adds an elasticsearchDynamic output that renders @type elasticsearch_dynamic. It reuses the elasticsearch parameters, so host, index and logstash values can use placeholders like ${tag_parts[1]} or ${record['key']}. Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
cvas22
force-pushed
the
feat/1400-fluentd-es-dynamic
branch
from
November 12, 2026 16:58
8f4d85f to
3127c4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
There was no way to use fluentd's
elasticsearch_dynamicoutput from the CRDs, so if you wanted the index or logstash prefix to follow the namespace you had to fall back to a custom plugin. This adds anelasticsearchDynamicoutput to Output and ClusterOutput. It takes the same fields aselasticsearchand renders@type elasticsearch_dynamic, so placeholders like${record['kubernetes']['namespace_name']}get passed straight through.Which issue(s) this PR fixes:
Fixes #1400
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.:
Notes
I reused the
Elasticsearchtype instead of adding a new one since the plugin is a subclass of out_elasticsearch and accepts the same params. The plugin's already in the fluentd image through fluent-plugin-elasticsearch. Upstream says it's kept for backward compat, but it's still the simplest way to route per namespace without a record_modifier step.