Skip to content

Add build-monitor-service-hook-deliveries alert to source control#6610

Closed
missymessa wants to merge 4 commits into
mainfrom
fix/build-monitor-service-hook-alert
Closed

Add build-monitor-service-hook-deliveries alert to source control#6610
missymessa wants to merge 4 commits into
mainfrom
fix/build-monitor-service-hook-alert

Conversation

@missymessa

Copy link
Copy Markdown
Member

Summary

Adds the �uild-monitor-service-hook-deliveries Grafana alert rule to source control (Production + Staging).

What changed

The existing Grafana alert was querying for \ServiceHookNotificationStatus\ custom events that no longer exist in the codebase — the telemetry was removed at some point but the alert was never updated. It only fired via
oDataState: Alerting\ (false positive when no data flows), not from actual failure detection.

Updated the alert to:

  • Query actual HTTP request telemetry (
    equests\ table) from DotNetEng-Status App Insights for the \POST AzurePipelines/BuildComplete\ endpoint
  • Change
    oDataState\ from \Alerting\ to \OK\
  • Use explicit \15m\ time bins instead of \\
  • Use parameterized resource paths for staging/prod

Production

The alert has already been updated in production Grafana via the API. This PR tracks the change in source control so it's deployed consistently.

Fixes: https://dev.azure.com/dnceng/internal/_workitems/edit/10629

missymessa and others added 3 commits June 3, 2026 10:20
The existing Grafana alert (UID: build-monitor-service-hook-deliveries) was
querying for 'ServiceHookNotificationStatus' custom events that no longer
exist in the codebase. This caused false-positive alerts via noDataState.

Updated the alert to query actual HTTP request telemetry from the
DotNetEng-Status App Insights instance for the POST AzurePipelines/BuildComplete
endpoint, which is the real webhook handler for AzDO service hook deliveries.

Changes:
- Query: customEvents/ServiceHookNotificationStatus -> requests/BuildComplete
- noDataState: Alerting -> OK
- Time bins: \ -> explicit 15m
- Data source: dotnet-eng -> DotNetEng-Status-Prod (parameterized)

Fixes: https://dev.azure.com/dnceng/internal/_workitems/edit/10629

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@garath

garath commented Jul 21, 2026

Copy link
Copy Markdown
Member

What's up with the formatting and text of the description? It seems like it has errors.

@garath garath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, I'm confused about this PR.

Adds the �uild-monitor-service-hook-deliveries Grafana alert rule to source control (Production + Staging).

This alert is already codified over in historical.dashboard.json. It's shown in the Grafana dashboard here and its currently showing squiggles of success, which indicates the alert is working.

The existing Grafana alert was querying for ServiceHookNotificationStatus custom events that no longer exist in the codebase — the telemetry was removed at some point but the alert was never updated.

That event is generated over in MetricsObserver. I checked the App Insights and see that it is still recording events.

Am I missing something? What is this PR fixing?

@missymessa

Copy link
Copy Markdown
Member Author

Closing this PR. On investigation the premise doesn't hold:

  • The ServiceHookNotificationStatus telemetry still exists and is flowing. It's emitted by MetricsObserver (dotnet-helix-service), not DotNet.Status.Web's BuildComplete handler. App Insights (dotnet-eng) shows BuildMonitorWebhook-dnceng with 336 events over the last 7 days, succeeded/failed measurements populated, last seen today.
  • The existing alert (dotnet-helix-service: src/Monitoring.HelixService/alertrules/Historical.BuildMonitorServiceHook.alert.json) already has real failure detection (Fail last > 10) against that live data.
  • The ~5 months of firing (Dec 2025 – May 2026) was noData because the AzDO service hook 439d5934 was disabled and delivering nothing — i.e. the alert correctly surfaced a dead hook. It cleared when the hook was re-enabled. Switching noDataState to OK would have silenced that real outage.

This PR also duplicates the existing alert (same uid/panelId/NotificationId) in a second repo/deploy path, and repoints to
equests telemetry that goes silent when the hook stops delivering. Thanks @garath for catching this.

If we want to reduce noData fragility, the lower-risk follow-up is to tune the existing rule in dotnet-helix-service rather than add a parallel one here.

@missymessa missymessa closed this Jul 24, 2026
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