Monitoring Stack Deployer
Expert in deploying and configuring production monitoring with Prometheus, Grafana, and SLO-driven alerting.
Activation Triggers
Activate on: "monitoring setup", "Prometheus config", "Grafana dashboard", "alerting rules", "SLO dashboard", "metrics pipeline", "observability stack", "kube-prometheus-stack", "ServiceMonitor"
NOT for: Application logging → log-aggregation-architect | Distributed tracing → logging-observability | Incident response → site-reliability-engineer
Quick Start
- Deploy kube-prometheus-stack — Prometheus, Grafana, Alertmanager, node-exporter in one Helm chart
- Define SLOs — availability and latency targets per service
- Create ServiceMonitors — auto-discover application metrics endpoints
- Build dashboards — USE method (utilization, saturation, errors) for infrastructure; RED method (rate, errors, duration) for services
- Configure alerting — SLO burn-rate alerts, not threshold alerts
Core Capabilities
| Domain |
Technologies |
| Metrics |
Prometheus 3.x, Mimir, Thanos, VictoriaMetrics |
| Visualization |
Grafana 11, Perses (open-source Grafana alternative) |
| Alerting |
Alertmanager, PagerDuty, OpsGenie, Slack integration |
| SLOs |
Sloth, Pyrra, Google SRE workbook burn-rate model |
| K8s Native |
kube-prometheus-stack, ServiceMonitor, PodMonitor, PrometheusRule |
Architecture Patterns
SLO-Based Burn-Rate Alerting
Traditional (BAD): "Alert if error rate > 1% for 5 minutes"
Problem: Too many false positives, alert fatigue
SLO-Based (GOOD): "Alert if burning SLO budget too fast"
SLO: 99.9% availability over 30 days → 43.2 min error budget
Multi-window burn rate:
┌─────────────────────────────────────────────┐
│ Severity │ Burn Rate │ Long Window │ Short │
│ Critical │ 14.4x │ 1 hour │ 5 min │
│ Warning │ 6x │ 6 hours │ 30 min │
│ Ticket │ 1x │ 3 days │ 6 hrs │
└─────────────────────────────────────────────┘
Prometheus Recording Rules for SLOs
# PrometheusRule for SLO burn rate
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: api-slo-rules
spec:
groups:
- name: api-slo-burn-rate
rules:
- record: slo:api_availability:burn_rate_1h
expr: |
1 - (
sum(rate(http_requests_total{code!~"5.."}[1h]))
/
sum(rate(http_requests_total[1h]))
)
/ (1 - 0.999)
- alert: APIAvailabilityBurnRateCritical
expr: slo:api_availability:burn_rate_1h > 14.4
and slo:api_availability:burn_rate_5m > 14.4
for: 2m
labels:
severity: critical
annotations:
summary: "API burning error budget 14.4x faster than allowed"
RED Method Dashboard Layout
┌─────────────────────────────────────────────────────────┐
│ Service: api-gateway SLO: 99.9% │
├──────────────┬──────────────┬───────────────────────────┤
│ RATE │ ERRORS │ DURATION │
│ req/sec │ error % │ p50 / p95 / p99 │
│ ▁▂▃▅▇█▇▅▃ │ ▁▁▁▂▁▁▁▁▁ │ p50: 12ms │
│ peak: 1.2k │ curr: 0.02% │ p95: 89ms p99: 240ms │
├──────────────┴──────────────┴───────────────────────────┤
│ Error Budget: 38.2 min remaining (88% of 43.2 min) │
│ ████████████████████████████████░░░░ │
└─────────────────────────────────────────────────────────┘
Anti-Patterns
- Threshold-based alerting — static thresholds like "alert if CPU > 80%" cause alert fatigue. Use SLO burn rates that correlate with user impact.
- No recording rules — computing complex queries at alert evaluation time is slow and expensive. Pre-compute with recording rules.
- Dashboard sprawl — hundreds of dashboards nobody checks. Build one service dashboard template, parameterize with variables.
- Missing service discovery — manually listing scrape targets. Use ServiceMonitor/PodMonitor to auto-discover Kubernetes workloads.
- Alerting without runbooks — alerts fire but responders do not know what to do. Every alert must link to a runbook with diagnosis steps.
Quality Checklist
[ ] kube-prometheus-stack or equivalent deployed and healthy
[ ] ServiceMonitors auto-discover all application metrics endpoints
[ ] SLOs defined for every user-facing service
[ ] Burn-rate alerts configured (critical, warning, ticket)
[ ] Recording rules pre-compute expensive queries
[ ] Grafana dashboards use RED method for services, USE for infrastructure
[ ] Alertmanager routes to correct channels (PagerDuty/Slack/OpsGenie)
[ ] Alert grouping and inhibition rules prevent notification storms
[ ] Every alert has a linked runbook
[ ] Metrics retention configured (15d local, long-term in Mimir/Thanos)
[ ] Dashboard provisioned as code (JSON/YAML in Git)
[ ] Error budget dashboard visible to engineering and product
1---
2license: Apache-2.0
3name: monitoring-stack-deployer
4description: "Production monitoring stack deployer with Prometheus, Grafana, and SLO-based alerting. Activate on: monitoring setup, Prometheus configuration, Grafana dashboards, alerting rules, SLO definition, metrics pipeline, observability stack. NOT for: application logging (use log-aggregation-architect), distributed tracing (use logging-observability), incident response (use site-reliability-engineer)."
5allowed-tools: Read,Write,Edit,Bash(docker:*,kubectl:*,terraform:*,npm:*,npx:*)
6category: DevOps & Infrastructure
7tags:
8 - monitoring
9 - prometheus
10 - grafana
11 - observability
12pairs-with:
13 - skill: site-reliability-engineer
14 reason: SRE practices depend on monitoring stack for SLOs and incident detection
15 - skill: log-aggregation-architect
16 reason: Logging and metrics pipelines often share infrastructure
17metadata:
18 source: https://skillmd.com/skills/curiositech/monitoring-stack-deployer
19---
20
21# Monitoring Stack Deployer
22
23Expert in deploying and configuring production monitoring with Prometheus, Grafana, and SLO-driven alerting.
24
25## Activation Triggers
26
27**Activate on:** "monitoring setup", "Prometheus config", "Grafana dashboard", "alerting rules", "SLO dashboard", "metrics pipeline", "observability stack", "kube-prometheus-stack", "ServiceMonitor"
28
29**NOT for:** Application logging → `log-aggregation-architect` | Distributed tracing → `logging-observability` | Incident response → `site-reliability-engineer`
30
31## Quick Start
32
331. **Deploy kube-prometheus-stack** — Prometheus, Grafana, Alertmanager, node-exporter in one Helm chart
342. **Define SLOs** — availability and latency targets per service
353. **Create ServiceMonitors** — auto-discover application metrics endpoints
364. **Build dashboards** — USE method (utilization, saturation, errors) for infrastructure; RED method (rate, errors, duration) for services
375. **Configure alerting** — SLO burn-rate alerts, not threshold alerts
38
39## Core Capabilities
40
41| Domain | Technologies |
42|--------|-------------|
43| **Metrics** | Prometheus 3.x, Mimir, Thanos, VictoriaMetrics |
44| **Visualization** | Grafana 11, Perses (open-source Grafana alternative) |
45| **Alerting** | Alertmanager, PagerDuty, OpsGenie, Slack integration |
46| **SLOs** | Sloth, Pyrra, Google SRE workbook burn-rate model |
47| **K8s Native** | kube-prometheus-stack, ServiceMonitor, PodMonitor, PrometheusRule |
48
49## Architecture Patterns
50
51### SLO-Based Burn-Rate Alerting
52
53```
54Traditional (BAD): "Alert if error rate > 1% for 5 minutes"
55 Problem: Too many false positives, alert fatigue
56
57SLO-Based (GOOD): "Alert if burning SLO budget too fast"
58 SLO: 99.9% availability over 30 days → 43.2 min error budget
59
60 Multi-window burn rate:
61 ┌─────────────────────────────────────────────┐
62 │ Severity │ Burn Rate │ Long Window │ Short │
63 │ Critical │ 14.4x │ 1 hour │ 5 min │
64 │ Warning │ 6x │ 6 hours │ 30 min │
65 │ Ticket │ 1x │ 3 days │ 6 hrs │
66 └─────────────────────────────────────────────┘
67```
68
69### Prometheus Recording Rules for SLOs
70
71```yaml
72# PrometheusRule for SLO burn rate
73apiVersion: monitoring.coreos.com/v1
74kind: PrometheusRule
75metadata:
76 name: api-slo-rules
77spec:
78 groups:
79 - name: api-slo-burn-rate
80 rules:
81 - record: slo:api_availability:burn_rate_1h
82 expr: |
83 1 - (
84 sum(rate(http_requests_total{code!~"5.."}[1h]))
85 /
86 sum(rate(http_requests_total[1h]))
87 )
88 / (1 - 0.999)
89 - alert: APIAvailabilityBurnRateCritical
90 expr: slo:api_availability:burn_rate_1h > 14.4
91 and slo:api_availability:burn_rate_5m > 14.4
92 for: 2m
93 labels:
94 severity: critical
95 annotations:
96 summary: "API burning error budget 14.4x faster than allowed"
97```
98
99### RED Method Dashboard Layout
100
101```
102┌─────────────────────────────────────────────────────────┐
103│ Service: api-gateway SLO: 99.9% │
104├──────────────┬──────────────┬───────────────────────────┤
105│ RATE │ ERRORS │ DURATION │
106│ req/sec │ error % │ p50 / p95 / p99 │
107│ ▁▂▃▅▇█▇▅▃ │ ▁▁▁▂▁▁▁▁▁ │ p50: 12ms │
108│ peak: 1.2k │ curr: 0.02% │ p95: 89ms p99: 240ms │
109├──────────────┴──────────────┴───────────────────────────┤
110│ Error Budget: 38.2 min remaining (88% of 43.2 min) │
111│ ████████████████████████████████░░░░ │
112└─────────────────────────────────────────────────────────┘
113```
114
115## Anti-Patterns
116
1171. **Threshold-based alerting** — static thresholds like "alert if CPU > 80%" cause alert fatigue. Use SLO burn rates that correlate with user impact.
1182. **No recording rules** — computing complex queries at alert evaluation time is slow and expensive. Pre-compute with recording rules.
1193. **Dashboard sprawl** — hundreds of dashboards nobody checks. Build one service dashboard template, parameterize with variables.
1204. **Missing service discovery** — manually listing scrape targets. Use ServiceMonitor/PodMonitor to auto-discover Kubernetes workloads.
1215. **Alerting without runbooks** — alerts fire but responders do not know what to do. Every alert must link to a runbook with diagnosis steps.
122
123## Quality Checklist
124
125```
126[ ] kube-prometheus-stack or equivalent deployed and healthy
127[ ] ServiceMonitors auto-discover all application metrics endpoints
128[ ] SLOs defined for every user-facing service
129[ ] Burn-rate alerts configured (critical, warning, ticket)
130[ ] Recording rules pre-compute expensive queries
131[ ] Grafana dashboards use RED method for services, USE for infrastructure
132[ ] Alertmanager routes to correct channels (PagerDuty/Slack/OpsGenie)
133[ ] Alert grouping and inhibition rules prevent notification storms
134[ ] Every alert has a linked runbook
135[ ] Metrics retention configured (15d local, long-term in Mimir/Thanos)
136[ ] Dashboard provisioned as code (JSON/YAML in Git)
137[ ] Error budget dashboard visible to engineering and product
138```