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

> 对象

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

Template screen item 聚合图形项模板

The template screen item object defines an element displayed on a template screen. It has the following properties. 聚合图形项模板对象定义了显示在聚合图形模板上的元素,它具有以下属性。

Property 属性 T pe 类型 Des ription 说明
screenitemid string 字符串 *( eadonly 只读)* ID of the template screen item. 聚合图形项模板的ID。
resourceid
(required 必须)
string 字符串 ID
of the object from the parent template displayed on the template screen item. 来自显示在聚合图形项模板上父模板的对象ID。Depending on the type of screen item, the resourceid property can reference different objects. 根据聚合图形项的类型,resourceid属性可引用不同的对象。Unused by clock and URL template screen items. 聚合图形项模板中的时钟和URL类型无法使用。
Note: the resourceid property always references an object used in the parent template object, even if the screen item itself is inherited on a host or template. 注意: 即使聚合图形项自身继承在某一主机或模板上,其resourceid属性始终引用父模板对象中使用的对象。
resourcetype
(required 必须)
integer 整数型 Ty
e of template screen item. 聚合图形项模板类型。
Possible values: 许可值:
0 - graph; 图形;
1 - simple graph; 简单图形;
3 - plain text; 纯文本;
7 - clock; 时钟;
11 - URL; URL;
19 - simple graph prototype; 简单图形原型;
20 - graph prototype. 图形原型。
screenid
(required 必须)
string 字符串 ID of the template screen that the item belongs to. 所属项聚合图形模板的ID。
colspan integer 整数型 Nu ber of columns the template screen item will span across. 聚合图形项模板所跨的列数。

Default: 1. 默认:1。
elements integer 整数型 Nu ber of lines to display on the template screen item. 聚合图形项模板所显示的行数。

Default: 25. 默认:25。
halign integer 整数型 Sp cifies how the template screen item must be aligned horizontally in the cell. 指定聚合图形项模板如何在单元格中水平对齐。

Possible values: 许可值:
0 - (default 默认) center; 居中;
1 - left; 左对齐;
2 - right. 右对齐。
height integer 整数型 He ght of the template screen item in pixels. 聚合图形项模板的高度(以像素为单位)。

Default: 200. 默认:200。
max_columns integer 整数型 Sp cifies the maximum amount of columns a graph prototype or simple graph prototype screen element can have. 指定图形原型或简单图形原型的聚合图形元素具有的最大列数。

Default: 3. 默认:3。
rowspan integer 整数型 Nu ber or rows the template screen item will span across. 聚合图形项模板所跨的行数。

Default: 1. 默认:1。
style integer 整数型 Te plate screen item display option. 聚合图形项模板显示选项。

Possible values for clock screen items: 聚合图形项时钟的许可值:
0 - (default 默认) local time; 当地时间;
1 - server time; 服务器时间;
2 - host time. 主机时间。

Possible values for plain text screen items: 聚合图形项纯文本的许可值:
0 - (default 默认) display values as plain text; 以纯文本显示内容;
1 - display values as HTML. 以HTML格式显示内容。
url string 字符串 UR of the webpage to be displayed in the template screen item. Used by URL template screen items. 在聚合图形项模板中显示网页的URL,由URL聚合图形项模板使用。
valign integer 整数型 Sp cifies how the template screen item must be aligned vertically in the cell. 指定聚合图形项模板如何在单元格中垂直对齐。

Possible values: 许可值:
0 - (default 默认) middle; 居中;
1 - top; 置顶;
2 - bottom. 底部。
width integer 整数型 Wi th of the template screen item in pixels. 聚合图形项模板宽度(以像素为单位)。

Default: 320. 默认:320。
x integer 整数型 X- oordinates of the template screen item on the screen, from left to right. 在聚合图形上聚合图形项模板的X轴坐标,从左到右计数。

Default: 0. 默认:0。
y integer 整数型 Y- oordinates of the template screen item on the screen, from top to bottom. 在聚合图形上聚合图形项模板的Y轴坐标,从上到下计数。

Default: 0. 默认:0。