# HELP node_cpu_seconds_total Seconds the cpus spent in each mode.
# TYPE node_cpu_seconds_total counter
node_cpu_seconds_total{cpu="0",mode="idle"} 927490.95
node_cpu_seconds_total{cpu="0",mode="iowait"} 27.74
node_cpu_seconds_total{cpu="0",mode="irq"} 0
node_cpu_seconds_total{cpu="0",mode="nice"} 58.66
node_cpu_seconds_total{cpu="0",mode="softirq"} 2914.37
node_cpu_seconds_total{cpu="0",mode="steal"} 0
node_cpu_seconds_total{cpu="0",mode="system"} 24042.78
node_cpu_seconds_total{cpu="0",mode="user"} 20314.27
node_cpu_seconds_total{cpu="1",mode="idle"} 933276.67
node_cpu_seconds_total{cpu="1",mode="iowait"} 76.62
node_cpu_seconds_total{cpu="1",mode="irq"} 0
node_cpu_seconds_total{cpu="1",mode="nice"} 58.88
node_cpu_seconds_total{cpu="1",mode="softirq"} 2381.89
node_cpu_seconds_total{cpu="1",mode="steal"} 0
node_cpu_seconds_total{cpu="1",mode="system"} 23292.49
node_cpu_seconds_total{cpu="1",mode="user"} 20425.59
那么Prometheus采集上面的数据后,是如何保存在自已的时序数据库中的呢?如果有两个NodeExporter,在Prometheus的数据库中,如何区分node1和node2的node_cpu_seconds_total{cpu="0",mode="idle"}
呢?
^
|* * * * * * * * * * ...
|* * * * * * * * * * node_cpu_seconds_total{cpu="0",mode="idle",instance="peng01",job="node_exporter"}
|* * * * * * * * * * node_cpu_seconds_total{cpu="0",mode="user",instance="peng01",job="node_exporter"}
|* * * * * * * * * * node_cpu_seconds_total{cpu="1",mode="idle",instance="peng02",job="node_exporter"}
|* * * * * * * * * * node_cpu_seconds_total{cpu="1",mode="user",instance="peng02",job="node_exporter"}
---------- 时间 --------->
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['192.168.2.101:9100']
labels:
instance: peng01