# \[QUESTION/HELP\] Metricbeat kubernetes state\_node labels

**URL:** <https://discuss.elastic.co/t/question-help-metricbeat-kubernetes-state-node-labels/253784>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [October 30, 2020, 8:42am UTC](https://discuss.elastic.co/t/question-help-metricbeat-kubernetes-state-node-labels/253784 "2020-10-30T08:42:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayanebel](https://avatars.discourse-cdn.com/v4/letter/r/e68b1a/32.png) [@rayanebel](https://discuss.elastic.co/u/rayanebel)\
**Post date:** [October 30, 2020, 8:42am UTC](https://discuss.elastic.co/t/question-help-metricbeat-kubernetes-state-node-labels/253784/1 "2020-10-30T08:42:15Z")

</div>

Hello,

I'm using metricbeat (7.x) and the kubernetes module to fetch kubernetes metrics from api-server and kube-state-metrics. I have a question about the metricset `state_node`. This metricset will fetch the metrics related to the kubernetes nodes. In the code base of the module I see all the metric name that will be fetch from kube-state-metrics and my question is: Do you include the prometheus labels for each metric ? For example, the module try to get the `kube_node_info` metricset from kube-state-metric and in this metric I have some relevant labels like the `kubelet_version` that I can't retrieve in elasticsearch.

`kube_node_info{container_runtime_version="docker://1.11.1",kernel_version="4.7.2",kubelet_version="v1.5.3",kubeproxy_version="v1.5.3",node="minikube",os_image="Buildroot 2016.08"} 1`

> <https://github.com/elastic/beats/blob/1575e67cbe7ce1109f3762daa6c2516797b6ccfa/metricbeat/module/kubernetes/state_node/state_node.go#L58>

How can we have those labels ? The only way that I found is to add a new `prometheus` module which point to kube-state-metrics and I fetch again the `kube_node_info` metric.

Thanks.

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [October 30, 2020, 10:05am UTC](https://discuss.elastic.co/t/question-help-metricbeat-kubernetes-state-node-labels/253784/2 "2020-10-30T10:05:55Z")

</div>

Hi!

Your assumption is correct. You can use `prometheus` module to scrape the metrics along with all the labels.

I guess that `state-node` metricset does not add all of them for storage efficiency. If you consider adding this specific label could be of benefit in general you can open a Github issue proposing this change, why it is important and your usecase and let the team decide if it can be added.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 27, 2020, 12:06pm UTC](https://discuss.elastic.co/t/question-help-metricbeat-kubernetes-state-node-labels/253784/3 "2020-11-27T12:06:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
