-
Notifications
You must be signed in to change notification settings - Fork 135
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
Simple test with curl #174
Comments
It should work like a charm just add the header "X-Prometheus-Scrape-Timeout-Seconds" curl -v --proxy http://test.local:8080 \
-H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
http://test.local:9100/ I had always considered it a bug that the proxy requires this header (there is no default and no test cases if the header is not set), but we get used to it! |
In fact, after digging a little deeper into the scenario, it is not directly the pushprox_proxy which responds with the error message but the node_exporter: the node_exporter also expects the "X-Prometheus-Scrape-Timeout-Seconds" header and as it is not present and the case is obviously not foreseen, this triggers an error. The absence is foreseen in the pushprox and a value is set (--scrape.default-timeout=15s) |
@peekjef72 that quick fix would probably be quite an improvement here. What is most confusing is that calling |
Hi,
is it possible to do end to end testing purely with curl? (Similar to this setup https://github.com/prometheus-community/PushProx/blob/master/end-to-end-test.sh)
For testing I run node-exporter, proxy and client on the same machine:
prometheus node exporter running on
192.168.1.10:9100
I assume that if this is supposed to work I need to use proxy parameter in some way.
I tried to run it like this:
Not sure what am I doing wrong, but all I get is errors so far (
strconv.ParseFloat: parsing "": invalid syntax
).Proxy log:
Client log:
Is this something that should work? Or is Prometheus proxy request impossible to simulate with curl?
The text was updated successfully, but these errors were encountered: