This is a translation of the original English documentation page. Help us make it better.

dcheck.get

説明

integer/array dcheck.get(object parameters)

このメソッドは、指定したパラメーターに応じたディスカバリチェックを取得できます。

このメソッドは、すべてのタイプのユーザーが利用できます。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細はユーザーの役割を参照してください。

パラメータ

(object) 希望する出力を定義するパラメータ

このメソッドは、以下のパラメータをサポートしています。

パラメータ Type 説明
dcheckids string/array Return only discovery checks with the given IDs.
druleids string/array Return only discovery checks that belong to the given discovery rules.
dserviceids string/array Return only discovery checks that have detected the given discovered services.
sortfield string/array Sort the result by the given properties.

Possible values are: dcheckid and druleid.
countOutput boolean These parameters being common for all get methods are described in detail in the reference commentary.
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"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "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",
                   "host_source": "1",
                   "name_source": "0"            
               }
           ],
           "id": 1
       }

ソース

CDCheck::get() in ui/include/classes/api/services/CDCheck.php.