detectMultilineErrors on multiple output cause "Duplicated plugin id multiline-detect-except"
ahmet2mir opened this issue · 2 comments
ahmet2mir commented
Hello OpenShift!
Describe the bug
When enabling detectMultilineErrors
on multiple pipeline item of ClusterLogForwarder
we have an issue on Fluentd config
Example
pipelines:
- detectMultilineErrors: true
inputRefs:
- tenant1-input
labels:
cluster: c01e1
namespace: tenant1
type: application
name: tenant1-pipeline
outputRefs:
- tenant1-output
parse: json
- detectMultilineErrors: true
inputRefs:
- tenant2-input
labels:
cluster: c01e1
namespace: tenant2
type: application
name: tenant2-pipeline
outputRefs:
- tenant2-output
parse: json
Environment
- OpenShift 4.9
Logs
$ oc logs -n openshift-logging collector-dp7wg collector
Setting each total_size_limit for 4 buffers to 4811272243 bytes
Setting queued_chunks_limit_size for each buffer to 573
Setting chunk_limit_size for each buffer to 8388608
2022-03-14 19:14:29 +0000 [warn]: '@' is the system reserved prefix. It works in the nested configuration for now but it will be rejected: @timestamp
<Fluent::Config::Section {"@label":"@TENANT1_PIPELINE","tag":"","matches":["<Fluent::Config::Section {\"labels\":{},\"namespaces\":[\"tenant1\"],\"hosts\":[],\"container_names\":[],\"negate\":false}>"]}>
<Fluent::Config::Section {"@label":"@TENANT2_PIPELINE","tag":"","matches":["<Fluent::Config::Section {\"labels\":{},\"namespaces\":[\"tenant2\"],\"hosts\":[],\"container_names\":[],\"negate\":false}>"]}>
<Fluent::Config::Section {"@label":"@_APPLICATION_ALL","tag":"","matches":["<Fluent::Config::Section {\"labels\":{},\"namespaces\":[],\"hosts\":[],\"container_names\":[],\"negate\":false}>"]}>
2022-03-14 19:14:29 +0000 [error]: config error file="/etc/fluent/fluent.conf" error_class=Fluent::ConfigError error="Duplicated plugin id `multiline-detect-except`. Check whole configuration and fix it."
Expected behavior
Able to use detectMultilineErrors
on multiple outputs.
Actual behavior
Using on multiple output crash loggin pods.
To Reproduce
Add detectMultilineErrors on multiple item.
Additional context
Fluentd generate
# Copying pipeline tenant1-pipeline to outputs
<label @TENANT1_PIPELINE>
...
<match kubernetes.**>
@id multiline-detect-except
@type detect_exceptions
remove_tag_prefix 'kubernetes'
message message
force_line_breaks true
multiline_flush_interval .2
</match>
...
</label>
# Copying pipeline tenant2-pipeline to outputs
<label @TENANT2_PIPELINE>
...
<match kubernetes.**>
@id multiline-detect-except
@type detect_exceptions
remove_tag_prefix 'kubernetes'
message message
force_line_breaks true
multiline_flush_interval .2
</match>
...
</label>
ahmet2mir commented
Damn, I searched multiline-detect-except
and detectMultilineErrors
but found nothing (even on sourcegraph).
Thanks @jcantrill