peschmae / exporter-go-mystrom

MyStrom metrics exporter for prometheus
MIT License
3 stars 3 forks source link

Switch IP address still in container image #6

Closed tuxpeople closed 1 year ago

tuxpeople commented 1 year ago

Hi @peschmae

Is it possible you didn't rebuild the image after this commit: https://github.com/peschmae/exporter-go-mystrom/commit/bd8828ceac29cc57534cfa5a32fcb841e2a5742b

I tried to set the container up again and change everything to accommodate the new configuration but I still got this error with tag 2.0.0:

flag provided but not defined: -switch.ip-address
Usage of /app/mystrom-exporter:
  -version
        Show version information.
  -web.device-path string
        Path under which the metrics of the devices are fetched (default "/device")
  -web.listen-address string
        Address to listen on (default ":9452")
  -web.metrics-path string
        Path under which to expose exporters own metrics (default "/metrics")

I just pulled latest and did an inspect on it:

root@docker:~# docker pull ghcr.io/peschmae/exporter-go-mystrom:latest
latest: Pulling from peschmae/exporter-go-mystrom
213ec9aee27d: Pull complete
2cf81f001a66: Pull complete
4f4fb700ef54: Pull complete
e9b1eb5d68f7: Pull complete
Digest: sha256:ec1892233d9b4a1e4e4f25f7cb6ea078a43946e4d932784ca5a6dddd0c472f5d
Status: Downloaded newer image for ghcr.io/peschmae/exporter-go-mystrom:latest
ghcr.io/peschmae/exporter-go-mystrom:latest

root@docker:~# docker inspect ghcr.io/peschmae/exporter-go-mystrom:latest | grep -A3 Cmd
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
--
            "Cmd": [
                "/bin/sh",
                "-c",
                "/app/mystrom-exporter -web.listen-address $LISTEN_ADDRESS:$LISTEN_PORT -switch.ip-address $SWITCH_IP_ADDRESS"

The switch.ip-address is still there.

peschmae commented 1 year ago

Hi @tuxpeople Thanks for the reminder, I also have the same workaround in place as you do, and forgot to rebuild the container images.

I've just created a new tag & release, so latest should point to a build that no longer expects the switch.ip-address option

Fixed in 2.0.1