[comment]: # translation:outdated

[comment]: # aside: 1

[comment]: # ({6f7a4854-05585755})
# 告警 object

以下objects与`alert` API直接相关.

[comment]: # ({/6f7a4854-05585755})

[comment]: # ({57c24834-933fed24})
### 告警

::: noteclassic
告警由Zabbix server创建，无法通过API修改。

:::

告警object包含有关特定操作是否成功执行的信息。它具有以下属性。

| 属性 | [数据类型](/manual/api/reference_commentary#数据类型) | 描述 |
|--|--|------|
| alertid | ID | 告警ID。 |
| actionid | ID | 生成告警的动作ID。 |
| alerttype | integer | 告警类型。<br><br>可能的值：<br>0 - 消息；<br>1 - 远程命令。 |
| clock | timestamp | 告警生成时间。 |
| error | string | 发送消息或运行命令时出现问题的错误文本。 |
| esc\_step | integer | 生成告警时的动作升级步骤。 |
| eventid | ID | 触发动作的事件ID。 |
| mediatypeid | ID | 用于发送消息的媒介类型ID。 |
| message | text | 消息文本。<br><br>[属性行为](/manual/api/reference_commentary#属性行为):<br>- *支持* 如果`alerttype`设置为"message" |
| retries | integer | Zabbix尝试发送消息的次数。 |
| sendto | string | 收件人的地址、用户名或其他标识符。<br><br>[属性行为](/manual/api/reference_commentary#属性行为):<br>- *支持* 如果`alerttype`设置为"message" |
| status | integer | 指示操作是否成功执行的状态。<br><br>如果`alerttype`设置为"message"时的可能值：<br>0 - 消息未发送；<br>1 - 消息已发送；<br>2 - 多次重试后失败；<br>3 - 新告警尚未由告警管理器处理。<br><br>如果`alerttype`设置为"remote command"时的可能值：<br>0 - 命令未run；<br>1 - 命令run；<br>2 - 尝试在Zabbix agent上run命令，但不可用。 |
| subject | string | 消息主题。<br><br>[属性行为](/manual/api/reference_commentary#属性行为):<br>- *支持* 如果`alerttype`设置为"message" |
| userid | ID | 消息发送到的用户ID。 |
| p\_eventid | ID | 生成告警的问题事件ID。 |
| acknowledgeid | ID | 生成告警的确认ID。 |

[comment]: # ({/57c24834-933fed24})
