-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use kubernetes app label in logGroupTemplate #927
Comments
BackgroundThere are two cloudwatch plugins and two different templating features. This chart calls the go plugin Advice
You're using the correct templating key and your format looks good. Can you attach example logs? Is there a label called app? It should work if there is... |
Thank you for your reply. I have spend a lot more time on tis (much more then I should haha). And I understand it a bit more now. I did not understand the whole "plugin" part but now I get that this is the fluentbit plugin for aws. It was a bit hard for me to track what went wrong on on what project I needed to report that. The previous setup used an old version, that is still running in our production cluster and seems to use So I think I now have 2 options: either stick with a different naming scheme (based on So: for my sanity I now choose to go back to the old plugin (as we where using that without issues) and then switch over when the new plugin as the suggested fix. So: I update my terraform config to be as follows:
That should be it right? Deactivating the new plugin and activating the old one? However I am not sure this works:
The generated ConfigMap for
Is this correct? I was expecting |
And just for fun: On production we have chart version 0.1.7 (yes really old, that is why we want to update). The generated fluentbit config there is:
However here we run it "through" https://registry.terraform.io/modules/DNXLabs/eks-cloudwatch-logs/aws/latest (that is no longer maintained). So I am not setting the variables in the exact same way. Not sure if this is helpful. |
@Mattie112 yes, the
These do not match up, so I think these are from two different test runs. |
Well no, they are from the same run. It seems like whatever I set is ignored. I can double check it again tomorrow but I wanted to use the "old" plugin (to keep the naming equal) and that was the result. But I will try it again and let you know. |
Allright I tested it again. The error is still the same:
For reference, the full terraform config (minus some comments):
The generated fluent-bit.conf (checking one
I am not really sure why, the logging would indicate it is trying to use the correct one but the configmap does not reflect that. I will try a couple of other things but as not all apps have the "app" label if it "spams" the log like this it is not really a solution for us. Possible the fluentbit 2.0 update so we can change the log level. I double checked production (with the old version) and there are no errors logged about this and there are also workloads there with no 'app' label. My guess is that this was changed somewhere over the last years. |
I also deleted the entire helm chart and applied it again (using terraform). Same result. The configmap still has When checking the helm chart it does look to be correct: So yeah I am not sure what to do. If it still logs all the messages that could not be parsed then this is not even an option for us due to excessive logging of those messages. If we can hide / filter those errors that would be better. For now I will set it back to |
I think this error just means the |
Yeah so it does seem to work, strange that I don't see it in the fluent-bit config. But hey that does not really matter as this spams the log if it generates an error for each log that can not be mapped. Think I will keep it on |
Describe the bug
We always used the following terraform module: https://github.com/DNXLabs/terraform-aws-eks-cloudwatch-logs but have not switched to directly using this chart because that module is no longer maintained. That TF module would in the background use the aws-for-fluent-bit chart.
The logGroup used was like this:
So this resulted in
/aws/eks/staging/some_app_label
. I'd like to have the same structure with this chart directly. (And now also the latest version).I used the following in my terraform:
However this would let fluentbit really spam cloudwatch with these log messages:
If I use the format
/aws/eks/${local.cluster_name}/$kubernetes['namespace_name']
it works fine.How can I get the
['labels']['app']
format to work? Is logGroupTemplate indeed correct?Steps to reproduce
See above
Expected outcome
See above
Environment
aws-for-fluent-bit
0.1.24
1.22
1.22.17-eks-48e63af
Additional Context:
I did found this MR: #903 but not 100% sure if it is related to my issue or not.
The text was updated successfully, but these errors were encountered: