integer/array dcheck.get(object parameters)
该方法允许根据给定参数检索发现检查项
该方法对所有类型用户可用。调用该方法的权限可在用户角色设置中撤销。更多信息请参阅User roles
(object)
定义所需输出的参数.
该方法支持以下参数.
参数 | 数据类型 | 描述 |
---|---|---|
dcheckids | ID/array | 仅返回具有给定ID的发现检查. |
druleids | ID/array | 仅返回属于给定发现规则的发现检查. |
dserviceids | ID/array | 仅返回检测到给定发现服务的发现检查. |
selectDRules | query | 返回与发现检查相关的发现规则. |
sortfield | string/array | 按给定属性排序结果. 可能值: dcheckid , druleid . |
countOutput | boolean | 这些参数在通用get方法参数中有描述. |
editable | boolean | |
excludeSearch | boolean | |
filter | object | |
limit | integer | |
output | query | |
preservekeys | boolean | |
search | object | |
searchByAny | boolean | |
searchWildcardsEnabled | boolean | |
sortorder | string/array | |
startSearch | boolean |
(integer/array)
返回以下两种结果之一:
countOutput
参数时)获取发现规则"6"使用的所有发现检查项
执行请求:
{
"jsonrpc": "2.0",
"method": "dcheck.get",
"params": {
"output": "extend",
"dcheckids": "6"
},
"id": 1
}
响应:
{
"jsonrpc": "2.0",
"result": [
{
"dcheckid": "6",
"druleid": "4",
"type": "3",
"key_": "",
"snmp_community": "",
"ports": "21",
"snmpv3_securityname": "",
"snmpv3_securitylevel": "0",
"snmpv3_authpassphrase": "",
"snmpv3_privpassphrase": "",
"uniq": "0",
"snmpv3_authprotocol": "0",
"snmpv3_privprotocol": "0",
"snmpv3_contextname": "",
"host_source": "1",
"name_source": "0",
"allow_redirect": "0"
}
],
"id": 1
}
CDCheck::get() 位于 ui/include/classes/api/services/CDCheck.php 文件中。