observability-monitoring
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "observability-monitoring":https://skillpi.com/zh/skills/deepskill-c1c4ad57d2cd85fdfaf0d04023b8470ce2be3d17b81e2c60c1972c997af5325d。安装前核对上游来源和版本:https://github.com/AnastasiyaW/codex-claude-code-config。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
设计、审计与排查生产环境的监控与可观测性体系,涵盖用户影响检查、分层遥测、USE/RED 方法、SLI/SLO/SLA、错误预算、基数控制、可操作告警、燃烧率响应与故障复盘。适用于监控、可观测性、告警、Prometheus、Grafana、OpenTelemetry、日志、追踪、性能剖析、服务健康或故障证据相关场景;不用于通用仪表盘样式设计、纯前端 UI 工作或无关代码审查。
介绍来源: third_party · AnastasiyaW · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: observability-monitoring
description: "Design, audit, and troubleshoot production monitoring and observability using user-impact checks, layered telemetry, USE/RED, SLI/SLO/SLA, error budgets, cardinality controls, actionable alerting, burn-rate response, and postmortems. Use when asked about monitoring, наблюдаемость, алерты, Prometheus, Grafana, OpenTelemetry, logs, traces, profiles, service health, or incident evidence. Do not use for generic dashboard styling, frontend-only UI work, or unrelated code review."Observability Monitoring
Use this skill to turn vague "is it working?" questions into evidence-backed monitoring, alerting, and incident workflows. Start from user or business impact, then move down through the system layers and choose the signal that can prove the current hypothesis.
Operating rule
Do not treat a green dashboard as proof of health. A monitoring claim is complete only when it names:
- the observed scope and time window;
- the user, business, or operator outcome being protected;
- the signal and exact query/probe that supports the claim;
- the threshold or SLO that defines bad;
- the next human action and its runbook/evidence link.
Keep code review, live runtime proof, UI/render proof, and release readiness as separate verdicts.
Investigation is read-only by default. A restart, alert suppression, metric-schema/label change, sampling or retention change, or vendor reconfiguration is a production mutation: involve the responsible owner or incident authority, preserve the relevant evidence first, capture the exact config/command diff, state the rollback condition, and verify the user probe plus SLI after the change.
Workflow
1. Freeze scope and collect live facts
Before changing a monitor, alert, host, or service:
- Read the repository
AGENTS.md, relevant rules, runbooks, and deployment docs. - Establish the actual checkout/branch, deployment, process, host, port, proxy/tunnel, and data source.
- Record the observation time, environment, query/probe, and whether the result is current or historical.
- Inspect the source code/config that emits or consumes the signal before changing it.
- Never infer health from an old screenshot, a stale handoff, a single PID, or a dashboard with no successful user probe.
For infrastructure fixes, document the traffic path (DNS, proxy, tunnel, ingress, service, backend) before touching a surprising value such as 127.0.0.1, a non-default port, or a disabled check.
2. Define the outcome before the metric
Write the protected outcome in concrete terms:
- User: can open the page, submit the request, download the result, or complete the workflow.
- Business: orders, successful jobs, conversions, revenue, or another domain event continue to occur.
- Operator: an on-call engineer receives a page early enough to act and can identify the next step.
Add at least one black-box or synthetic check for the user-facing path. Add real-user telemetry when the experience can vary by browser, geography, device, or network. Technical resource health is not a substitute for a user or business signal.
3. Map the monitored layers
Inspect the layers from bottom to top and state which ones are in scope:
- Hardware/infrastructure: CPU, memory, disk capacity and latency, network, temperature, power, GPU, host availability.
- Host/OS: load, processes, file descriptors, swap, service state, kernel/resource pressure.
- Network: reachability, packet loss, latency, port state, DNS, TLS, ingress/proxy health.
- Application/APM: request rate, errors, latency, saturation, dependency calls, queue depth.
- Databases and queues: throughput, slow queries, connection pools, replication lag, backlog, consumer health.
- Containers/orchestration: desired versus ready replicas, restarts, scheduling, evictions, resource limits, ephemeral identity.
- Business: successful workflows, jobs, orders, revenue, conversion, or domain-specific zero-activity checks.
Do not stop at the infrastructure layer when the business outcome is failing. A system with green CPU and memory can still have a broken payment, form, queue consumer, or model job.
4. Choose the right signal
Use the signal that answers the question instead of collecting everything indiscriminately:
| Question | Primary signal | Practical method |
|---|---|---|
| Is a resource busy, queued, or failing? | Metrics | USE: utilization, saturation, errors |
| Is a service serving users correctly? | Metrics | RED: rate, errors, duration |
| What happened at a specific time? | Structured logs | Search by timestamp, service, severity, request/trace ID |
| Where did a distributed request slow or fail? | Traces | Follow the trace across services and spans |
| Why is code or a process consuming resources? | Profiles | Inspect sampled stacks, CPU, memory, locks, or I/O |
| Do users actually succeed? | Synthetic/RUM/business probes | Run the workflow and inspect the domain result |
Metrics answer aggregate how much/how often. Logs answer what happened. Traces answer where in the path. Profiles answer which code or process consumed the resource. Correlate them with stable resource identity, timestamps, and trace/request context.
5. Design metrics without cardinality accidents
Treat every unique metric-name plus label set as a time series. Before adding a label, estimate its possible values and lifetime.
- Good metric dimensions are bounded and useful for aggregation: method, status class/code, service, region, queue, job type, or environment.
- Keep high-cardinality or per-event values in logs/traces: user ID, request ID, email, raw URL with parameters, exception text, or arbitrary object IDs.
- Prefer route templates over raw URLs.
- Set explicit cardinality limits or views where the telemetry SDK supports them, and monitor overflow/dropped-attribute indicators.
- Prefer histograms for fleet-wide aggregatable latency SLOs. Client-side summaries/quantiles generally cannot be aggregated across instances without changing their meaning; use them only when that limitation is understood. Never hide tail latency behind an average.
If a query needs a unique ID to be useful, that ID belongs in a trace or structured log field, not in a metric label.
6. Define SLI, SLO, SLA, and error budget
Use the terms precisely:
- SLI: a measured indicator, such as successful requests divided by valid requests or p95 latency for a workflow.
- SLO: the internal target and time window for that indicator.
- SLA: an external agreement with consequences if the target is missed.
- Error budget: the allowed unreliability implied by the SLO during the window.
Choose the SLI from the user-facing outcome, not from whichever metric is easiest to collect. Define the valid-request population, exclusions, time window, aggregation, and owner. Treat an SLO as a control loop: remaining budget informs release pace, risk, testing, and reliability work.
7. Build actionable alerts
Alert on symptoms that indicate user or service pain. Use dashboards and drill-downs to investigate causes.
Every paging alert must include:
- symptom and affected scope;
- exact query, threshold, duration, and evaluation window;
- severity and owner;
- a link to the dashboard/query and runbook;
- concrete first actions, rollback criteria, and escalation path;
- a test or smoke procedure proving the alert route works.
If no immediate action exists, make it a dashboard annotation, ticket, or recording rule instead of a page. Use a pending duration (for) to suppress short blips. If using hysteresis, define separate fire and clear thresholds; if using multi-window evaluation, define each window and its condition. Do not confuse either control with Slack/chat routing. Treat "more than two incidents per shift" as a review heuristic, not a universal law: frequent pages mean the system or alert policy needs repair.
Prefer multi-window or burn-rate alerts for SLOs when the backend supports them. A burn rate near 1 spends the budget at the planned rate; a materially higher rate requires faster response. Verify the math against the actual SLO window and alert implementation.
Portable examples
Adapt metric and label names to the live schema; these are patterns, not copy-paste production queries:
# RED error ratio for one service over five minutes.
sum(rate(http_requests_total{service="checkout",code=~"5.."}[5m]))
/
sum(rate(http_requests_total{service="checkout"}[5m]))
# Aggregatable fleet-wide p95 from a histogram.
histogram_quantile(0.95,
sum by (le, service) (
rate(http_request_duration_seconds_bucket{service="checkout"}[5m])
)
)
Use a synthetic/domain probe that asserts the real outcome, not only HTTP reachability. Prefer a read-only endpoint or a sandbox/test tenant. If a write path is unavoidable, require a dry-run or idempotency key, a bounded fixture, explicit cleanup, and an owner-approved change window: submit safe test request -> assert expected status and domain result/job ID -> record latency and trace ID -> clean up. Never send an arbitrary representative request into production.
A burn rate is observed error ratio / allowed error ratio, where allowed error ratio = 1 - SLO. Worked example: for an SLO of 99.9% (allowed = 0.001), a 5-minute observed error ratio of 1.0% (0.010) gives burn rate 10; if the local paging policy is the illustrative >=10 for 5m AND >=5 for 1h, page, otherwise route it according to the lower-severity policy. The query pattern is:
(
sum(rate(http_request_errors_total{service="checkout"}[5m]))
/
sum(rate(http_requests_total{service="checkout"}[5m]))
) / 0.001
The thresholds and windows are examples only; derive and test them from the real SLO, traffic population, exclusions, and paging budget.
8. Triage in evidence order
For a live incident, follow this sequence and keep a short timeline. Apply the change-control boundary above before any mutation:
- Confirm the user/business symptom with a fresh probe.
- Bound blast radius: service, region, tenant, job type, version, and start time.
- Check RED for the affected service and USE for saturated dependencies/resources.
- Correlate logs by time, service, severity, and trace/request ID.
- Follow a failing or slow trace to the first bad span/dependency.
- Use a profile only when resource/code attribution remains unclear or the issue is intermittent.
- Compare deploys, config changes, feature flags, capacity, and external dependencies.
- Apply the smallest reversible mitigation with an explicit rollback condition.
- Re-run the user probe and the relevant SLI query; confirm recovery over a meaningful window.
- Record the evidence, unresolved uncertainty, and follow-up owner.
Do not restart or reconfigure a service merely because a check is red. First establish whether the check is stale, misrouted, a false positive, or a real symptom, and preserve the evidence needed to explain the decision.
9. Close the loop
After recovery:
- Verify the original symptom is gone, not only that the process is alive.
- Record detection time, acknowledgement, mitigation, recovery, and customer impact.
- Review alert quality: actionable, correctly routed, deduplicated, and linked to evidence.
- Write a blameless postmortem for material incidents: timeline, impact, contributing/systemic causes, what went well, what failed, and tracked prevention items.
- Update the runbook, monitor, test, or architecture so the same failure is easier to detect and diagnose next time.
Vendor mapping
Use the actual stack discovered in the repository/runtime. Common roles from the source video are:
- Prometheus or VictoriaMetrics: scrape and store metrics;
- Grafana: visualize and query multiple sources;
- Loki or Elasticsearch/OpenSearch: logs;
- Jaeger or Tempo: traces;
- OpenTelemetry: vendor-neutral collection and export of telemetry signals;
- Mimir or Thanos: longer-term or larger-scale metric storage;
- Zabbix/Nagios: host and infrastructure checks.
Historical names in the video (ping, syslog, SNMP, MRTG/RRD, Nagios, and Cacti; 00:55-03:17) explain the evolution of monitoring and are not default deployment recommendations.
These are roles, not defaults. Do not install, replace, or reconfigure a vendor component without checking the live architecture, documentation, compatibility, retention, cost, authorization, and rollback path.
Minimal runbook template
Use this shape for every new page:
Name:
User symptom:
SLI/query:
Trigger and duration:
Scope labels:
Severity/owner:
Dashboard and raw query:
First safe action:
Rollback condition:
Verification probe:
Escalation:
Known false positives:
Last tested:
Gotchas
- A host can be healthy while the business workflow is broken.
- Averages hide tail latency; inspect percentiles and failed requests.
- A metric label creates a new series for every unique combination; raw URLs and IDs can exhaust memory.
- A trace without stable service/resource context is hard to correlate; a log without timestamps or IDs is weak evidence.
- A page without a concrete action trains the operator to ignore pages.
- A synthetics-only check misses real-user variance; RUM-only telemetry can discover pain too late.
- Profiles are an attribution signal, not a replacement for service-level metrics, logs, or traces.
- An SLO target is not an SLA promise unless an external contract says so.
- Auto-generated captions and copied vendor names can be wrong; verify terms before putting them into code or runbooks. See
references/source-notes.md.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Dashboard is green but users fail | Missing black-box/business SLI, wrong route, or stale data source | Run a fresh user probe, verify timestamps/labels, add the missing outcome signal |
| One deploy creates a huge series spike | High-cardinality label or unbounded route/ID | Remove the label from metrics, normalize routes, move detail to logs/traces, cap SDK cardinality |
| Alert fires but nobody acts | Alert is a cause guess, too sensitive, unowned, or lacks a runbook | Alert on a user symptom, add owner/action/query/runbook, add for; if using hysteresis define separate fire/clear thresholds, and if using multi-window define each condition; test delivery |
| Error rate rises but cause is unclear | Logs are unstructured or traces are not correlated | Add structured fields and trace IDs, sample a failing trace, inspect dependency spans |
| Service is slow but RED looks normal | Low traffic, bad aggregation, or resource contention outside the app | Check synthetic latency, USE for host/queue/storage, tail percentiles, and profiles |
| Dashboard is blank or stale | Target/scrape/exporter/collector/backend failure, retention gap, or clock skew | Check last-sample time, target and collector health, dropped/ingestion counters, retention, and time synchronization; do not interpret blank as zero |
| A query shows zero but the system may be uninstrumented | The series is absent, filtered out, or genuinely zero | Test absent-series semantics, inspect raw labels and last sample, and add an explicit freshness/telemetry-health check |
| Trace is incomplete | Sampling, context propagation, collector drops, or backend retention | Check trace ID propagation, sampling decision, collector drop counters, backend ingestion, and clock synchronization |
| Page storm during one incident | No grouping/deduplication or too many low-value alerts | Group by incident/service, keep one page for the symptom, demote diagnostic signals |
| Burn-rate alert disagrees with the dashboard | Different SLI population, window, exclusions, or recording rule | Reconcile the numerator/denominator, window, and query; test against known scenarios |
| Restart appears to fix it but it returns | Mitigation hid a systemic cause or destroyed evidence | Capture logs/metrics first, record the restart, identify the recurring trigger, add prevention |
Source and current-practice notes
The reusable concepts in this skill were extracted from the supplied video and cross-checked against current primary documentation. See references/source-notes.md for the source URL, timestamp map, caption corrections, and official references.
版本历史
-
v2026.10.24
GitHub ↗
原版更新说明
Three ideas from this month's agent-harness news, adopted as checks rather than prompts. ## New - **Output legibility** — [`docs/output-legibility.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/output-legibility.md). Karpathy's readability ladder (STE-style text, diagram, HTML, video), plus the two ASD-STE100 rules that need no licensed dictionary: one concept keeps one term, and sentences stay short. - **`scripts/term_drift_check.py`** — checks agent output against a project glossary. It flags synonyms of your terms (`stem*` covers inflection, so it works in Russian too) and overlong sentences, and skips code, URLs and HTML comments. Exit `0` clean, `1` findings, `2` not checked. It ships with a self-test whose must-fail controls catch six deliberate breaks of the logic. - **Bounded harness-improvement pilot** — [`docs/harness-improvement-pilot.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/harness-improvement-pilot.md). The method behind Google Research's Harness², without the auto-patcher: a frozen suite with a held-out case, one change per candidate, strict improvement and no safety regression. - **Dead-code sweep** — a new reference in the `refactoring-safely` skill, after OpenAI's GPT-6 maintenance guide. It covers a read-only audit with production evidence and one small draft PR per removal, and keeps killswitches and safeguards out of scope. ## Changed - `rules/quality-code.md`: when you change code, update or delete the comment next to it in the same commit. Research suggests a wrong or stale comment misleads a model more than a missing one. - `CLAUDE.md`: new Harness² and Output Legibility sections. Full changelog: [`UPDATES.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/UPDATES.md) · PRs #18, #19
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供生产环境监控与可观测性体系设计的完整方法论
- 覆盖 SLI/SLO/SLA、错误预算、燃烧率响应等工程刚需
- 包含端到端工作流和故障排查矩阵
亮点
- 触发词覆盖全面(Prometheus/Grafana/OpenTelemetry等)
- 明确排除非适用场景(前端UI/通用仪表盘)
- 边界清晰,不易误触
亮点
- 9步清晰工作流结构
- 含PromQL示例和runbook模板
- frontmatter完整,文档长度适中
待提升项
-
引用文件缺失 原报告严重程度:重大
SKILL.md 引用了 references/source-notes.md 但未传入
改进建议:请补充 source-notes.md 文件或移除相关引用
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。