这是原厂英文文档的翻译页面. 欢迎帮助我们 完善文档.
2022 Zabbix中国峰会
2022 Zabbix中国峰会

> 1.Event对象

以下对象与 event[事件] API直接相关。

事件

事件是由Zabbix server创建,并且不能通过API进行修改。

事件对象具有以下属性:

属性 类 描述
eventid string 事件的ID。
source integer 事件的类型。

可能的值:
0 - 由触发器创建的事件;
1 - 由发现规则创建的事件;
2 - active agent自动注册的事件;
3 - 内部事件.
object integer 与事件相关的对象类型。

触发器事件可能的值:
0 - 触发器.

发现事件的可能值:
1 - 发现主机;
2 - 发现服务.

自动注册事件的可能值:
3 - 自动注册的主机。

内部事件的可能值:
0 - 触发器;
4 - 监控项;
5 - 低级别发现(LLD)规则.
objectid string 相关对象的ID。
acknowledged integer 事件是否被确认。
clock timestamp 事件的创建时间。
ns integer 事件的创建时间(纳秒)。
name string 已恢复事件的名称。
value integer 相关对象的状态。

触发器事件可能的值:
0 - 正常;
1 - 异常.

发现事件可能的值:
0 - 主机或服务正常;
1 - 主机或服务故障;
2 - 主机或服务已发现;
3 - 主机或服务丢失。

内部事件的可能值:
0 - "正常"状态;
1 - "未知"或"不支持"状态。

此参数不用于活动代理自动注册事件。
severity integer 当前事件的严重等级。

可能的值:
0 - 未分类;
1 - 信息;
2 - 警告;
3 - 一般严重;
4 - 严重;
5 - 灾难.
r_eventid string 恢复事件的ID。
c_eventid string 生成OK事件的问题事件ID。
correlationid string 关联ID。
userid string 手动关闭事件的用户的ID。

Event tag

The event tag object has the following properties.

Property Type Description
tag string Event tag name.
value string Event tag value.

Media type URLs

Object with media type url have the following properties.

Property Type Description
name string Media type defined URL name.
url string Media type defined URL value.

Results will contain entries only for active media types with enabled event menu entry. Macro used in properties will be expanded, but if one of properties contain non expanded macro both properties will be excluded from results. Supported macros described on page.