Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

api:graph

Graph

Methods

Class containing methods for operations with Graphs.

MethodsDescription
get() Get graph details
exists() Check if graph exists
create() Create graphs
update() Update graph details
delete() Delete graphs

Object details

The table contains complete list of Graph attributes.

ParameterTypeDescriptionDetails
graphidintegerGraph ID
namestringGraph name.
widthintegerWidth.
heightintegerHeight.
yaxisminintegerY axis min value.
yaxismaxintegerY axis max value.
templateidintegerParent graph ID.
show_work_periodintegerShow work period.
show_triggersintegerShow items triggers if possible
graphtypeintegerChart or Pie.
show_legendintegerShow legend for pie graphs.
show_3dintegerShow pie graph in 3D view.
percent_leftfloatShow percentile line (left).
percent_rightfloatShow percentile line (right).
ymin_typeintegerY axis min limitation type. Calculated, user defined, by item value.
ymax_typeintegerY axis max limitation type. Calculated, user defined, by item value.
ymin_itemidintegerY axis min limitation by Item ID.
ymax_itemidintegerY axis max limitation by Item ID.

Field values

Y axis min/max type

ValueType
0 Calculated
1 Fixed
2 By item value

Common tasks

The table contains list of common graph-related tasks and possible implementation using Zabbix API

TaskHOWTO
Add a graph Use method graph.create
Add a bunch of new graphs Use method graph.create with array of Graph objects
Remove graph by Graph IDs Use method graph.delete array of Graph IDs
Retrieve graph details by Graph IDs Use method graph.get with parameter graphids
Retrieve graph details by Graph name Use method graph.get with parameter filter, specify “name”:“<your graph>“