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

> Media type object媒体类型对象

The following objects are directly related to the mediatype API.以下对象与“mediatype”API直接相关。

Media type 媒体类型

The media type object has the following properties.媒体类型对象具有以下属性。

属性 类 描述
mediatypeid string (readonly) ID of the media type. 媒体类型的ID。
description
(required)
string Name of the media type.媒体类型的名称
type
(required)
integer Transport used by the media type. 媒体类型使用的传输。

Possible values:可能的值:
0 - email; 邮件
1 - script;脚本
2 - SMS;
3 - Jabber;
100 - Ez Texting.
exec_path string For script media types exec_path contains the name of the executed script. 对于脚本媒体类型“exec_path”包含已执行脚本的名称。

For Ez Texting exec_path contains the message text limit. 对于Ez Texting,“exec_path”包含消息文本限制。
Possible text limit values:可能的文本限制值:
0 - USA (160 characters160个字符);
1 - Canada (136 characters136个字符).

Required for script and Ez Texting media types.需要脚本和Ez Texting媒体类型
gsm_modem string Serial device name of the GSM modem. GSM调制解调器的串行设备名称。

Required for SMS media types.需要SMS媒体类型。
passwd string Authentication password. 认证密码

Required for Jabber and Ez Texting media types.需要Jabber和Ez Texting媒体类型
smtp_email string Email address from which notifications will be sent. 发送通知的电子邮件地址。

Required for email media types. 需要电子邮件媒体类型。
smtp_helo string SMTP HELO.

Required for email media types. 需要电子邮件媒体类型。
smtp_server string SMTP server.

Required for email media types. 需要电子邮件媒体类型。
status integer Whether the media type is enabled.媒体类型是否启用

Possible values:可能的值:
0 - (default) enabled; (默认)启用
1 - disabled. 禁用
username string Username or Jabber identifier. 用户名或Jabber标识符。

Required for Jabber and Ez Texting media types. 需要Jabber和Ez Texting媒体类型。
exec_params string Script parameters. 脚本参数。

Each parameter ends with a new line feed. 每个参数以新换行结束。