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 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.


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 Rick)

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 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.


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 Rick

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-04); 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 (SQL-01..10)

# 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