CP-44601: Aggregate CloudZeroWebhookNoEvents with sum() to stop per-series misfires - #906
Merged
Merged
Conversation
evan-cz
force-pushed
the
CP-44601-webhook-noevents-alert-aggregation
branch
2 times, most recently
from
July 14, 2026 19:20
61da3b6 to
30b8dd6
Compare
evan-cz
marked this pull request as ready for review
July 14, 2026 19:29
Greptile SummaryFixes the
Confidence Score: 5/5
Important Files Changed
Reviews (2): Last reviewed commit: "CP-44601: Aggregate CloudZeroWebhookNoEv..." | Re-trigger Greptile |
dmepham
approved these changes
Jul 14, 2026
…eries misfires The CloudZeroWebhookNoEvents alert used a bare per-series expression (rate(czo_webhook_types_total[30m]) == 0) that fired whenever any single series was flat -- a rarely-seen resource/operation, or one quiet replica -- even while the webhook was healthy and busy overall. It also never fired on a webhook that had received nothing since startup, because the counter has no series until the first admission event is processed. Aggregate fleet-wide with sum(rate(...)) and add "or vector(0)" so genuine silence (an absent metric) still fires. Update the template comment and the monitoring-infrastructure alert reference to match. Verified: helm template renders the corrected expression; helm-unittest webhookserver_gating_test.yaml passes 36/36. Co-Authored-By: Claude opus-4.8 <noreply@anthropic.com>
evan-cz
force-pushed
the
CP-44601-webhook-noevents-alert-aggregation
branch
from
August 10, 2026 22:37
30b8dd6 to
f271de6
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 10, 2026
dmepham
added a commit
that referenced
this pull request
Aug 11, 2026
Per Evan's review, reframe the notes as the routine maintenance release they are rather than an incident response: - Drop the dedicated Security section and CVE links; fold the x/net and x/text updates into Build & Infrastructure as routine dependency updates flagged by vulnerability scanners (no known reachability or severity claimed). - Scope the config-loader bug fix to the optional, non-default webhook-disable path; note default installs were unaffected. - Remove the "upgrade promptly" urgency language, matching 1.2.11. - Add two of Evan's webhook fixes: CloudZeroWebhookNoEvents alert false-alarms (#906) and anaximander RBAC-vs-absent-VWC diagnostics (#908). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Cp5HSjxdMed1oiCx9rymw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
CloudZeroWebhookNoEventsPrometheusRule alert fires on healthy webhooks. Its expressionis evaluated per series.
czo_webhook_types_totalis a counter split bykind_group/kind_version/kind_resource/operation(and per pod/instance by the scrape), so the alert fires whenever any single series is flat for 30m — a rarely-seen resource/operation (e.g. storageclass creates) or one quiet replica — even while the webhook is healthy and busy overall.It also never fires in the case it is meant to catch: the counter has no series until the first admission event, so a webhook that is up but receiving nothing produces an absent metric and an empty result.
Fix
sum()collapses the per-label and per-pod series into a single fleet-wide rate, so the alert fires only when no replica sees any admission event of any type.or vector(0)substitutes 0 when the metric is absent, so genuine silence still fires.The template comment and
helm/docs/monitoring-infrastructure.mdare updated to match.Verification
helm templaterenders the corrected expression.webhookserver_gating_test.yamlpasses 36/36.This PR was created with AI assistance (Claude Code by Anthropic).