简体   繁体   English

在 prometheus 中排除 Kubernetes 指标监控

[英]Exclude Kubernetes Metrics monitoring in prometheus

We are monitoring our Kubernetes clusters metrics through Prometheus.我们正在通过 Prometheus 监控我们的 Kubernetes 集群指标。 It is working fine but we dont want monitor all default metrics.它工作正常,但我们不想监控所有默认指标。 Just want to monitor few selected metrics.只想监控几个选定的指标。 How do I exclude unwanted metrics from prometheus.如何从 prometheus 中排除不需要的指标。

We are using the below version K8:我们正在使用以下版本的 K8:

1.18.6

Installed Prometheus usning helm chart:使用 helm chart 安装 Prometheus:

helm repo add prometheus-community https://prometheus-community.github.io/helm-chart

helm search repo prometheus-community-new/prometheus

helm install prometheus-community/prometheus --generate-name --namespace prometheus

where should I disable these metrics in helm.我应该在哪里禁用这些指标。

Thank you谢谢

How do I exclude unwanted metrics from prometheus.如何从 prometheus 中排除不需要的指标。

With the commands you used, Helm will apply the defaults as defined in the values.yaml of said chart.使用您使用的命令,Helm 将应用所述图表的values.yaml中定义的默认值。 You want to redefine (replace) the jobs under serverFiles.prometheus.yml.scrape_configs by removing any jobs using the Kubernetes service discovery that you're not interested in and/or by adjusting the relabling directives to your needs.您想重新定义(替换) serverFiles.prometheus.yml.scrape_configs下的作业, serverFiles.prometheus.yml.scrape_configs是使用您不感兴趣的Kubernetes 服务发现和/或根据您的需要调整重新标记指令来删除任何作业。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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