Files
dd0c/products/03-alert-intelligence/migrations/005_analytics.sql
Max f1f4dee7ab
Some checks failed
CI — P3 Alert / test (push) Successful in 28s
CI — P5 Cost / test (push) Successful in 42s
CI — P6 Run / saas (push) Successful in 41s
CI — P6 Run / build-push (push) Has been cancelled
CI — P3 Alert / build-push (push) Failing after 53s
CI — P5 Cost / build-push (push) Failing after 5s
feat(cost): add zombie hunter, Slack interactions, composite scoring
- Zombie resource hunter: detects idle EC2/RDS/EBS/EIP/NAT resources
- Slack interactive handler: acknowledge, snooze, create-ticket actions
- Composite anomaly scorer: Z-Score + rate-of-change + pattern + novelty
- Cold-start fast path for new resources (<7 days data)
- 005_zombies.sql migration
2026-03-03 06:39:20 +00:00

14 lines
585 B
SQL

-- 005_analytics.sql
-- Migration for MTTR and Noise Reduction Analytics
-- Add resolved_at column for MTTR calculation (if not exists)
ALTER TABLE incidents ADD COLUMN IF NOT EXISTS resolved_at TIMESTAMPTZ;
-- Add pd_escalated_at column for PagerDuty auto-escalation idempotency
ALTER TABLE incidents ADD COLUMN IF NOT EXISTS pd_escalated_at TIMESTAMPTZ;
-- Add index on created_at for time-series queries (trends, noise stats)
CREATE INDEX IF NOT EXISTS idx_incidents_created_at ON incidents(created_at);
CREATE INDEX IF NOT EXISTS idx_alerts_received_at ON alerts(received_at);