【发布时间】:2019-04-13 03:31:25
【问题描述】:
我在 k8s 中运行 Prometheus。您能否建议我如何更改集群中的运行配置prometheus.yaml?我只想简单地改变:
scrape_configs:
- job_name: my-exporter
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
我该怎么做?
谢谢。
【问题讨论】:
-
您是否通过
ConfigMap提供了prometheus.yaml配置文件? -
是的,试过了。在此之后应该重新加载所有 pod 吗?这是如何在 Prometheus (in k8s) 中更改配置的正确方法吗?
-
您不必这样做。 configMap 中的任何更改都将在 pod 中自动更新。传播更新可能需要一些时间。 kubernetes.io/docs/tasks/configure-pod-container/…
-
它不能自动工作-不知道为什么:/但是您知道为什么 aerospike-exporter 不提供有关 aerospike 的数据吗?指标页面正在运行,promtheus 看到了,但只有 aerospike_node_up - 仅此而已,没有其他统计信息
-
对不起。我不熟悉 aerospike。所以我帮不上忙。
标签: kubernetes config prometheus