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:trigger:exists

Table of Contents

exists()

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

Parameters

ParameterTypeOptionalDescriptionDetails
nodeidsarrayyes List of node IDs where to search for given item
descriptionstringNo Trigger description
expressionstringNo Trigger expression
hostidstringyes Host ID
hoststringyes Host name

Returns

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

Example

Check if trigger with description “APC: System UPS Load” and expression “{TEST_hp3000:vfs.file.cksum[c:\config.sys].last(0)}=0” exists

{
"jsonrpc":"2.0",
"method":"trigger.exists",
"params":{
	"host":"ZABBIX-Server",
	"description":"Apache is not running on {HOSTNAME}",
	"expression":"{ZABBIX-Server:proc_cnt[httpd].last(0)}<1"
},
"auth":"3a57200802b24cda67c4e4010b50c065",
"id":2
}

Trigger exists:

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