Skip to content
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

Include labels and annotations in all Kubernetes metricsets #7148

Closed
exekias opened this issue May 21, 2018 · 0 comments
Closed

Include labels and annotations in all Kubernetes metricsets #7148

exekias opened this issue May 21, 2018 · 0 comments
Labels
containers Related to containers use case enhancement Metricbeat Metricbeat

Comments

@exekias
Copy link
Contributor

exekias commented May 21, 2018

Metricbeat doesn't include object labels and annotations on Kubernetes metricsets. As of today It's possible to enrich pod, container, state_pod and state_container events using add_kubernetes_metadata, but it would be nice to automatically add these fields to all object kinds, without the processor.

We should implement a metadata retrieval mechanism (or watcher) for all object kinds, and use a configuration similar to add_kubernetes_metadata to whitelist labels and annotations.

As a result, all kubernetes metricsets should include kubernetes.labels and kubernetes.annotations if the user wants them.

@exekias exekias added enhancement Metricbeat Metricbeat containers Related to containers use case labels May 21, 2018
ruflin pushed a commit that referenced this issue Jul 13, 2018
This PR adds automatically enriching of `kubernetes` module metricsets. It will behave as `add_kubernetes_metadata`, but enrich all events coming out of this module by default. This will not only add labels annotations to Pods but any other Resource, like nodes, containers, deployments...

It will be on by default, some configurations are allowed:

```
- module: kubernetes
  metricsets:
    - pod
    - node
    ...
  in_cluster: false
  kube_config: /home/exekias/.kube/config
  host: minikube
  include_labels:
    - tier
  include_annotations:
    - ...
```

Closes #7148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Related to containers use case enhancement Metricbeat Metricbeat
Projects
None yet
Development

No branches or pull requests

1 participant