-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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 adds default http port to the Host header when querying targets. #2226
Comments
If both are valid, that is not something we are likely to change. First, we tend to err on the side of explicitness and secondly, other people might already rely on the way it is now and changing it would break them, which we cannot do within 1.x |
My reading of the spec is that the server (HAProxy) must expect both forms.
I ran into the same and modified the HAProxy config in the same way.
I believe Prometheus' behavior is correct and should not change; I'm happy
my HAProxy configuration is a little less buggy now.
…On Mon, Nov 28, 2016, 08:02 Fabian Reinartz ***@***.***> wrote:
If both are valid, that is not something we are likely to change. First,
we tend to err on the side of explicitness and secondly, other people might
already rely on the way it is now and changing it would break them, which
we cannot do within 1.x
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2226 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAICBqiuyIcj_sNgRrtBsbX7MoRE69VLks5rCnyZgaJpZM4K9cku>
.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
#9523 adds an option to change this behaviour. |
What did you do?
Added a static config to monitor a webapp exposing a prometheus endpoint
What did you expect to see?
The target is sitting behind a reverse proxy (haProxy) and we cannot access the target directly.
haProxy expected to see a
Host
header like this :What did you see instead? Under which circumstances?
But instead saw was this :
Although this does not violate the http spec, the spec does allow for default http ports (80 / 443) to be stripped from the Host header. (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23).
We needed to modify our haProxy configuration so that it properly matched incoming http requests from prometheus.
The text was updated successfully, but these errors were encountered: