monitoring incidents
按最新优先顺序列出状态页上的事件,包括每个事件的状态、影响、开始时间和更新次数。你发布的内容一经写入就会公开:没有草稿,也没有发布操作。
bash
octri monitoring incidents [list | show | create | post | resolve | update | delete]标志
--openboolean不显示已解决的事件。
octri monitoring incidents show <id>
打印单个事件及其时间线,更新按从最早到最新的顺序排列。
参数
<id>string必填事件。
octri monitoring incidents create <title>
开启一个事件。
参数
<title>string必填读者看到的标题。
标志
--message <text>string必填读者看到的第一条更新。
--status <status>stringinvestigating、identified、monitoring 或 resolved。
--impact <impact>stringminor、major、critical 或 maintenance。
--checks <ids>list受影响的检查项 ID。
octri monitoring incidents post <id>
向时间线添加一条更新。
参数
<id>string必填事件。
标志
--message <text>string必填更新内容。ID 后面的文字也可以作为内容。
--status <status>string推进事件状态,例如推进到 identified。
octri monitoring incidents resolve <id>
发布结束更新并将事件标记为已解决。
参数
<id>string必填事件。
标志
--message <text>string结束更新。
octri monitoring incidents update <id>
更改事件本身,而非其时间线。
参数
<id>string必填事件。
标志
--title <text>string新标题。
--impact <impact>string新的影响级别。
--checks <ids>list替换受影响的检查项。
octri monitoring incidents delete <id> --yes
删除事件及其所有更新。若要保留记录,请改为解决事件。
参数
<id>string必填事件。
标志
--yesboolean必填确认删除。
示例
开启事件
bash
octri monitoring incidents create "Elevated checkout errors" --message "We are seeing failed payments and are looking into it." --impact majorOutput
✔ Opening the incident
✔ Incident Elevated checkout errors is on the status page (7fbbea1a-b853-4e71-83a6-8d3ce75fd940)
octri monitoring incidents post 7fbbea1a-b853-4e71-83a6-8d3ce75fd940 --status identified --message "…"发布更新
bash
octri monitoring incidents post 7fbbea1a-b853-4e71-83a6-8d3ce75fd940 --status identified --message "A bad deploy. Rolling back now."Output
✔ Posting the update
✔ Posted to Elevated checkout errors: now identified解决事件
bash
octri monitoring incidents resolve 7fbbea1a-b853-4e71-83a6-8d3ce75fd940Output
✔ Resolving
✔ Elevated checkout errors is resolved.读取时间线
bash
octri monitoring incidents show 7fbbea1a-b853-4e71-83a6-8d3ce75fd940Output
✔ Loading incident
Elevated checkout errors
status resolved
impact major
started 1s ago
resolved 0s ago
investigating 1s ago · Dana Reyes-Park
We are seeing failed payments and are looking into it.
identified 1s ago · Dana Reyes-Park
A bad deploy. Rolling back now.
resolved 0s ago · Dana Reyes-Park
This incident has been resolved.相关内容
octri monitoring announcements:状态页面上的横幅,例如套餐维护公告。octri monitoring checks:运行时间检查:根据你的规范生成检查项并立即运行。