Metricbeat add_kubernetes_metadata on prometheus module does not add kubernetes metadata

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

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"

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