On this page

告警对象

以下对象与alert API直接相关。

告警

告警由 Zabbix 服务器创建,且无法通过 API 修改。

告警对象包含有关某些动作操作是否已成功执行的信息。它具有以下属性。

属性 类型 描述
alertid ID 告警的 ID。
actionid ID 生成该告警的动作 ID。
alerttype integer 告警类型。

可能的值:
0 - 消息;
1 - 远程命令。
clock timestamp 生成告警的时间。
error string 发送消息或运行命令时如果出现问题的错误文本。
esc_step integer 生成该告警时的动作升级步骤。
eventid ID 触发该动作的事件 ID。
mediatypeid ID 用于发送消息的媒介类型 ID。
message text 消息文本。

属性行为
- 如果 alerttype 设置为“message”,则为 supported
retries integer Zabbix 尝试发送该消息的次数。
sendto string 收件人的地址、用户名或其他标识符。

属性行为
- 如果 alerttype 设置为“message”,则为 supported
status integer 表示动作操作是否已成功执行的状态。

alerttype 设置为“message”时,可能的值:
0 - 消息未发送;
1 - 消息已发送;
2 - 重试若干次后失败;
3 - 新告警尚未由告警管理器处理。

alerttype 设置为“remote command”时,可能的值:
0 - 命令未运行;
1 - 命令已运行;
2 - 已尝试在 Zabbix agent 上运行该命令,但其不可用。
subject string 消息主题。

属性行为
- 如果 alerttype 设置为“message”,则为 supported
userid ID 接收该消息的用户 ID。
p_eventid ID 生成该告警的问题事件 ID。
acknowledgeid ID 生成该告警的确认 ID。