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

> Graph item object 图形项目对象

The following objects are directly related to the graphitem API. 以下对象是graphitemAPI有直接关系

Graph item 图形项目

Graph items can only be modified via the graph API.图形项目只能通过graph API修改。

The graph item object has the following properties.图形项目对象拥有以下参数(属性)。

Property参数 T pe类型 Des ription描述
图形项目ID gitemid str ng 字符串 *(read nly只读)* ID of the graph item.图形项目的ID。
颜色 color  s(required必要) ring 字符串型 Graph item's draw color as a hexadecimal color code.绘制图形项目的颜色,使用十六进制码表示
监控项ID itemid  st(required必要) ing 字符串型 ID of he item. 监控项的ID。
计算方式 calc_fnc int ger 整数型 Value f the item that will be displayed. 监控项的显示的值

Possible values:可用值:
1 - minimum value最小值;
2 - (default默认) average value平均值;
4 - maximum value最大值;
7 - all values所有值;
9 - last value最后的值, used only by pie and exploded graphs.仅用于饼图和分散饼图
绘图线型 drawtype int ger 整数型 Draw s yle of the graph item.绘制图形项目的线型

Possible values可用值:
0 - (default默认) line实线;
1 - filled region面积图(填满的区域);
2 - bold line粗实线;
3 - dot点;
4 - dashed line虚线;
5 - gradient line (梯度线).
图形ID graphid s ring 字符串 ID o the graph that the graph item belongs to.图形项目所属图形的ID
排序码 sortorder in eger整数型 Posit on of the item in the graph.图形中项目的排序

Default: starts with 0 and increases by one with each entry. 默认从零开始,每增加一个加1.
类型 type i teger整数型 Type of graph item.图形类型

Possible values可用值:
0 - (default默认) simple简单图形;
2 - graph sum汇总图形, used only by pie and exploded graphs.仅用于饼图和分散饼图
Y轴位置 yaxisside in eger整数型 Side f the graph where the graph item's Y scale will be drawn.图形项目的Y轴画在图像的位置。

Possible values可用值:
0 - (default默认) left side左侧;
1 - right side右侧.