aws-for-fluent-bit: S3 output key formatting inconsistent rendering of `$TAG[n]`
Bug Report
Describe the bug
S3 output has a key_format property which allows for using $TAG, or $TAG[n], (along with tag_delimiters) to create a path for objects based on tag properties. Sometimes using $TAG[n] in the path works fine, other times you get $TAG[n-1] and still other times you get full.tag.output.without.parsing[n] rendered.
To Reproduce
- use the s3 output plugin
- have logs with a tag like
my.awesome.experimental.tag - set the tag_delimiter to
. - set a key_format to something like
/$TAG[2]/some_value=$TAG[3]/year=%Y/month=%m/day=%d/%H%M%S-$UUID.gz - see that sometimes it works perfectly. sometimes it treats
tag[2]astag[3]and sometimes it doesn’t parse the tag at all so the path results in/my.awesome.experimental.tag[3]/all without changing the fluent-bit version, the app version, the tags, or anything else.
Expected behavior
given my.awesome.experimental.tag, $TAG[2] should always parse to experimental and the s3 key path would then always render as /experimental/some_value=tag/
Your Environment aws-for-fluent-bit 2.25.1, fluentbit 1.9.3, Fargate and Firelens.
duplicate of https://github.com/fluent/fluent-bit/issues/5662 since we’re using aws-for-fluent-bit, wanted to raise awareness here as well.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 27 (13 by maintainers)
here’s a few examples from my configuration, highlighting that I have numerous outputs and many different sub-indexes used in different outputs.