wi1dcard / v2ray-exporter

🧭 Prometheus exporter for V2Ray and V2Fly metrics, with a simple Grafana dashboard.
MIT License
108 stars 25 forks source link

在docker-compose中使用此项目? #8

Closed felixding closed 4 years ago

felixding commented 4 years ago

你好,我尝试在docker-compose中使用此项目,但v2ray-exporter此时无法启动(不停自动重启),不知道是哪里配置的有问题。

这是我docker-compose.yml中相关的部分:

version: "3.4"

services:
  v2ray-exporter:
    image: wi1dcard/v2ray-exporter:master
    ports:
      - 10085:10085
    command: v2ray-exporter --v2ray-endpoint "v2ray:10085" --listen 10085
    restart: always
    links:
      - v2ray
  v2ray:
    image: v2fly/v2fly-core:v4.25.1
    restart: always
    expose:
      - 10085
wi1dcard commented 4 years ago

请阅读文档,按照说明编写 V2Ray 的配置、开放 API 端口。如果仍有问题,请附 docker logs 日志。

felixding commented 4 years ago

感谢回复。

看日志后发现是listen的参数不对,把

v2ray-exporter --v2ray-endpoint "v2ray:10085" --listen 10085

改为

v2ray-exporter --v2ray-endpoint "v2ray:10085" --listen ":10085"

后解决。