Slack Log Error-Spike Anomaly Notifications Prompt
Design Slack notifications that detect log error-rate spikes and new error signatures, then post grouped, sampled, and actionable anomaly alerts instead of raw log noise.
- Target user
- Engineers wanting early warning from logs without log spam in Slack
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior observability engineer who has built log-based alerting and learned that streaming raw error logs into Slack is an anti-pattern — anomalies and new signatures are the signal. I will provide: - Our logging stack (Loki, Elasticsearch, CloudWatch, Datadog) and how we'd query it - Service/team boundaries and Slack channel layout - Baseline error volumes and known-noisy log sources - Slack constraints (bot scopes, files.upload availability) - Pain points (log spam, missed regressions, alert fatigue) Your job: 1. **Detect anomalies, not lines** — define two triggers: (a) error-RATE spike vs a rolling baseline (e.g. 3x the trailing 1h median), and (b) NEW error signatures never seen in the prior window. Never alert per log line. 2. **Signature grouping** — normalize log messages into signatures (strip IDs, timestamps, hex, numbers) so thousands of errors collapse into a handful of fingerprints with counts. 3. **Message design** — Block Kit: header (service + "error spike" or "new error" + severity), section with current rate vs baseline and affected count; context block linking to the log query, pre-scoped to the window and signature. 4. **Sampling** — include 1-3 representative sampled log lines per signature inside a code block, not the full firehose; link out for the rest. 5. **Rate limiting the alerter** — cap alerts per service per window, collapse a continuing spike into one updating message, and auto-resolve when the rate returns to baseline. 6. **Noise control** — allowlist known-benign signatures, suppress during known maintenance, and require a spike to persist for a short duration before alerting to avoid single-blip noise. 7. **Routing** — send each anomaly to the owning team's channel with the right user-group mention; escalate only on sustained, high-severity spikes. 8. **Validation** — replay a past incident's logs and confirm the spike and any new signatures would have fired with useful lead time. Output as: (a) the spike + new-signature detection queries, (b) the signature normalization logic, (c) Block Kit JSON for one error-spike message, (d) the per-service rate-limit and allowlist config, (e) a rollout plan starting with one service in shadow mode. Bias toward: anomalies and new signatures over raw lines, aggressive grouping, alerter self-rate-limiting.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Prometheus Alert Rule to Slack Template Prompt
Author Prometheus alerting rules whose labels and annotations render directly into a high-signal Slack message — required summary/runbook/dashboard fields, severity labels, and a Go template that produces a scannable Block Kit-ready payload.
-
Slack Grafana Alerting Webhook Routing Prompt
Build a Grafana unified-alerting contact point that posts clean, severity-aware Slack messages with deep-linked panels, folder-based channel routing, and resolved-state updates.
-
Slack Threading and Broadcast Strategy Prompt
Design a consistent threading model for an ops/incident channel — when a bot replies in-thread, when it broadcasts to channel, and how alert updates, acks, and resolves stay grouped without flooding the main feed.
-
Slack War Room Status Snapshot Bot Prompt
Design a bot that posts a live, auto-refreshing incident status snapshot in the war-room channel — current sev, IC, mitigations in flight, key metrics, and next update ETA — so stakeholders stop interrupting responders.
More Slack prompts & error guides
Browse every Slack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.