Skip to content

fix: VectorSinkFailing alert never fires for sinks with transport-only or 5xx-only failures - #269

Merged
aa1ex merged 1 commit into
kaasops:mainfrom
aa1ex:fix/sinkfailing-alert-transport-only
Jul 28, 2026
Merged

fix: VectorSinkFailing alert never fires for sinks with transport-only or 5xx-only failures#269
aa1ex merged 1 commit into
kaasops:mainfrom
aa1ex:fix/sinkfailing-alert-transport-only

Conversation

@aa1ex

@aa1ex aa1ex commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The VectorSinkFailing expression adds two independent aggregations: transport failures from vector_http_client_errors_total and error responses from vector_http_client_responses_total{status=~"5..|429"}. Vector registers counters lazily, so a sink that fails only at the transport level (connection refused, DNS, timeout) has no responses series for the 5xx matcher, and a sink that only receives 5xx/429 has no errors series. In PromQL, adding a vector to an empty vector produces an empty result, so in both cases the sink drops out of the expression and the alert never fires, even at a 100% failure rate. A dead endpoint that refuses connections is exactly the transport-only case.

The fix pads each addend with or 0 * sum by (pod, component_id) (rate(vector_http_client_requests_sent_total[...])), so both sides of the addition always carry the full set of (pod, component_id) present in the denominator. A failing sink now yields its true failure ratio, a healthy sink yields 0, and an idle sink evaluates to 0/0 = NaN and is filtered by the threshold.

@aa1ex
aa1ex merged commit 07d7711 into kaasops:main Jul 28, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant