The following objects are directly related to the drule API. 以下是和 drule API相关的对象。
The discovery rule object defines a network discovery rule. It has the following properties. 发现规则对象用于定义网络发现规则.它有如下属性:
| Property | Type | Description | 
|---|---|---|
| druleid | string | (readonly) ID of the discovery rule. | 
| iprange (required)  | 
       string | One 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)  | 
       string | Name of the discovery rule. | 
| delay | string | Execution interval of the discovery rule. Accepts seconds, time unit with suffix and user macro. Default: 1h.  | 
       
| nextcheck | timestamp | (readonly) Time when the discovery rule will be executed next. | 
| proxy_hostid | string | ID of the proxy used for discovery. | 
| status | integer | Whether the discovery rule is enabled. Possible values: 0 - (default) enabled; 1 - disabled.  | 
       
| 属性 类 | 描述 | |
|---|---|---|
| druleid | string | (只读) 发现规则的ID | 
| iprange (必选)  | 
       string | 
       一个或多个要检查的IP范围,用逗号进行分隔。 更多有关IP范围的支持格式的信息,请参考网络发现规则配置。  | 
       
| name (必选)  | 
       string | 发现规则名称 | 
| delay | string | 发现规则的执行间隔。支持秒、用户宏以及带后缀的时间单位. 默认: 1h.  | 
       
| nextcheck | timestamp | (只读) 发现规则下一次执行的时间。 | 
| proxy_hostid | string | 用于发现的proxy的ID. | 
| status | integer | 发现规则是否启用. 可选值: 0 - (默认) 启用; 1 - 禁用.  |