想要让Prometheus server从node exporter获取监控数据须要:

  • 编辑prometheus.yml 在scrape_configs节点上面增加:

    scrape_configs:- job_name: 'prometheus'  static_configs:    - targets: ['localhost:9090']# 采集node exporter监控数据- job_name: 'node'  static_configs:    - targets: ['localhost:9100']

    重启Prometheus Server 拜访http://localhost:9090/ 在

  • 奇怪这里阻塞了一下,为什么
up{instance="localhost:9090",job="prometheus"}    1up{instance="localhost:9100",job="node"}    1这只有1个

未完待续。。

参考: https://yunlzheng.gitbook.io/...