告警 object
以下 objects 直接与 alert API 相关。
Alert
Alert 由 Zabbix 服务器创建,且不能通过 API 修改。
alert 对象包含有关某些 action 操作是否已成功执行的信息。它具有以下属性。
| Property | Type | Description |
|---|---|---|
| alertid | ID | Alert 的 ID。 |
| actionid | ID | 生成该 alert 的 action 的 ID。 |
| alerttype | integer | Alert 类型。 可能的值: 0 - 消息; 1 - 远程命令。 |
| clock | timestamp | 生成 alert 的时间。 |
| error | string | 如果发送消息或运行命令时出现问题,则为错误文本。 |
| esc_step | integer | 生成 alert 时所处的 action 升级步骤。 |
| eventid | ID | 触发该 action 的事件 ID。 |
| mediatypeid | ID | 用于发送消息的媒体类型 ID。 |
| message | text | 消息文本。 Property behavior: - supported if alerttype is set to "message" |
| retries | integer | Zabbix 尝试发送消息的次数。 |
| sendto | string | 收件人的地址、用户名或其他标识符。 Property behavior: - supported if alerttype is set to "message" |
| status | integer | 指示该 action 操作是否已成功执行的状态。 如果 alerttype 设置为 "message",可能的值为:0 - 消息未发送; 1 - 消息已发送; 2 - 重试若干次后失败; 3 - 新 alert 仍未被 alert manager 处理。 如果 alerttype 设置为 "remote command",可能的值为:0 - 命令未运行; 1 - 命令已运行; 2 - 尝试在 Zabbix agent 上运行命令,但该 agent 不可用。 |
| subject | string | 消息主题。 Property behavior: - supported if alerttype is set to "message" |
| userid | ID | 接收该消息的用户 ID。 |
| p_eventid | ID | 生成该 alert 的问题事件 ID。 |
| acknowledgeid | ID | 生成该 alert 的确认 ID。 |