Class containing methods for operations with Triggers.
Methods | Description |
---|---|
get() | Get trigger details |
exists() | Check if trigger exists |
create() | Create triggers |
update() | Update trigger details |
delete() | Delete triggers |
addDependencies() | Delete triggers |
deleteDependencies() | Delete triggers |
The table contains complete list of Trigger attributes.
Parameter | Type | Description | Details |
---|---|---|---|
triggerid | integer | Trigger ID | |
description | string | Trigger name | |
expression | string | Expression | |
url | string | Referenced URL | |
status | integer | Status | |
value | integer | State | |
priority | integer | Severity | |
lastchange | integer | Time of last state change | |
dep_level | integer | Dependency level | |
comments | integer | Description | |
error | integer | Error | |
templateid | integer | Parent trigger ID | |
type | integer | Event generation |
Value | Type |
---|---|
0 | Trigger is active |
1 | Trigger is disabled |
Value | Type |
---|---|
0 | OK |
1 | PROBLEM |
2 | UNKNOWN |
Value | Type |
---|---|
0 | Not classified |
1 | Information |
2 | Warning |
3 | Average |
4 | High |
5 | Disaster |
Value | Type |
---|---|
0 | Normal event generation |
1 | Generate multiple PROBLEM events |
The table contains list of common trigger-related tasks and possible implementation using Zabbix API
Task | HOWTO |
---|---|
Add an trigger | Use method trigger.create |
Add a bunch of new triggers | Use method trigger.create with array of Trigger objects |
Enable an trigger | Use method trigger.update, set "status":0 |
Disable an trigger | Use method trigger.update, set "status":1 |
Retrieve trigger details by Trigger IDs | Use method trigger.get with parameter triggerids |
Retrieve triggers details by Host name | Use method trigger.get with parameter filter, specify "host": ["<your host1>"] |