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
prometheus: Split options listenAddress and port #87700
prometheus: Split options listenAddress and port #87700
Conversation
Accessing the configured port of a service is quite useful, for example when configuring virtual hosts for a service. The prometheus module did not expose the configured por separately, making it unnecessarily cumbersome to consume. This is a breaking change only if you were setting `listenAddress` to a non-standard value. If you were, you should now set `listenAddress` and `port` separately.
5f658a8
to
ba3c3de
Compare
maybe this could be a good check? |
Full disclosure: I haven’t tested this yet. |
Actually, I think, I am going to assume that everything is okay 🙄. |
the prometheus test fails for me, but could be unrelated:
|
Unfortunately this breaks my existing working IPv6 setup due to a colon being in the address. Something like this really shouldn't occur on 2020. 😢 Could someone please fix this? |
I guess this regex could be used then (didn't think about ipv6 last time sadly): |
Oh damn, I’m so sorry :/. Why do IP addresses have to be so complicated... I think something like this would to the trick: |
Motivation for this change
Accessing the configured port of a service is quite useful, for example when configuring virtual hosts for a service. The prometheus module did not expose the configured por separately, making it unnecessarily cumbersome to consume.
Things done
The option
listenAddress
currently has the formathost:port
. I've split this into two optionslistenAddress
for the host, andport
for the port, and updated the defaults.This is a breaking change only if you were setting
listenAddress
to a non-standard value. If you were, you should now setlistenAddress
andport
separately.Perhaps there should be an assertion that
listenAddress
does not end in:[0-9]+$
or similar, but I'm honestly not sure how to implement that.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)