Status: Reviewed (deep-dive v1)
Stack: PowerShell (optional email/webhook hooks) → SQL alert warehouse/procs → Blazor Server UI (ack/assign)
Depends on: Findings from SQL-01..09 (inventory stale, backup Red, job fail, security, capacity, perf, patch overdue, HA unhealthy)
Goal: One severity model, one ack workflow, and a short runbook link per alert type — so noise doesn’t bury real fires.
Topics 01–09 create signals. Without alerting hygiene you get either silence or pager fatigue. This note is the glue: normalize, route, ack, and point to the right deep-dive.
| Severity | Examples | Response bias |
|---|---|---|
| Critical | Backup Red on Tier A; AG not syncing prod; disk < 10%; sysadmin surprise; Agent down on prod | Immediate |
| High | Job Critical failed; log overdue FULL; blocking > N min; patch GDR overdue | Same business day |
| Medium | Index queue backlog; capacity Yellow; perf wait spike without user impact | Scheduled |
| Low | Stale collect; informational drift | Digest |
Map each collector flag → severity in dbo.AlertRule.
| Alert type | Source topic | Default runbook |
|---|---|---|
InventoryStale |
SQL-01 | SQL-01 |
BackupOverdue / BackupNever |
SQL-02 | SQL-02 |
IndexMaintFailed |
SQL-03 | SQL-03 |
AgentJobFailed / AgentDisabledCritical |
SQL-04 | SQL-04 |
SecurityFinding |
SQL-05 | SQL-05 |
VolumeTight / GrowthForecast |
SQL-06 | SQL-06 |
Blocking / HotWait / TopQuerySpike |
SQL-07 | SQL-07 |
BuildOutOfDate |
SQL-08 | SQL-08 |
HaUnhealthy |
SQL-09 | SQL-09 |
Add types sparingly; prefer enriching existing ones.
| Table | Purpose |
|---|---|
dbo.AlertRule |
Type → severity, threshold, enabled, runbook URL |
dbo.Alert |
Open/closed instances (natural key: type+entity+fingerprint) |
dbo.AlertEvent |
State changes (open, ack, escalate, close) |
dbo.AlertAck |
Who/when/comment |
dbo.AlertException |
Approved suppressions with expiry |
Procs:
usp_Alert_Evaluate — run after collects; upsert open alerts; auto-close clearedusp_Alert_Ack — Blazor ackusp_Alert_GetOpenBoardusp_Alert_GetDetail — timeline + runbook linkDedup: same type + instance + object fingerprint within window updates LastSeenAt, doesn’t spam new rows.
PS role: optional dispatcher reading usp_Alert_GetUnnotified.
AlertEvent | Symptom | Likely cause |
|---|---|
| Alert storm | Missing dedup; threshold too tight; collect flap |
| Silent failure | Evaluate job not running (SQL-04); rules disabled |
| Acked forever open | Auto-close not wired; finder still true |
| Wrong runbook | Alert type mis-mapped in AlertRule |
AlertRule rows for core types covering SQL-01..09 | # | Topic | Doc |
|---|---|---|
| 01 | Inventory & configuration baseline | SQL-01-Inventory-Baseline.md |
| 02 | Backup & restore readiness | SQL-02-Backup-Restore-Readiness.md |
| 03 | Index & statistics maintenance | SQL-03-Index-Statistics-Maintenance.md |
| 04 | SQL Agent jobs & schedules | SQL-04-SQL-Agent-Jobs-Schedules.md |
| 05 | Security & access hygiene | SQL-05-Security-Access-Hygiene.md |
| 06 | Capacity & growth | SQL-06-Capacity-Growth.md |
| 07 | Performance health | SQL-07-Performance-Health.md |
| 08 | Patching & upgrades | SQL-08-Patching-Upgrades.md |
| 09 | HA/DR awareness | SQL-09-HA-DR.md |
| 10 | Alerting & runbooks | SQL-10-Alerting-Runbooks.md |
Beyond this outline: wait for Rick (implementation spikes, estate-specific targets, major-upgrade playbook, etc.).
SQL Dude — SQL-10 Alerting & Runbooks v1