我已经在100个不同的服务器上安装了Node Exporter,并读取在我的Prometheus服务器上收集的数据。但无法区分数据 [英] I have installed Node exporter on 100 different servers and reading data collected on my prometheus server. but unable to distinguish data
本文介绍了我已经在100个不同的服务器上安装了Node Exporter,并读取在我的Prometheus服务器上收集的数据。但无法区分数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
推荐答案
您可以在scrape_configs
Fromprometheus.yml
文件中为每个节点导出器定义不同的label
,具有相同的名称和不同的值
scrape_configs:
- job_name: 'nodeexporter-01'
scrape_interval: 5s
static_configs:
- targets: [ 'nodeexporter:9100' ]
labels:
instance: 'nodeexporter-9100'
- job_name: 'nodeexporter-02'
scrape_interval: 5s
static_configs:
- targets: [ 'nodeexporter:9200' ]
labels:
instance: 'nodeexporter-9200'
然后您将看到如下所示的metric
:
metric{instance="nodeexporter-9100"} X
metric{instance="nodeexporter-9200"} Y
这篇关于我已经在100个不同的服务器上安装了Node Exporter,并读取在我的Prometheus服务器上收集的数据。但无法区分数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文