首页 > 解决方案 > Prometheus 节点导出器在 docker 中不起作用

问题描述

我是普罗米修斯的新手。我已经从 docker 图像设置 prometheus 并运行

docker run -it -d --name prometheus_config -p 9092:9090 -v /opt/docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

在 prometheus.yml 文件中我有

scrape_configs:
  - job_name: 'prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']
  - job_name: 'node_exporter'
    scrape_interval: 5s
    static_configs:
      - targets: ['10.236.141.179:9100']

我在另一台机器上的节点导出器正在运行(这也是 docker 映像)。但是容器并没有从这里开始。相反,如果我给任何一个节点导出器或只给普罗米修斯它的工作正常。有人可以解释哪里做错了吗?

提前致谢。

标签: dockerprometheusprometheus-node-exporter

解决方案


推荐阅读