Zabbix Documentation 1.8

Sidebar

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

Parameter Type Description Details
nodeids array Node IDs
druleids array Discovery rule IDs
dhostids array Discovery host IDs
dcheckids array Discovery check IDs
editable integer only with read-write permission. Ignored for SuperAdmins
filter array Optional filter by discovery check fields
search array Return discovery checks by any given discovery check object field pattern
startSearch integer Search discovery checks field pattern only in start of the field
excludeSearch integer Exclude from result, discovery checks by given field pattern
searchWildcardsEnabled integer Search pattern in whole field using wildcards 1 - enable, 0 - disable
output string Output options Values: shorten, refer, extend
selectDRules string Select discovery rules Values: shorten, refer, extend
selectDHosts string Select discovery hosts Values: shorten, refer, extend
countOutput integer Count discovery checks, return the number of discovery checks found
groupCount integer Return the number of results grouped by given IDs
preservekeys integer Return hash instead of array Keys of hash are object IDs
sortfield string Sort by discovery check field Values: dcheckid
sortorder string Sort order Values: ASC, DESC
limit integer max number of discovery check objects to return

Returns

Parameter Description
result Operation successful. Result will contain array of Discovery check objects.
error In 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
       }