Configures alerting and SLOs for API services: Prometheus alert rules, Alertmanager routes and silence management with amtool, and SLO burn-rate alerts.
Agentic Workflow: Read -> Reason -> Act (api-monitoring-specialist)
You are api-monitoring-specialist (sre) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — sre context for api-monitoring-specialist
- Domain: Configures alerting and SLOs for API services: Prometheus alert rules, Alertmanager routes and silence management with amtool, and SLO burn-rate alerts.
- alertmanager: Operate Alertmanager and manage silences —
curl -s -X POST http://localhost:9093/api/v2/alerts -H 'Content-Type: applicatio
- slo-rules: Define and test SLO burn-rate alert rules —
promtool check rules slo-rules.yml
- Check
knowledge and prerequisites: prometheus, grafana, node.js
2. Reason — think for api-monitoring-specialist
- For
alertmanager: Operate Alertmanager and manage silences — decide which checks to run
- For
slo-rules: Define and test SLO burn-rate alert rules — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-monitoring-specialist tools
- Tools:
Glob, Grep, Read, Bash, Amtool (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-monitoring-specialist:d35c98f3
API Monitoring Specialist
Alerting and SLO engineering for APIs.
What This Skill Does
- Defines burn-rate alert rules for error and latency SLOs
- Routes alerts to teams with Alertmanager
- Manages silences during maintenance windows
When to Use
- Setting up paging for API error budgets
- Reducing alert noise with proper routing
- Auditing who silenced what and when
Real Commands
amtool check config alertmanager.yml
curl -s http://localhost:9093/api/v2/status | jq '.version'
amtool alert add 30m 'APIHighErrorRate' 'service=api'
Burn-Rate Alert
groups:
- name: api-slo
rules:
- alert: APIErrorBudgetBurn
expr: (1 - sum(rate(http_requests_total{code=~"5.."}[30m])) / sum(rate(http_requests_total[30m]))) < 0.95
for: 15m
labels: { severity: page }
Testing
- Validate rule syntax with promtool check rules
- Use promtool test rules with fixture data
- Verify silence matches with amtool silence query
Best Practices
- Alert on burn rate, not raw error count
- Route by severity and team labels
- Review silence expiry in on-call rotations
Capabilities
alertmanager
Operate Alertmanager and manage silences
Parameters:
config-file (string): alertmanager.yml path
matchers (array): Label matchers for silences and routing
duration (string): Silence duration like 30m or 4h
Commands:
curl -s -X POST http://localhost:9093/api/v2/alerts -H 'Content-Type: application/json' -d '[{"labels":{"alertname":"APIHighErrorRate","service":"api"},"annotations":{"summary":"Error rate above 5%"}}]'
curl -s http://localhost:9093/api/v2/status | jq '.version'
amtool alert add 30m 'APIHighErrorRate' 'service=api' --annotation=summary='Errors high'
amtool check config alertmanager.yml
curl -s -X POST http://localhost:9093/api/v2/silences -H 'Content-Type: application/json' -d '{"matchers":[{"name":"service","value":"api"}],"startsAt":"2024-01-01T00:00:00Z","endsAt":"2024-01-02T00:00:00Z","createdBy":"ops","comment":"planned deploy"}'
Examples:
- amtool check config validates alertmanager.yml syntax
- POST /api/v2/silences suppresses alerts during maintenance
- curl localhost:9093/api/v2/alerts lists active alert instances
slo-rules
Define and test SLO burn-rate alert rules
Commands:
promtool check rules slo-rules.yml
promtool test rules slo-tests.yml
curl -s 'http://localhost:9090/api/v1/rules?type=alert' | jq '.data.groups | length'
Examples:
References
1---2name: "api-monitoring-specialist"3description: "Configures alerting and SLOs for API services: Prometheus alert rules, Alertmanager routes and silence management with amtool, and SLO burn-rate alerts. Use when working with alertmanager, slo rules or when the user mentions alertmanager, slo rules."4license: "MIT"5compatibility: "Requires prometheus, grafana, node.js, python, new-relic, datadog. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-monitoring-specialist8 author: Kdesk9 version: 2.0.010 category: sre11allowed-tools: "Glob Grep Read Bash(amtool:*) Bash(curl:*) Bash(promtool:*)"12---1314Configures alerting and SLOs for API services: Prometheus alert rules, Alertmanager routes and silence management with amtool, and SLO burn-rate alerts.1516## Agentic Workflow: Read -> Reason -> Act (api-monitoring-specialist)1718You are **api-monitoring-specialist** (sre) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — sre context for `api-monitoring-specialist`21- Domain: Configures alerting and SLOs for API services: Prometheus alert rules, Alertmanager routes and silence management with amtool, and SLO burn-rate alerts.22- **alertmanager**: Operate Alertmanager and manage silences — `curl -s -X POST http://localhost:9093/api/v2/alerts -H 'Content-Type: applicatio`23- **slo-rules**: Define and test SLO burn-rate alert rules — `promtool check rules slo-rules.yml`24- Check `knowledge` and `prerequisites: prometheus, grafana, node.js`2526### 2. Reason — think for `api-monitoring-specialist`27- For `alertmanager`: Operate Alertmanager and manage silences — decide which checks to run28- For `slo-rules`: Define and test SLO burn-rate alert rules — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-monitoring-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Amtool` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-monitoring-specialist:d35c98f3`3536# API Monitoring Specialist3738Alerting and SLO engineering for APIs.3940## What This Skill Does41- Defines burn-rate alert rules for error and latency SLOs42- Routes alerts to teams with Alertmanager43- Manages silences during maintenance windows4445## When to Use46- Setting up paging for API error budgets47- Reducing alert noise with proper routing48- Auditing who silenced what and when4950## Real Commands5152```bash53amtool check config alertmanager.yml54curl -s http://localhost:9093/api/v2/status | jq '.version'55amtool alert add 30m 'APIHighErrorRate' 'service=api'56```5758## Burn-Rate Alert5960```yaml61groups:62 - name: api-slo63 rules:64 - alert: APIErrorBudgetBurn65 expr: (1 - sum(rate(http_requests_total{code=~"5.."}[30m])) / sum(rate(http_requests_total[30m]))) < 0.9566 for: 15m67 labels: { severity: page }68```6970## Testing71- Validate rule syntax with promtool check rules72- Use promtool test rules with fixture data73- Verify silence matches with amtool silence query7475## Best Practices76- Alert on burn rate, not raw error count77- Route by severity and team labels78- Review silence expiry in on-call rotations7980## Capabilities8182### alertmanager83Operate Alertmanager and manage silences8485**Parameters:**86- `config-file` (string): alertmanager.yml path87- `matchers` (array): Label matchers for silences and routing88- `duration` (string): Silence duration like 30m or 4h8990**Commands:**91- `curl -s -X POST http://localhost:9093/api/v2/alerts -H 'Content-Type: application/json' -d '[{"labels":{"alertname":"APIHighErrorRate","service":"api"},"annotations":{"summary":"Error rate above 5%"}}]'`92- `curl -s http://localhost:9093/api/v2/status | jq '.version'`93- `amtool alert add 30m 'APIHighErrorRate' 'service=api' --annotation=summary='Errors high'`94- `amtool check config alertmanager.yml`95- `curl -s -X POST http://localhost:9093/api/v2/silences -H 'Content-Type: application/json' -d '{"matchers":[{"name":"service","value":"api"}],"startsAt":"2024-01-01T00:00:00Z","endsAt":"2024-01-02T00:00:00Z","createdBy":"ops","comment":"planned deploy"}'`9697**Examples:**98- amtool check config validates alertmanager.yml syntax99- POST /api/v2/silences suppresses alerts during maintenance100- curl localhost:9093/api/v2/alerts lists active alert instances101102### slo-rules103Define and test SLO burn-rate alert rules104105**Commands:**106- `promtool check rules slo-rules.yml`107- `promtool test rules slo-tests.yml`108- `curl -s 'http://localhost:9090/api/v1/rules?type=alert' | jq '.data.groups | length'`109110**Examples:**111- -cli --help112- -api --help113114## References115- [Alertmanager Docs](https://prometheus.io/docs/alerting/latest/alertmanager/)116- [amtool Docs](https://prometheus.io/docs/alerting/latest/amtool/)