Zabbix Triggers and Actions¶
Triggers and Actions are core components in [[Zabbix]] that define the logic for problem evaluation and the subsequent response workflows. Triggers define the logic for evaluating problem states, while actions define the operations executed when a trigger fires.
Triggers¶
A trigger is a logical expression that defines a problem state and evaluates the data collected by items^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]. They rely on functions—such as max(), last(), or nodata()—to perform calculations on item values^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
Trigger configurations are stored in the database, and they may also depend on one another^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
Actions¶
An action specifies what operation should occur when a trigger event is detected^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]. These actions are logged in the system, allowing for historical tracking of alert events^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
To execute an action, Zabbix relies on the following configuration chain:
- Media Types: The database stores the specific scripts or parameters associated with a notification method^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
- User Media: User profiles link to these media types to define how a specific user should be contacted^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
Database Implementation¶
In the Zabbix backend database, triggers and actions are distinct entities, though they work together during event processing^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
- Triggers: All trigger definitions and logic are stored in the
triggerstable^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]. - Actions: Operations to be performed are defined in the
actionstable^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]. - Alerts: Historical records of generated messages from actions are kept in the
alertstable^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]. - Dependencies: Relationships between triggers are maintained in the
trigger_dependstable^[600-developer__operation-maintenance__zabbix__zabbix-intro.md].
Related Concepts¶
- [[Zabbix]]
- DevOps
Sources¶
^[600-developer__operation-maintenance__zabbix__zabbix-intro.md]