如果Label由客户设置,我想为Prometheus Label设置默认值。
怎么在配置文件中看起来像
- job_name: cadvisor ...
这就是我在prometheus.yml中所拥有的。 “#”后面的评论是评论。我的工作名称有破折号而不是空格。希望有所帮助。
---
global:
scrape_interval: 60s
evaluation_interval: 60s
scrape_configs:
-
job_name: 'My-Cluster-Label' # My-Cluster-Label metrics
scrape_interval: 60s
metrics_path: /app/metrics
static_configs:
-
targets: ['my_docker_host:19000',
'next_docker_host:19000',
'another_docker_host:19000']