【问题标题】:docker prometheus not able to access docker kafka_exporterdocker prometheus 无法访问 docker kafka_exporter
【发布时间】:2019-02-03 23:39:27
【问题描述】:
version: '3.4'
services:
  kafka_exporter:
    image: danielqsj/kafka-exporter
    command: --kafka.server=xx.xx.xx.xx:9092 --kafka.server=xx.xx.xx.xx:9092
    ports:
      - 9308:9308
    links:
      - prometheus
  prometheus:
    image: prom/prometheus
    ports:
    - 9090:9090
    volumes:
    - ./mount/prometheus:/etc/prometheus
    command: --config.file=/etc/prometheus/prometheus.yml

上面是我的docker-compose.yml 文件。 我可以旋转这两个图像。

但是,我无法从 localhost:9090 (prometheus) 访问 localhost:9308 (kafka_Exporter)

我需要链接/网络图像吗?

【问题讨论】:

  • 当您说无法从 localhost:9090 (prometheus) 访问 localhost:9308 (kafka_Exporter) 时,您的意思是通过浏览器或内部从一个容器到另一个容器..?
  • 通过浏览器。

标签: docker docker-compose dockerfile prometheus


【解决方案1】:

应该是 container_name:port

kafka_exporter:9308

【讨论】:

    猜你喜欢
    • 2020-05-07
    • 2018-12-17
    • 1970-01-01
    • 2019-02-21
    • 1970-01-01
    • 1970-01-01
    • 2016-03-18
    • 2017-06-16
    • 2018-08-09
    相关资源
    最近更新 更多