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

> 对象

以下对象是直接关联到mediatype接口

媒介类型

媒介类型参数拥有以下参数

Property Type Description
mediatypeid string (readonly) 媒介类型ID
description
(required)
string 媒介类型名称
type
(required)
integer 媒介类型的传输方式

可能的值:
0-电子邮件
1-脚本
2-SMS
3-Jabber
100-Ez Texting。
exec_path string

对于脚本媒体类型,“exec_path”包含已执行脚本的名称。

对于Ez Texting exec_path包含了消息文本的限制
可能的文本限定值 :0- USA (160 characters) 1 - Canada (136 characters).

用于脚本和Ez短信媒体类型。|

gsm_modem string GSM调制解调器的串行设备名称。

用于SMS媒介类型
passwd string 认证的密码
\\用于Jabber和Ez Texting媒介类型
smtp_email string 发送通知的电子邮件地址。

用于电子邮件媒介类型
smtp_helo string

用于电子邮件媒介类型
smtp_server string
\\用于电子邮件媒介类型
status integer 媒介类型是否是启用的
\\可能的值:
0-启用(默认) 1-禁用
username string 用户名或Jabber标识符

用于Jabber and Ez Texting媒介类型
exec_params string 脚本参数。

每个参数以新的行提要结束
maxsessions integer 可以并行处理的警报的最大数量。

SMS可能的值:1(默认的)\\其他媒介类型可能的值:0-100
maxattempts integer 发送警报的最大尝试次数。
\\可能的值:

1-10,默认是3
attempt_interval string 重试尝试之间的间隔。接收带后缀的秒和时间单位。

可能的值:0~60s 默认是:10s

Webhook parameters

Parameters passed to webhook script when it is called, have the following properties.

Property Type Description
name
(required)
string Parameter name.
value string Parameter value, support macros. Supported macros described on page.

Message template

The message template object defines a template that will be used as a default message for action operations to send a notification. It has the following properties.

Property Type Description
eventsource
(required)
integer Event source.

Possible values:
0 - triggers;
1 - discovery;
2 - autoregistration;
3 - internal.
recovery
(required)
integer Operation mode.

Possible values:
0 - operations;
1 - recovery operations;
2 - update operations.
subject string Message subject.
message string Message text.