# Metricbeat add\_kubernetes\_metadata on prometheus module does not add kubernetes metadata

**URL:** <https://discuss.elastic.co/t/metricbeat-add-kubernetes-metadata-on-prometheus-module-does-not-add-kubernetes-metadata/218547>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 10, 2020, 9:11am UTC](https://discuss.elastic.co/t/metricbeat-add-kubernetes-metadata-on-prometheus-module-does-not-add-kubernetes-metadata/218547 "2020-02-10T09:11:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babadofar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babadofar/32/44803_2.png) [@Babadofar](https://discuss.elastic.co/u/Babadofar)\
**Post date:** [February 10, 2020, 9:11am UTC](https://discuss.elastic.co/t/metricbeat-add-kubernetes-metadata-on-prometheus-module-does-not-add-kubernetes-metadata/218547/1 "2020-02-10T09:11:24Z")

</div>

Hi there.  
I'm using the prometheus module to collect Spring Boot actuator metrics from. The metrics are coming in to elasticsearch fine, but the kubernetes metadata is not added to the events. I suspect this may have to do with the indexers, but it isn't entirely clear how to set this up.

Using metricbeat 7.5.2 and this is the relevant documentation [https://www.elastic.co/guide/en/beats/metricbeat/7.5/add-kubernetes-metadata.html](https://www.elastic.co/guide/en/beats/metricbeat/7.5/add-kubernetes-metadata.html)

This is my configuration:

```
- module: prometheus
  namespace: jx-staging
  processors:
  - add_kubernetes_metadata:
      in_cluster: true
  - add_fields:
      target: ''
      fields:
        kubernetes.namespace: jx-staging
  hosts:
    - "xxx.jx-staging"
    - "xxx-other.jx-staging"
  period: 1m
  metrics_path: "/management/prometheus"
```

---

<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:** [March 9, 2020, 9:11am UTC](https://discuss.elastic.co/t/metricbeat-add-kubernetes-metadata-on-prometheus-module-does-not-add-kubernetes-metadata/218547/2 "2020-03-09T09:11:25Z")

</div>

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