object discoveryrule.create(object/array lldRules)
This method allows to create new LLD rules.
(object/array)
LLD rules to create.
The method accepts LLD rules with the standard LLD rule properties.
(object)
Returns an object containing the IDs of the created LLD rules under the itemids
property. The order of the returned IDs matches the order of the passed LLD rules.
Create a Zabbix agent LLD rule to discover mounted file systems. Discovered items will be updated every 30 seconds.
Request:
{
"jsonrpc": "2.0",
"method": "discoveryrule.create",
"params": {
"name": "Mounted filesystem discovery",
"key_": "vfs.fs.discovery",
"hostid": "10197",
"type": "0",
"interfaceid": "112",
"delay": 30
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CDiscoveryRule::create() in frontends/php/api/classes/CDiscoveryRule.php.