2022 Zabbix中国峰会
2022 Zabbix中国峰会

> Media object媒体对象

以下对象与usermedia API直接相关.

Media媒体

媒体可以通过user API被创建,更新和删除.

The media object defines how a media type should be used for a user. It has the following properties.媒体对象定义了如何为用户使用媒体类型。 它具有以下属性。

属性 类 描述
mediaid string (readonly) ID of the media. 媒体ID
active
(required)
integer Whether the media is enabled.媒体是否启用

Possible values:可能的值:
0 - enabled启用;
1 - disabled禁用.
mediatypeid
(required)
string ID of the media type used by the media.媒体使用的媒体类型的ID。
period
(required)
string Time when the notifications can be sent as a time period or user macros separated by a semicolon. 通知可以作为时间段发送的时间或用分号分隔的用户宏。
sendto
(required)
string Address, user name or other identifier of the recipient. 地址,用户名或收件人的其他标识符。
severity
(required)
integer Trigger severities to send notifications about.触发严重性发送通知。

Severities are stored in binary form with each bit representing the corresponding severity. For example, 12 equals 1100 in binary and means, that notifications will be sent from triggers with severities warning and average. 严重性以二进制形式存储,每个位表示相应的严重性。 例如,12以二进制等于1100,意味着通知将从具有严重性警告和平均值的触发器发送。

Refer to the trigger object page for a list of supported trigger severities.请参阅触发器对象页面以获取支持的触发严重程度列表。
userid
(required)
string ID of the user that uses the media. 使用媒体的用户的ID。