Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listening address #17

Closed
tacerus opened this issue Aug 8, 2021 · 3 comments
Closed

Listening address #17

tacerus opened this issue Aug 8, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@tacerus
Copy link
Contributor

tacerus commented Aug 8, 2021

Hi,

apologies if I missed something - but from what I can see it's only possible to specify the listening port via the available command line arguments. Is there a way to specify the listening/bind address as well?

Best,
Georg

@npdgm
Copy link
Member

npdgm commented Aug 10, 2021

Hi Georg,
You are correct, it's missing an argument to specify the listening address.
We'll implement that shortly.
Cheers

@npdgm npdgm added the enhancement New feature or request label Aug 10, 2021
@tacerus
Copy link
Contributor Author

tacerus commented Aug 10, 2021

Oh amazing - Thank you so much! :)

@npdgm
Copy link
Member

npdgm commented Aug 11, 2021

@tacerus version 2.11.0 was released yesterday with the option for specifying a listening address.

I wish we didn't break existing arguments to the program and simply add a new one, however this obvious answer to the need was inelegant in some ways and less powerful with regard to IPv6. This implementation is what Golang applications tend to use, and matches many popular exporters.
Most users of this project seem to use the Helm Chart on Kubernetes and fortunately this change is made transparent to them.

So argument --port was deprecated and you should use --listen-address instead. It can take a port number or an address/port pair.
The default is --listen-address=:9793 and will listen on our default port for any IPv4/IPv6 address, just like it used to be.

A few examples :

  • --listen-address=:9793
  • --listen-address=127.0.0.1:9793
  • --listen-address=[::1]:9793
  • --listen-address=10.1.2.3:9793
  • --listen-address=[2001:abc::123]:9793

I hope this will suit you.

Cheers

@npdgm npdgm closed this as completed Aug 11, 2021
@npdgm npdgm self-assigned this Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants