Table of Contents

> Alert object

The following objects are directly related to the alert API. 以下是alert API的使用方法

Alert

Alerts are created by the Zabbix server and cannot be modified via the API.

Alerts是由Zabbix server创建,无法通过API修改.

The alert object contains information about whether certain action operations have been executed successfully. It has the following properties. alert对象包含有关某些action操作是否已成功执行的信息,它具有以下特性.

Property Type Description
特性 类 描述
alertid string ID of the alert.
alertid string Alert ID值.
actionid string ID of the action that generated the alert.
actionid string Alert生成的Action ID.
alerttype integer Alert type.

Possible values:
0 - message;
1 - remote command.
alerttype integer Alert类型.

可用值:
0 - message;
1 - remote command.
clock timestamp Time when the alert was generated.
clock timestamp Alert生成的时间.
error string Error text if there are problems sending a message or running a command.
error string Alert发送Message或者执行一个命令产生的报错信息.
esc_step integer Action escalation step during which the alert was generated.
esc_step integer 生成Alert后Action的处理步骤.
eventid string ID of the event that triggered the action.
eventid string 触发Action的事件ID.
mediatypeid string ID of the media type that was used to send the message.
报警媒介类型的id string 用于发送消息 报警媒介类型的ID.
message text Message text. Used for message alerts.
message text 消息文本. 用于消息告警.
retries integer Number of times Zabbix tried to send the message.
retries integer Zabbix尝试发送消息的次数.
sendto string Address, user name or other identifier of the recipient. Used for message alerts.
sendto string 地址,用户名或接收者的其他标识符. 用于消息告警.
status integer Status indicating whether the action operation has been executed successfully.

Possible values for message alerts:
0 - message not sent;
1 - message sent;
2 - failed after a number of retries.

Possible values for command alerts:
1 - command run;
2 - tried to run the command on the Zabbix agent but it was unavailable.
status integer 指示action操作是否已被成功执行的状态.

消息告警的可能值:
0 - 消息未发送;
1 - 消息已发送;
2 - 经多次重试后失败.

命令告警的可能值:
1 - 命令运行;
2 - 尝试在Zabbix agent上运行命令但不可用.
subject string Message subject. Used for message alerts.
subject string 消息主题. 用于消息告警.
userid string ID of the user that the message was sent to.
userid string 发送消息的用户ID.