docker 普罗米修斯无法访问 docker kafka_exporter
docker prometheus not able to access docker kafka_exporter
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)
我需要 link/network 张图片吗?
应该是container_name:port
kafka_exporter:9308
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)
我需要 link/network 张图片吗?
应该是container_name:port
kafka_exporter:9308