cx-cases
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCases Management Skill
案例管理Skill
A Case groups related alert events into one investigation unit with a status,
priority, category, and assignee. Use this skill to inspect cases and drive them
through their lifecycle (active → acknowledged → resolved → closed).
案例将相关告警事件分组为一个包含状态、优先级、类别和负责人的调查单元。使用此Skill查看案例并推动其完成生命周期(活跃→已确认→已解决→已关闭)。
CLI Commands
CLI命令
| Command | Purpose |
|---|---|
| Get a single case by ID |
| Update mutable fields |
| Add a comment to the case timeline |
| Assign a case (email, or raw user ID) |
| Remove the assignee |
| Acknowledge (signals you're working it; stops re-notification) |
| Remove the acknowledgment |
| Resolve a case (irreversible — see below) |
| Close a case (terminal) |
| Override the computed priority |
| Remove a priority override |
| Event timeline (status changes, comments, assignments) |
| A single event — drill in, e.g. to expand a comment thread |
| Notification deliveries (connector, status, time) |
| Command | Purpose |
|---|---|
| 通过ID获取单个案例 |
| 更新可变字段 |
| 在案例时间线添加评论 |
| 分配案例(邮箱或原始用户ID) |
| 移除负责人 |
| 确认(表明你正在处理该案例;停止重复通知) |
| 取消确认 |
| 解决案例(不可逆——见下文) |
| 关闭案例(终结状态) |
| 覆盖系统计算的优先级 |
| 移除优先级覆盖设置 |
| 事件时间线(状态变更、评论、分配记录) |
| 单个事件——深入查看,例如展开评论线程 |
| 通知交付记录(连接器、状态、时间) |
Case Lifecycle
案例生命周期
PENDING_ACTIVATION ──► ACTIVE ◄────────► ACKNOWLEDGED
│ ╲ │ ╲
│ ╲ │ ╲
▼ ╲ ▼ ╲
CLOSED ╲──► RESOLVED ◄─── (from ACK)
│
▼
CLOSED (terminal)| From state | Allowed transitions | Notes |
|---|---|---|
| → | System-driven activation; not user-controllable |
| → | Ack is optional; for a false alarm, |
| → | The only "back" transition: |
| → | Irreversible — cannot reopen to |
| (none) | Terminal |
Categories: or . Priorities: (highest) → .
AVAILABILITYSECURITYP1P5PENDING_ACTIVATION ──► ACTIVE ◄────────► ACKNOWLEDGED
│ ╲ │ ╲
│ ╲ │ ╲
▼ ╲ ▼ ╲
CLOSED ╲──► RESOLVED ◄─── (from ACK)
│
▼
CLOSED (terminal)| 原状态 | 允许的状态转换 | 说明 |
|---|---|---|
| → | 系统驱动激活;不可由用户控制 |
| → | 确认是可选操作;对于误报,可直接 |
| → | 唯一的“回退”转换: |
| → | 不可逆——无法重新打开为 |
| (none) | 终结状态 |
类别:或。优先级:(最高)→。
AVAILABILITYSECURITYP1P5Triage Workflow
分类处理工作流
- Inspect — . The payload includes
cx cases get <id>,groupings,labels,impactedEntities,kpiBreaches, and bothaiSummary(computed) andpriorityDetails.system(user-set).priorityDetails.override - Investigate — Pull the underlying telemetry by querying the alert's DataPrime / PromQL to find root cause before acting.
Optionally export the investigation via or pull the case's
cx olly/impactedEntitiesto confirm the impact. See thegroupingsskill.cx-telemetry-querying - Claim — then
cx cases assign <id> --user you@example.com.cx cases acknowledge <id> - Record findings — to leave investigation notes on the timeline (root cause, links, next steps) as you go. Comments appear as
cx cases comment <id> --text "<note>"events incomment.cx cases events list - Resolve or close — see below.
- Re-prioritize if impact differs from the computed value —
/
cx cases set-priority <id> --priority P1. Only possible while the case is still open; priority cannot be overridden once a case isclear-priorityorRESOLVED.CLOSED
- 查看 — 。返回内容包含
cx cases get <id>、groupings、labels、impactedEntities、kpiBreaches,以及aiSummary(系统计算)和priorityDetails.system(用户设置)。priorityDetails.override - 调查 — 在采取行动前,通过查询告警的DataPrime/PromQL获取底层遥测数据以找到根本原因。可选择通过导出调查结果,或获取案例的
cx olly/impactedEntities来确认影响范围。详见groupingsSkill。cx-telemetry-querying - 认领 — 然后执行
cx cases assign <id> --user you@example.com。cx cases acknowledge <id> - 记录发现 — ,在时间线中留下调查笔记(根本原因、链接、下一步计划)。评论会作为
cx cases comment <id> --text "<note>"事件出现在comment中。cx cases events list - 解决或关闭 — 见下文。
- 重新设置优先级 如果影响与系统计算的优先级不符 — /
cx cases set-priority <id> --priority P1。仅在案例处于未关闭状态时可操作;一旦案例变为clear-priority或RESOLVED,则无法覆盖优先级。CLOSED
Resolving
解决案例
Resolution is irreversible (a case can only move to ), so
the CLI requires both a reason and a confirmation:
RESOLVEDCLOSED- Pass — a one-line postmortem (root cause, what fixed it, follow-up) visible to teammates in the timeline. Use
--reason "<text>"only when a reason genuinely doesn't apply.--no-reason - In agent / non-interactive mode, also pass ; without it the command refuses and must be handed to the user to run interactively.
--yes
If uncertain, stay in (reversible via ) until
confident. For non-resolution edits (title, post-hoc postmortem link), use
.
ACKNOWLEDGEDunacknowledgecx cases update解决操作是不可逆的(状态的案例只能转为),因此CLI需要同时提供原因和确认:
RESOLVEDCLOSED- 传入— 一行事后分析(根本原因、修复措施、后续计划),团队成员可在时间线中查看。仅当确实无需原因时才使用
--reason "<text>"。--no-reason - 在代理/非交互模式下,还需传入;否则命令会拒绝执行,必须由用户以交互方式运行。
--yes
如果不确定,保持状态(可通过回退)直到确认。对于非解决类编辑(标题、事后分析链接),使用。
ACKNOWLEDGEDunacknowledgecx cases updateBulk Operations
批量操作
There are no bulk endpoints. To act on many cases, pipe IDs through a loop, e.g.
.
... | jq -r '.[].id' | xargs -I {} cx cases acknowledge {}没有批量操作端点。要对多个案例执行操作,可通过循环传递ID,例如。
... | jq -r '.[].id' | xargs -I {} cx cases acknowledge {}Key Principles
核心原则
- Use emails, never user IDs — for and in all output.
assign --user - is irreversible and
resolveis terminal — confirm before resolving; for false alarmsclosefromclosedirectly.ACTIVE - Always supply a resolution reason unless truly applies.
--no-reason - -style shorthand is accepted anywhere a priority/status/category is expected.
P1 - Multi-profile fan-out with (repeatable) for cross-environment triage.
-p <profile>
- 使用邮箱,而非用户ID — 在命令和所有输出中均遵循此原则。
assign --user - 不可逆,
resolve是终结状态 — 解决前请确认;对于误报,直接从close状态执行ACTIVE。close - 始终提供解决原因,除非确实适用。
--no-reason - 式简写在所有需要优先级/状态/类别的场景均被接受。
P1 - 使用(可重复)实现多配置文件分发,用于跨环境分类处理。
-p <profile>
References
参考资料
- Case analytics:
references/case-analytics.md - Single case investigation:
references/single-case.md
- 案例分析:
references/case-analytics.md - 单个案例调查:
references/single-case.md
Related Skills
相关Skill
- — the alert definitions behind the events grouped into a case.
cx-alerts - — pivot from a case's impacted entities into logs/spans/metrics.
cx-telemetry-querying
- — 案例中分组事件背后的告警定义。
cx-alerts - — 从案例的受影响实体转向日志/追踪/指标。
cx-telemetry-querying