agentleFS
pvnarppvnarp/agent-skills/skills/monitoring/SKILL.md

monitoring

Skill1 starsChanged 9 months agoMITView on GitHub

Designs monitoring and alerting systems. Covers metric selection, dashboard design, alert rules, SLOs/SLIs, on-call runbooks, and observability architecture. Use when setting up monitoring, defining SLOs, creating dashboards, or improving alerting.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use database.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xiaobei930Skill

    database

    Database design, query optimization, migrations, and indexing. Use when designing schemas, writing queries, or managing migrations.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you can only monitor four things, monitor these.

    line 21
  2. Distinctive:

    Default time range: last 6 hours (most investigations start here)

    line 71
  3. Distinctive:

    Every alert must be actionable: If the response is "wait and see," it's not an alert.

    line 99
  4. Distinctive:

    Every alert needs a runbook: No one remembers what to do at 3 AM.

    line 100
  5. Distinctive:

    Review alerts monthly: Delete alerts that fire but require no action (noise).

    line 101

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Monitoring & Alerting

Monitor for user impact, not system internals. A server at 95% CPU is fine if users are happy. A server at 20% CPU is broken if requests are timing out.

The Four Golden Signals

Monitor these for every service:

SignalWhat It MeasuresExample Metric
LatencyHow long requests takep50, p95, p99 response time
TrafficHow much demandRequests per second, concurrent users
ErrorsHow often things failError rate (%), 5xx count
SaturationHow full the system isCPU, memory, disk, queue depth, connection pool

If you can only monitor four things, monitor these.

SLOs, SLIs, SLAs

SLI (Service Level Indicator)

A metric that measures a user-facing behavior.

SLI: Percentage of HTTP requests completing in < 500ms
Current: 99.2%

SLO (Service Level Objective)

A target for an SLI. Internal commitment.

SLO: 99.5% of requests complete in < 500ms, measured monthly
Error budget: 0.5% = ~3.6 hours of allowed degradation per month

SLA (Service Level Agreement)

An SLO with consequences. External contract.

SLA: 99.9% uptime. Credits issued below this threshold.

Define SLOs before building dashboards. They tell you what to measure and when to alert.

Dashboard Design

Layout

┌─────────────────────────────────────────────┐
│              Service Health Summary          │
│  ✅ API  ✅ Database  ⚠️ Worker  ✅ Cache    │
├──────────────────────┬──────────────────────┤
│   Request Rate       │   Error Rate         │
│   📈 (last 6h)      │   📈 (last 6h)      │
├──────────────────────┼──────────────────────┤
│   Latency (p50/p95)  │   Saturation         │
│   📈 (last 6h)      │   📈 (last 6h)      │
├──────────────────────┴──────────────────────┤
│              Recent Deployments              │
│  ▼ deploy markers on all graphs above       │
└─────────────────────────────────────────────┘

Principles

  • Top-level dashboard: Red/yellow/green health for each service. Glanceable.
  • Service dashboard: The four golden signals for one service. Drill-down.
  • Investigation dashboard: Detailed metrics for debugging. On-demand.
  • Deploy markers on every graph (most issues correlate with deploys)
  • Default time range: last 6 hours (most investigations start here)
  • Include "what's normal" baselines (yesterday, last week)

Alert Design

When to Alert

  • SLO error budget is burning faster than expected
  • Service is down or unreachable
  • Error rate exceeds baseline by 3x+
  • Latency p95 exceeds SLO threshold for > 5 minutes

When NOT to Alert

  • CPU/memory/disk at a threshold (alert on user impact, not system state)
  • A single transient error (wait for pattern)
  • Something that can wait until business hours (use a ticket instead)
  • A dashbaord already shows it (redundant noise)

Alert Template

ALERT: [clear, specific name]
SEVERITY: critical / warning / info
CONDITION: [metric] [operator] [threshold] for [duration]
IMPACT: [what users experience]
RUNBOOK: [link to resolution steps]
ESCALATION: [who to contact if not resolved in X minutes]

Alert Rules

  1. Every alert must be actionable. If the response is "wait and see," it's not an alert.
  2. Every alert needs a runbook. No one remembers what to do at 3 AM.
  3. Review alerts monthly. Delete alerts that fire but require no action (noise).
  4. Page on symptoms, ticket on causes. "Requests failing" is a page. "Disk at 80%" is a ticket.

Metric Naming Convention

<service>.<subsystem>.<metric>.<unit>

# Examples
api.http.request_duration.milliseconds
api.http.requests.total
api.database.query_duration.milliseconds
api.database.connections.active
worker.jobs.processed.total
worker.jobs.failed.total
worker.queue.depth.count

Common Monitoring Stack

NeedTools
MetricsPrometheus, Datadog, CloudWatch, Grafana
LogsLoki, ELK, CloudWatch Logs, Datadog Logs
TracesJaeger, Zipkin, Datadog APM, Honeycomb
AlertsPagerDuty, OpsGenie, Grafana Alerting
UptimePingdom, UptimeRobot, Checkly
DashboardsGrafana, Datadog, CloudWatch

Reference: reference/alerting-patterns.md - golden signals by service type, severity levels, alert fatigue prevention, SLO/SLI templates, dashboard layouts, PromQL patterns, escalation decision tree.

Monitoring Maturity Checklist

Level 1: Basic

  • Health check endpoint exists and is monitored
  • Error rate tracked and alerted on
  • Basic uptime monitoring (is it responding?)

Level 2: Operational

  • Four golden signals dashboarded per service
  • Alerts have runbooks
  • Deploy markers on graphs
  • Log aggregation searchable

Level 3: SLO-Driven

  • SLOs defined for user-facing services
  • Error budget tracking and burn rate alerts
  • Distributed tracing for request flow
  • Alert noise reviewed and reduced monthly

Level 4: Proactive

  • Anomaly detection on key metrics
  • Capacity planning based on traffic trends
  • Chaos testing validates monitoring coverage
  • On-call load balanced and sustainable

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.