Alerting & Runbooks

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.


Why this closes the outline

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.


What “good” looks like


Severity model (starting — confirm with stakeholders)

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 catalog (wire to existing topics)

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.


Checklist — detect & store

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:

Dedup: same type + instance + object fingerprint within window updates LastSeenAt, doesn’t spam new rows.


Checklist — notify (keep lean)

PS role: optional dispatcher reading usp_Alert_GetUnnotified.


Checklist — present (Blazor)


Operator workflow (short)

  1. Open board → Critical unacked first
  2. Open detail → read runbook link (correct SQL-0N)
  3. Ack with short note (“investigating backup share”)
  4. Fix using that topic’s checklist
  5. Confirm signal cleared on next evaluate (or manually close if rule allows)
  6. If recurring noise: tune threshold or add dated exception — don’t forever-mute Critical without stakeholder approval

Post-incident mini checklist


Common failure patterns

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

Permissions notes


Done definition


Outline complete (Inventory & configuration baseline through Alerting & runbooks)

# 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