简体   繁体   中英

Dropping metrics from the kubernetes-service-endpoints job in Prometheus

I'm using the kube-prometheus-stack chart and I'm trying to get rid of all the kube_secret metrics.

When I query these metrics I see that they originate from a job named kubernetes-service-endpoints , but I can't figure out what service monitor controls it in values.yaml , so I tried dropping them from every single configurable service monitor - in each one of them I put:

    metricRelabelings:
    - action: drop
      regex: 'kube_secret_.+'
      sourceLabels: [__name__]

Didn't help of course. What do I need to define in values.yaml in order to drop those metrics? Thanks

I'm silly - I defined the kubernetes-service-endpoints job in prometheus.prometheusSpec.additionalScrapeConfigs ...

In order to remove all kube_secret metrics I dropped metric names that matched kube_secret_.+ for this job and in the service monitor of kubeStateMetrics ( kubeStateMetrics.serviceMonitor.metricRelabelings )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM