sberk42/fritzbox_exporter

URL parse error with docker

git-eri opened this issue · 2 comments

I built the docker image and then tried to run the container with
docker run --dns 192.168.178.1 \ -e 'USERNAME=prometheus' \ -e 'PASSWORD=hidden' \ -e 'GATEWAY_URL="http://192.168.178.1:49000"' \ -e 'LISTEN_ADDRESS="0.0.0.0:9042"' \ fritzbox-prometheus-exporter:latest
But i got a URL error:
time="2022-02-21T10:49:42Z" level=error msg="invalid URL:%!(EXTRA *url.Error=parse \"\\\"192.168.178.1:49000\\\"\": first path segment in URL cannot contain colon)"
Any info on how to fix that?

EDIT: I tried with docker-compose, that seems to work

@git-eri I use:

docker run \
  -d \
  -p 9042:9042 \
  -e 'USERNAME=fritzbox_exporter' \
  -e 'PASSWORD=mypassword' \
  -e 'GATEWAY_URL=http://192.168.178.1:49000' \
  -e 'LISTEN_ADDRESS=0.0.0.0:9042' \

and it works. Maybe a scaping issue with the 'and "?

@jobenvil yes that works, thanks alot. Maybe the README.md should be updated