Zabbix Documentation 1.8

2.23.03.4In development:4.0Unsupported versions:1.82.02.43.2

User Tools

Site Tools


Sidebar


Ask questions to Zabbix Dev Team in person at the Zabbix Summit 2018!
api:item:exists

Table of Contents

exists()

Available since version: 1.8.3
This function allows you to check whether item with given item data exists.

Parameters

ParameterTypeOptionalDescriptionDetails
nodeidsarrayyes List of node IDs where to search for given item
key_stringNo Item key
hostidstringyes Host ID
hoststringyes Host name

Returns

ParameterDescription
resultOperation successful. Result will contain boolean variable.
errorIn case of any errors

Example

Check if item with key “vfs.file.cksum[c:\config.sys]” exists for host “Windows-Server”

{
"jsonrpc":"2.0",
"method":"item.exists",
"params":{
    "host": "Windows-Server",
    "key_": "vfs.file.cksum[c:\config.sys]"
},
"auth":"3a57200802b24cda67c4e4010b50c065",
"id":2
}

Item exists:

{
"jsonrpc":"2.0",
"result": true,
"id":2
}