> 对象

The following objects are directly related to the script API. 以下对象直接关联到script API.

脚本

The script object has the following properties. 这个脚本对象拥有以下属性

PropertyTypeDescription
scriptidstring(readonly) ID of the script. 脚本的ID
command
(required)
stringCommand to run. 运行命令
name
(required)
stringName of the script. 脚本名称
confirmationstringConfirmation pop up text. The pop up will appear when trying to run the script from the Zabbix frontend. 确认弹出文本信息,如果尝试在zabbix界面运行脚本,将会弹出文本信息。
descriptionstringDescription of the script. 脚本描述
execute_onintegerWhere to run the script.

Possible values:
0 - run on Zabbix agent;
1 - run on Zabbix server.
2 - (default) run on Zabbix server (proxy). 哪儿可以去运行这个脚本

可能的值:
0 - 运行在zabbix agent 1 - 运行在zabbix server 2 - (默认) 运行在zabbix server或zabbix proxy
groupidstringID of the host group that the script can be run on. If set to 0, the script will be available on all host groups.

Default: 0. 可以运行脚本主机组的ID,如果设置为0,这个脚本适用于所有的主机组
host_accessintegerHost permissions needed to run the script.

Possible values:
2 - (default) read;
3 - write. 运行脚本主机的权限

可能的值 :
2 - (默认) 读 3 - 写
typeintegerScript type.

Possible values:
0 - (default) script;
1 - IPMI. 脚本类型

可能的值:
0 - (默认) 脚本 1 - IPMI
usrgrpidstringID of the user group that will be allowed to run the script. If set to 0, the script will be available for all user groups.

Default: 0. 允许运行脚本的用户组的ID,如果设置为0,这个脚本适用于所有的的用户组