User Tools

Site Tools


Sidebar

1.8:api:item

Item

Methods

Class containing methods for operations with Items.

MethodsDescription
get() Get item details
exists() Check if item exists
create() Create items
update() Update item details
delete() Delete items

Object details

The table contains complete list of Item attributes.

ParameterTypeDescriptionDetails
itemidintItem ID
typeintType
snmp_communitystringSNMP Community name
snmp_oidstringSNMP OID
snmp_portintSNMP port
hostidintHost ID
descriptionstringItem description
key_stringItem key
delayintCheck interval
historyintHow long to keep item history (days)
trendsintHow long to keep item trends (days)
lastvaluestringLast value
lastclockintLast check
prevvaluestringPrevious value
statusintItem status
value_typeintValue type
trapper_hostsstring
unitsstringValue units
multiplierintValue multiplier
deltaintStore values as delta
prevorgvaluestring
snmpv3_securitynamestringSNMPv3 security name
snmpv3_securitylevelintSNMPv3 security level
snmpv3_authpassphrasestringSNMPv3 authentication phrase
snmpv3_privpassphrasestringSNMPv3 private phrase
formulastring
errorstring Item check error
lastlogsizeintLast log size
logtimefmtstringLog time format
templateidintParent item ID
valuemapidintValue map ID
delay_flexstringFlexible delay
paramsstring
ipmi_sensorstring IPMI sensor
data_typeint
authtypeint
usernamestring
passwordstring
publickeystring
privatekeystring
mtimeintMicro time

Field values

Type

ValueType
0 Zabbix agent
1 SNMPv1
2 Trapper
3 Simple check
4 SNMPv2
5 Internal
6 SNMPv3
7 Active check
8 Aggregate
9 HTTP test (web monitoring scenario step)
10 External
11 Database monitor
12 IPMI
13 SSH
14 telnet
15 Calculated

Status

ValueType
0 active
1 disabled
3 not supported

Value type

ValueType
0 Numeric (float)
1 Character
2 Log
3 Numeric (unsigned)
4 Text

Data type

ValueType
0 Decimal
1 Octal
2 Hexadecimal

Delta

ValueStatus
0 As is
1 Delta (speed per second)
2 Delta (simple change)

Common tasks

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

TaskHOWTO
Add an item Use method item.create
Add a bunch of new items Use method item.create with array of Item objects
Enable an item Use method item.update, set “status”:0
Disable an item Use method item.update, set “status”:1
Retrieve item details by Item IDs Use method item.get with parameter itemids
Retrieve items details by Host name Use method item.get with parameter filter, specify “host”: [”<your host1>”]