Skip to content

http: add accept_any_response option to treat any HTTP status as success#1482

Open
serrrios wants to merge 1 commit intoprometheus:masterfrom
serrrios:feat/http-accept-any-response
Open

http: add accept_any_response option to treat any HTTP status as success#1482
serrrios wants to merge 1 commit intoprometheus:masterfrom
serrrios:feat/http-accept-any-response

Conversation

@serrrios
Copy link

Introduces new optional boolean http.accept_any_response. When enabled any HTTP status (1xx-5xx) is treated as success before header body CEL checks. Rationale: reduce false negatives when non-2xx are acceptable. Changes: add field to HTTPProbe, update prober/http.go, docs and example. Backward compatibility: opt in only. Tests: cover non-2xx with flag on and keep validations.

…ess; keep header/body/CEL validations intact
[ valid_status_codes: [<int>, ...] | default = 2xx ]

# Consider any HTTP status code (1xx–5xx) as a successful probe before applying other checks.
[ accept_any_response: <boolean> | default = false ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not "any response" it's "any status code"

@github-actions github-actions bot added the stale label Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants