Status: Reviewed (deep-dive v1)
Stack: PowerShell (optional email/webhook hooks) → SQL alert warehouse/procs → Blazor Server UI (ack/assign)
Depends on: Findings from Inventory & configuration baseline through HA/DR awareness (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 |
Inventory & configuration baseline | Inventory & configuration baseline |
BackupOverdue / BackupNever |
Backup & restore readiness | Backup & restore readiness |
IndexMaintFailed |
Index & statistics maintenance | Index & statistics maintenance |
AgentJobFailed / AgentDisabledCritical |
SQL Agent jobs & schedules | SQL Agent jobs & schedules |
SecurityFinding |
Security & access hygiene | Security & access hygiene |
VolumeTight / GrowthForecast |
Capacity & growth | Capacity & growth |
Blocking / HotWait / TopQuerySpike |
Performance health | Performance health |
BuildOutOfDate |
Patching & upgrades | Patching & upgrades |
HaUnhealthy |
HA/DR awareness | HA/DR awareness |
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 Agent jobs & schedules); 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 Inventory & configuration baseline through HA/DR awareness | # | 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 stakeholder direction (implementation spikes, estate-specific targets, major-upgrade playbook, etc.).
SQL Dude — Alerting & Runbooks v1