[receiver/httpcheck] Add configuration option to prevent following redirections #34623
Labels
enhancement
New feature or request
needs triage
New item requiring triage
receiver/httpcheck
HTTP Check receiver
Component(s)
receiver/httpcheck
Is your feature request related to a problem? Please describe.
An HTTP endpoint can return either 307 or 308 as status code when it has been redirected. Let's say I want to monitor a temporal redirection (307) and act upon changes (e.g. end of redirection → 2xx).
For example, the
http://wikipedia.com
endpoint is redirected to thehttps://wikipedia.com
but I don't want to ensure its reachability but its redirection. Receiver config:The default http client seems to be following redirects, thus getting a 2xx instead:
Describe the solution you'd like
A config option to define the maximum number of redirects or completely disable them by default.
For example, Elastic uses the max_redirects configuration options which defaults to 0 (so no redirects are followed, but the status of the redirect is reported)
Describe alternatives you've considered
Adding the configuration option in the confighttp
Additional context
No response
The text was updated successfully, but these errors were encountered: