object discoveryruleprototype.create(object/array lldRules)
This method allows to create new LLD rule prototypes.
This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object/array)
LLD rule prototypes to create.
Additionally to the standard LLD rule prototype properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
filter | object | LLD rule prototype filter for the LLD rule. |
preprocessing | object/array | LLD rule prototype preprocessing options. |
lld_macro_paths | object/array | LLD rule prototype lld_macro_path options. |
overrides | object/array | LLD rule prototype overrides options. |
(object)
Returns an object containing the IDs of the created LLD rule prototypes under the itemids
property. The order of the returned IDs matches the order of the passed LLD rule prototypes.
Create an LLD rule prototype (Type: Nested) to discover tablespaces in database instance.
{
"jsonrpc": "2.0",
"method": "discoveryruleprototype.create",
"params": {
"name": "Discover tablespaces for {#DB}",
"key_": "db.tablespace.discovery[{#DB}]",
"hostid": "10084",
"ruleid": "47251",
"type": 23
},
"id": 1
}
Response:
CDiscoveryRulePrototype::create() in ui/include/classes/api/services/CDiscoveryRulePrototype.php.