Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

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
}