This function allows you to create a trigger as defined by the trigger data array.
Parameter | Type | Optional | Description | Details |
---|---|---|---|---|
trigger data | array or object | Array of Trigger objects or a single object | triggerid shouldn't be specified |
Parameter | Description |
---|---|
result | Operation successful. Result will contain array of created Trigger IDs. triggerid are assigned to each Trigger object |
error | In case of any errors |
Create new trigger for host "ZABBIX-Server" and enable it
{
"jsonrpc": "2.0",
"method": "trigger.create",
"params": [{
"description": "TEST_MACRO",
"expression": "{ZABBIX-Server:vfs.fs.inode[/,{$MACRO}].max(\"{$MACRO2}\")}={$MACRO3}",
"status": 0
}],
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 2
}
Trigger created successfully:
Trigger already exists: