-
Notifications
You must be signed in to change notification settings - Fork 96
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
Metadata enrichment on AWS k8s cluster #149
Comments
Hi @c-knowles, Sorry for the confusion. [TL;DR] Now let me try to clarify it a bit. [How Kubernetes metadata used to be handled in GKE and Kubernetes in GCE]
The Logging Agent (fluent-plugin-google-cloud) will then extract "namespace_id", "pod_id", "container_name" as "resource.labels.*" and "namespace_name", "pod_name" as "labels['compute.googleapis.com/resource_name']". [How Kubernetes metadata is being handled as of the latest version today for GKE and Kubernetes in GCE] [Why you are seeing the discrepancy up there] Let us know if you have any follow-up questions or any specific needs. Maybe we could brainstorm some short-term solution before we launch the formal support. |
@qingling128 thank you for clarifying the situation, it makes sense. OK, so I guess short term it is best to continue to use One thing that |
@c-knowles Pod labels in GKE will be ingested via other means and will eventually appear in the log entries on the viewer side without any explicit action on the user's part. I'll confirm the timelines and ping this issue. |
@igorpeshansky, I see ok. So stackdriver will start to support enrichment directly, I suppose we could push labels for non-GKE clusters to the same API. Do you think this plugin will enable that for non-GKE clusters at some point or they won't be available? I'm happy to use the other plugin if we need to, the main issue would then be unification. |
@c-knowles |
@crassirostris ok, thanks for clarifying. Yes, I understood |
#148 is only part of the solution. The full solution is coming. Please stay tuned. |
@igorpeshansky What's the status on this? It would be great to have either the kubernetes metadata plugin integration or a direct integration of non-gce deployments via the kubernetes API |
I was comparing the metadata enrichment results of this plugin on a Kubernetes cluster on AWS versus GKE since we're running Kubernetes on both. Please could someone can help clarify what is expected with the current plugin and best practice?
Currently on AWS we're using the
fluent-plugin-kubernetes_metadata_filter
to add metadata to logs coming from some k8s clusters. The logs go via fluentd and over to stackdriver premium. We are using both plugins together since there was a lack of useful metadata about the pod, namespace and container in the log indexing.We've since started to run some clusters on GKE as well but we'll still keep the AWS ones. So we're interested in at least some unification. On GKE we currently go with the built in logging which presumably uses this plugin.
I happened upon some comments from @crassirostris mentioning this plugin also performs metadata enrichment and that it's not greatly compatible with
kubernetes_metadata_filter
. Since then, it seems this recent PR has added some code which helps out with regard tokubernetes_metadata_filter
compatibility.From what I can gather based on what we are running the output of this plugin with regard to metadata enrichment is:
resource.labels.pod_id
resource.labels.namespace_id
resource.labels.container_name
resource.labels.cluster_name
resource.labels.instance_id
resource.labels.project_id
resource.labels.zone
region
resource.labels.aws_account
resource.labels.region
resource.labels.zone
resource.type
container
aws_ec2_instance
labels['compute.googleapis.com/resource_name']
labels['container.googleapis.com/namespace_name']
resource.labels.namespace_id
labels['container.googleapis.com/pod_name']
resource.labels.pod_id
labels['container.googleapis.com/stream']
labels['ec2.amazonaws.com/resource_name']
Adding
kubernetes_metadata_filter
gives a bunch of data insidejsonPayload.kubernetes
which covers most of the unavailable metadata from the AWS column but obviously under a different path.There is a slight potential that I've misconfigured it since most of the k8s logging documentation at the time of setup was related to how it works on GCP/GKE. It's based primarily off the config from k8s addons.
The text was updated successfully, but these errors were encountered: