Octri

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>string

investigating、identified、monitoring 或 resolved。

--impact <impact>string

minor、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默认值:This incident has been resolved.

结束更新。

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 major
Output
✔ 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-8d3ce75fd940
Output
✔ Resolving
✔ Elevated checkout errors is resolved.

读取时间线

bash
octri monitoring incidents show 7fbbea1a-b853-4e71-83a6-8d3ce75fd940
Output
✔ 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.