3 Triggers

Problem detection in Zabbix is based on triggers.

A trigger describes the problem condition, allowing Zabbix to react if the problem happens.

The full workflow of problem detection is:

  1. Make sure you have an item collecting data.

  2. Define the trigger for this item. Without a trigger, Zabbix just collects data, but never reacts on it.

  3. Observe detected problems:

  4. Receive notifications, execute remote commands (if defined).

Note that official Zabbix templates contain pre-defined triggers. See guide for applying template to monitor Linux.

What is a "trigger"?

A trigger describes the problem condition, by means of the trigger expression.

The problem condition, when it occurs in real life, is when the trigger "fires" (a problem is created in Zabbix).

The problem condition can be based on the latest value, the average value, a discovered string, and many other functions. Triggers cannot be created for items returning binary values.

A simple trigger expression calculates the function (for example, max() for the maximum value) for the data specified in parentheses (typically data item and time window), and then compares this calculation to a threshold.

For example:

max(/host/vfs.fs.size[/,free],5m)<10G

This trigger fires if free disk space, measured over 5 minutes, has constantly been under 10 GB.

A trigger may have the following states:

Trigger state Description In Zabbix
OK Trigger expression has evaluated to "0" (or FALSE) No problem created
Problem is resolved (if existed)
Problem Trigger expression has evaluated to "1" (or TRUE) Problem is created

Sometimes the trigger expression evaluation is not possible for some reason. See Unknown expression state.

Other resources:

Temps de càlcul

Un trigger es torna a calcular cada vegada que el servidor Zabbix rep un valor nou que forma part de l'expressió. Quan es rep un valor nou, es torna a calcular cada funció inclosa a l'expressió (no només la que ha rebut el valor nou).

A més, un trigger es torna a calcular cada vegada que es rep un valor nou i cada 30 segons si s'empren funcions de data i hora i/o nodata() a l'expressió.

Les funcions de data i hora i/o nodata() es tornen a calcular cada 30 segons pel procés de sincronització de l'historial de Zabbix.

Els triggers que fan referència a funcions de tendència només s'avaluen una vegada per període més curt de l'expressió. Veieu també funcions de tendència.