07.06.2023

Creating and configuring triggers in Zabbix

Creating triggers

In this guide, we'll walk through the steps to create and customize Zabbix triggers for notifications.

A trigger in Zabbix is a logical expression used to generate alerts and notifications when the data of the item it looks after is trespassing some threshold we specified. After that happens triggers changes its state. The states are:

Creating triggers

Click on "Configuration" in the top menu. → "Hosts" in the left menu. → host you want to create a trigger for → "Triggers" tab. → "Create trigger" in the top right corner. Fill in the required information, such as the trigger name, expression, and severity level.

Triggers tab

Trigger configuration window

The “Expression” line works as a logical expression that defines the acceptable threshold of monitored data when incoming data passes it — the trigger changes its condition. Click on the expression constructor. Choose what item it will refer to, the function which describes the condition, and the result of the function which triggers the condition.

For detailed examples you can look into official documentation https://www.zabbix.com/documentation/6.0/en/manual/config/triggers/expression

Expression window

Ok event generation — describes when the trigger will change to OK state:

Problem event generation mode allows choosing between generating events on every occasion of the problem or only on the first one.

The next line defines if the OK event closes all problems on this trigger or only one with matching tags.

“Manual closing” allows closing problems of this trigger by hand.

And “Enable” as usual makes this trigger active.

Click on "insert" to create the trigger.

To check a condition of a trigger you can go to configuration → hosts → triggers tab.

Conclusion

We learned an important aspect of monitoring your network infrastructure- to create and customize Zabbix triggers.