-
Notifications
You must be signed in to change notification settings - Fork 28
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
Kubernetes metadata no longer visible to plugin #50
Comments
@flynnecf2 any reason you are not using our Kubernetes FluentD Plugin to send the data? It offers this same functionality. |
Also what version were you on before this so we can chase this down... |
I'm running into the same issue. @frankreno the fluentd plugin has now been deprecated. Is there any workaround on this? Cannot use https://github.com/SumoLogic/sumologic-kubernetes-collection |
@malcolmrebughini - Can you share why cannot you not use the new collection you linked to? |
@frankreno it is an existing fluentd configuration and I would prefer to keep changes on the cluster to a minimum. |
Can you please share your config? Can take a look and see what I can determine. Unfortunately we have no plans to modify this plugin to support the kind of dynamic generation at this moment. We would of course welcome a PR. Our new collection process preserves the metadata of course and sends the data via HTTP header instead of in the log line which is also more cost effective on the bytes ingested and has many other benefits. I would definitely recommend upgrading it when you can as it is now the supported solution. |
Here's the config:
|
I've found the code change that cause this. In 1.4.0 there was a function called expand_param that looked for record. this was replaced in 1.4.1 with |
After digging a bit, in newer versions of the fluentd api the proper way of doing this is adding a buffer and then referencing the chunk_key as
I think this solves the issue. So feel free to close this. (And sorry for resurrecting such an old issue) |
No sorry needed, glad you were able to get this to work. I do hope you will look at updating to the newer supported collection method in the future. |
Before upgrading to 1.4.1, we used to dynamically set our Sumo source/host/category based on the K8s metadata, as follows:
<match **>
@type sumologic
endpoint https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/XXXX
log_format json
source_category ${record['kubernetes']['namespace_name']}
source_name ${record['kubernetes']['container_name']}
source_host ${record['kubernetes']['pod_name']}
open_timeout 10
With 1.4.1, we're getting the above hardcoded string values (i.e...)instead of the dynamic K8s metadata. I've noticed that I'm still able to access the tag values by using something like ${tag[n]}, for instance (although it used to be tag_parts[n], but that no longer works either). Is this intentional, expected, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: