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:dcheck:get

Table of Contents

get()

Available since version: 1.8
This function allows you to retrieve discovery check details based on filtering options. All parameters are optional. If parameter is set in query this option counted as ON, except if parameter is equal to NULL.

Parameters

ParameterTypeDescriptionDetails
nodeidsarrayNode IDs
druleidsarrayDiscovery rule IDs
dhostidsarrayDiscovery host IDs
dcheckidsarrayDiscovery check IDs
editableintegeronly with read-write permission. Ignored for SuperAdmins
filterarrayOptional filter by discovery check fields
searcharrayReturn discovery checks by any given discovery check object field pattern
startSearchintegerSearch discovery checks field pattern only in start of the field
excludeSearchintegerExclude from result, discovery checks by given field pattern
searchWildcardsEnabledintegerSearch pattern in whole field using wildcards 1 - enable, 0 - disable
outputstringOutput options Values: shorten, refer, extend
selectDRulesstringSelect discovery rules Values: shorten, refer, extend
selectDHostsstringSelect discovery hosts Values: shorten, refer, extend
countOutputintegerCount discovery checks, return the number of discovery checks found
groupCountintegerReturn the number of results grouped by given IDs
preservekeysintegerReturn hash instead of array Keys of hash are object IDs
sortfieldstringSort by discovery check field Values: dcheckid
sortorderstringSort order Values: ASC, DESC
limitintegermax number of discovery check objects to return

Returns

ParameterDescription
resultOperation successful. Result will contain array of Discovery check objects.
errorIn case of any errors

Example

Get discovery checks details by discovery rule ID:

{
"jsonrpc":"2.0",
"method":"dcheck.get",
"params":{
	"druleids": ["100100000000003"],
	"output": "extend",
	"limit": 3
},
"auth":"6f38cddc44cfbb6c1bd186f9a220b5a0",
"id":2
}
Retrieved discovery check details:

{
"jsonrpc":"2.0",
"result":[{
	"drules":[{"druleid":"100100000000003"}],
	"dcheckid":"100100000000037",
	"druleid":"100100000000003",
	"type":"4",
	"key_":"",
	"snmp_community":"",
	"ports":"80",
	"snmpv3_securityname":"",
	"snmpv3_securitylevel":"0",
	"snmpv3_authpassphrase":"",
	"snmpv3_privpassphrase":""
}],
"id":2
}