> Discovery rule object

> 发现规则对象

The following objects are directly related to the drule API. 以下是和 drule API相关的对象。

Discovery rule

发现规则

The discovery rule object defines a network discovery rule. It has the following properties. 发现规则对象用于定义网络发现规则.它有如下属性:

PropertyTypeDescription
druleidstring(readonly) ID of the discovery rule.
iprange
(required)
stringOne or several IP ranges to check separated by commas.

Refer to the network discovery configuration section for more information on supported formats of IP ranges.
name
(required)
stringName of the discovery rule.
delaystringExecution interval of the discovery rule. Accepts seconds, time unit with suffix and user macro.

Default: 1h.
nextchecktimestamp(readonly) Time when the discovery rule will be executed next.
proxy_hostidstringID of the proxy used for discovery.
statusintegerWhether the discovery rule is enabled.

Possible values:
0 - (default) enabled;
1 - disabled.
属性 类描述
druleidstring(只读) 发现规则的ID
iprange
(必选)
string
一个或多个要检查的IP范围,用逗号进行分隔。
更多有关IP范围的支持格式的信息,请参考网络发现规则配置
name
(必选)
string发现规则名称
delaystring发现规则的执行间隔。支持秒、用户宏以及带后缀的时间单位.

默认: 1h.
nextchecktimestamp(只读) 发现规则下一次执行的时间。
proxy_hostidstring用于发现的proxy的ID.
statusinteger发现规则是否启用.

可选值:
0 - (默认) 启用;
1 - 禁用.