prometheus-community / PushProx

Proxy to allow Prometheus to scrape through NAT etc.
Apache License 2.0
704 stars 132 forks source link

Check status code when polling finished #140

Open walkure opened 1 year ago

walkure commented 1 year ago

Reverse proxies(e.g. nginx / AWS ALB ) replies with 504 Gateway Tiemout response when idle timeout elapsed.

Default value of idle timeouts for AWS ALB / nginx are 60 seconds.

When pushprox-proxy has not received any scrape requests pushprox-client receives 504 reponse after idle timeout elapsed.

So, I've added checking http response status code before reading the response body.

Fix. https://github.com/prometheus-community/PushProx/issues/77 https://github.com/prometheus-community/PushProx/issues/118