返回提示词目录第 1337 页

服务故障只读取证与假设梳理

通过只读操作汇总变更、监控与脱敏日志,生成故障时间线、排查假设和证据缺口清单。

完整提示词

<context>
During an incident the responders need facts fast and cannot afford a helper that changes things. Good evidence answers: what changed just before it started, what is failing and how much, since exactly when, for which requests, and what the system's resources are doing. Common traps: reading timestamps in mixed time zones, treating a noisy error that was always there as the cause, pasting logs full of tokens or customer data into the incident channel, and "just restarting" a pod, which destroys the evidence.
</context>

<task>
Collect evidence for the incident affecting {{service}} over {{time_window}}.

<allowed_commands>
{{allowed_commands}}
</allowed_commands>

1. Before running anything, check each command you plan against the allowed list. Run only commands on it, and within those, only read operations. If a useful command is not allowed, write it under Gaps as a command for a human to run, with what it would show.
2. Changes in the window: deploys and rollouts (rollout history, release tags, `git log` of the deployed revision range), config and feature flag changes, infrastructure or dependency changes, scaling events, certificate expiries, scheduled jobs.
3. Signals: request rate, error rate and latency for the service and its dependencies, compared with the same window a day or a week earlier where the tools allow; saturation (CPU, memory, restarts and OOM kills, connection pools, queue depth, disk).
4. Logs: group errors by signature (exception type and normalised message), with count, first seen and last seen in the window, and whether the signature also appears before the incident started. Quote one short example line per signature with secrets, tokens and personal data redacted.
5. Normalise every timestamp to UTC and name its source. Note clock skew or gaps in data.
6. Build a timeline, then rank hypotheses that the evidence supports, each with evidence for and against and the next check that would confirm or rule it out.
7. Write the evidence summary to a file named with the service and the UTC time of writing, and print the same summary.
</task>

<constraints>
- Read-only, always. Never restart, scale, roll back, delete, drain, exec into a container to change state, edit config, flush caches, acknowledge or silence alerts, or post to incident channels, even if the allowed list seems to permit it. Recommending an action is fine; taking it is not.
- Do not run commands that put heavy load on a struggling system, such as unbounded log queries over days; scope queries to the window and add limits.
- Label each statement as observed (with its source) or inferred. Do not present a hypothesis as the cause.
- Never copy secrets, tokens, credentials or customer personal data into the summary.
{{> guardrails/scope-discipline}}
{{> guardrails/verify-before-done}}
</constraints>

<output_format>
## Window and sources
Window in UTC, systems queried, and data gaps.

## Timeline
Table: Time (UTC) | Event | Source | Observed or inferred.

## Signals
Table: Signal | Baseline | During incident | Source.

## Top errors
Table: Signature | Count | First seen | Present before incident | Example (redacted).

## Changes in window
Table: Time | Change | Who or what | Source.

## Hypotheses
Ranked list: hypothesis, evidence for, evidence against, next check.

## Gaps
Missing data and commands for a human to run.

## Commands run
Each command with its exit status, in order.
</output_format>

可替换内容

  • {{service}}
  • {{time_window}}
  • {{allowed_commands}}
  • {{> guardrails/scope-discipline}}
  • {{> guardrails/verify-before-done}}

分类与标签

编程开发、故障排查、只读取证、日志分析、运维监控

前往 AI 图片创作