fluentd
fluentd copied to clipboard
buffer chunk_keys not working with nested dot fields
Describe the bug
I'm trying to configure a file buffer in a fluentd aggregator that chunks based on a nested field with a dot inside it. Fluentd complains about the configuration bit
config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="in chunk_keys: '[' found but ']' not found. Invalid syntax: $.kubernetes.labels['app.kubernetes.io/name']"
Based on the documentation, this record accessor syntax should work. Instead, fluentd raises a configuration error at startup. The error message is not helping, since it contains the closing bracket that it complains about...
To Reproduce
Start fluentd with the provided example configuration
Expected behavior
Fluentd should start or provide an understandable error message.
Your Environment
- Fluentd version: 1.14.5
Your Configuration
<source>
@type forward
@label @kubernetes
port 24224
</source>
<label @kubernetes>
<match **>
@type file
path /fluentd/log/${$.kubernetes.labels['app.kubernetes.io/name']}/%Y%m%d-%H
<buffer time , $.kubernetes.labels['app.kubernetes.io/name'] >
timekey 60m
timekey_wait 1m
</buffer>
</match>
</label>
Your Error Log
2022-03-07 12:08:06 +0000 [info]: parsing config file is succeeded path="/fluentd/etc/fluent.conf"
2022-03-07 12:08:06 +0000 [info]: gem 'fluentd' version '1.14.5'
2022-03-07 12:08:06 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="in chunk_keys: '[' found but ']' not found. Invalid syntax: $.kubernetes.labels[app.kubernetes.io/name]"
Additional context
No response
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days
This issue was automatically closed because of stale in 30 days