Skip to content

fix(monitoring): resolve 5XX alert false positives from Stackdriver no-data#9567

Merged
kodjima33 merged 3 commits into
mainfrom
fix/5xx-nodata-false-positive
Jul 12, 2026
Merged

fix(monitoring): resolve 5XX alert false positives from Stackdriver no-data#9567
kodjima33 merged 3 commits into
mainfrom
fix/5xx-nodata-false-positive

Conversation

@beastoin

@beastoin beastoin commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix 3 Stackdriver-based 5XX alert rules that fire false positives when there are zero 5XX errors
  • Change noDataState from "Alerting" to "OK" for backend, backend-integration, and backend-sync 5XX rules

Root Cause

Stackdriver queries filtered by response_code_class = "500" return no data when there are zero 5XX errors. With noDataState: "Alerting", Grafana treats no-data as an alert condition and fires with sentinel value -1. This is the firing alert mon reported: "Backend - 5XX error rate is high" with value -1.

Prometheus-based 5XX rules are not affected because they use or vector(0) to return 0 instead of no-data. Stackdriver queries cannot use or vector(0).

Changes

File UID Rule Title
backend.json cew4jcnpa68sga Backend - 5XX error rate is high
backend-integration.json eew96o25qztvkf Backend-integration - 5XX error rate is high
backend-sync.json cew97uqu791q8a Backend-sync - 5XX error rate is high

Each: noDataState: "Alerting"noDataState: "OK"

Test plan

  • JSON validation passes (python3 -m json.tool on all 3 files)
  • No remaining noDataState: "Alerting" in the 3 changed files
  • Deploy to Grafana and verify the firing alert resolves
  • Verify 5XX alerts still fire correctly when actual 5XX errors occur (non-empty Stackdriver response)

🤖 Generated with Claude Code

Review in cubic

beastoin and others added 3 commits July 12, 2026 13:38
Stackdriver queries filtered by response_code_class=500 return no data
when there are zero 5XX errors. With noDataState=Alerting, this causes
a false-positive alert firing with sentinel value -1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same Stackdriver no-data false-positive as backend 5XX rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same Stackdriver no-data false-positive as backend 5XX rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@beastoin

Copy link
Copy Markdown
Collaborator Author

@beastoin No issues found. The diff is limited to the three Stackdriver-backed 5XX rules, and noDataState: "OK" is the right behavior for these response_code_class = "500" queries because zero 5XX traffic can legitimately produce no series; execErrState: "Error" remains in place, so datasource/query failures still alert, and real non-empty 5XX series still flow through the existing reduce/threshold checks. Verified with python3 -m json.tool on all three changed alert files, rg confirming no remaining noDataState: "Alerting" in those files, and jq inspection of the three UIDs/filters/thresholds. PR_APPROVED_LGTM

Please keep the deploy-side Grafana resolution check from the PR test plan.


by AI for @beastoin

@beastoin

Copy link
Copy Markdown
Collaborator Author

Test results:

  • python3 -m json.tool backend/charts/monitoring/alerts/backend.json >/dev/null — pass
  • python3 -m json.tool backend/charts/monitoring/alerts/backend-sync.json >/dev/null — pass
  • python3 -m json.tool backend/charts/monitoring/alerts/backend-integration.json >/dev/null — pass
  • grep -n '"noDataState": "Alerting"' backend/charts/monitoring/alerts/backend.json backend/charts/monitoring/alerts/backend-sync.json backend/charts/monitoring/alerts/backend-integration.json — pass, no matches\n\nCoverage review: config-only change; JSON validation is the only executable test needed. Raw Alerting text still exists only in the unchanged receiver label Omi - Services Alerting (Telegram), not in noDataState.\n\nTESTS_APPROVED\n\n---\n_by AI for @beastoin_

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Backend bug fix — root cause stated, scoped, CI green. Merging.

@kodjima33 kodjima33 merged commit 0f2ea2e into main Jul 12, 2026
23 of 26 checks passed
@kodjima33 kodjima33 deleted the fix/5xx-nodata-false-positive branch July 12, 2026 14:34
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.

2 participants