prometheus-community / windows_exporter

Prometheus exporter for Windows machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 0.25.0 Ignores listen-address in config.yml

davideverall opened this issue · comments

After upgrading to v0.25.0 windows_exporter ignores listen-address in config.yml

config example:

web:
  listen-address: ":25460"

Event log message:

ts=2024-01-16T09:34:33.890Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9182

  • cmd flag does work e.g. .\windows_exporter.exe --web.listen-address=":25460"
  • msi flag also works e.g. msiexec /i <path-to-msi-file> LISTEN_PORT=25460

I have tried with single quotes, double quotes, no quotes with same result.

Looks like the msi installer is adding in --web.listen-address 0.0.0.0:9182 to the windows service.

"C:\Program Files\windows_exporter\windows_exporter.exe" --log.file eventlog --web.listen-address 0.0.0.0:9182 --config.file=C:\location\config.yml

You can delete it from HKLM:System\CurrentControlSet\Services\windows_exporter\imagepath and it should work on your custom port then after a restart of the windows service as a temporary fix

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.