Zabbix Documentation 4.0

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


Sidebar

zh:manual:api:reference:usermacro:object

> 用户宏对象

以下对象与“usermacro”API直接相关。

全局宏

全局宏对象具有以下属性。

属性 类型 说明
globalmacroid string (readonly) 全局宏的ID。
macro
(required)
string 宏字符串。
value
(required)
string 宏的价值。

> User macro object

The following objects are directly related to the usermacro API.

Global macro

The global macro object has the following properties.

Property Type Description
globalmacroid string (readonly) ID of the global macro.
macro
(required)
string Macro string.
value
(required)
string Value of the macro.

主机宏

主机宏对象定义主机或模板上可用的宏。 它具有以下属性。

属性 类型 说明
hostmacroid string (readonly) 主机宏的ID。
hostid
(required)
string 宏所属主机的ID。
macro
(required)
string 宏字符串。
value
(required)
string 宏的值。

Host macro

The host macro object defines a macro available on a host or template. It has the following properties.

Property Type Description
hostmacroid string (readonly) ID of the host macro.
hostid
(required)
string ID of the host that the macro belongs to.
macro
(required)
string Macro string.
value
(required)
string Value of the macro.