reachlin / sensu_exporter

a Prometheus exporter for Sensu
Apache License 2.0
8 stars 14 forks source link

Add flag to allow modifying the API request timeout #3

Closed andsens closed 5 years ago

andsens commented 5 years ago

The /results response from our sensu API is huge, so unless the machine is quite powerful there is no chance that the response can be decoded in less than 3s. So instead we just get:

Query Sensu failed. net/http: request canceled (Client.Timeout exceeded while reading body)

This PR adds the --timeout flag, which allows you to alter the timeout set on the httpClient.

reachlin commented 5 years ago

@andsens merged and thanks.