关于Node_exporter

Regarding Node_exporter

我在一台服务器上安装了节点导出器和 Prometheus,并且能够在 Prometheus 中获取指标。 但是,如果我添加另一个节点,如何使用节点导出器将该新节点的指标拉到我的 Prometheus 服务器。我在新服务器上安装了节点导出器,无法弄清楚如何将这些指标发送到另一台服务器上的普罗米修斯服务器。

我的 Prometheus.yml 文件看起来像这样

global:
  scrape_interval: 5sec
scrape_configs:
  -job_name: node
   static_configs:
      - targets:["localhost:9100"]
  -job_name: prometheus 
   static_configs:
       - targets: ["localhost:9090"]

您可以将新主机名添加到节点 scrape_config 的目标列表中,目前您只列出 localhost:9100