This is a translation of the original English documentation page. Help us make it better.

Sidebar

Zabbix Summit 2022
Register for Zabbix Summit 2022

3 Dépendance des déclencheurs

Overview

Sometimes the availability of one host depends on another. A server that is behind some router will become unreachable if the router goes down. With triggers configured for both, you might get notifications about two hosts down - while only the router was the guilty party.

This is where some dependency between hosts might be useful. With dependency set notifications of the dependants could be withheld and only the notification for the root problem sent.

While Zabbix does not support dependencies between hosts directly, they may be defined with another, more flexible method - trigger dependencies. A trigger may have one or more triggers it depends on.

So in our simple example we open the server trigger configuration form and set that it depends on the respective trigger of the router. With such dependency the server trigger will not change state as long as the trigger it depends on is in 'PROBLEM' state - and thus no dependant actions will be taken and no notifications sent.

If both the server and the router are down and dependency is there, Zabbix will not execute actions for the dependent trigger.

Actions on dependent triggers will not be executed if the trigger they depend on:

  • changes its state from 'PROBLEM' to 'UNKNOWN'
  • is closed manually, by correlation or with the help of time- based functions
  • is resolved by a value of an item not involved in dependent trigger
  • is disabled, has disabled item or disabled item host

Note that "secondary" (dependent) trigger in the above-mentioned cases will not be immediately updated.

Also:

  • Trigger dependency may be added from any host trigger to any other host trigger, as long as it wouldn't result in a circular dependency.
  • Trigger dependency may be added from a template to a template. If a trigger from template A depends on a trigger from template B, template A may only be linked to a host (or another template) together with template B, but template B may be linked to a host (or another template) alone.
  • Trigger dependency may be added from template trigger to a host trigger. In this case, linking such a template to a host will create a host trigger that depends on the same trigger template trigger was depending on. This allows to, for example, have a template where some triggers depend on router (host) triggers. All hosts linked to this template will depend on that specific router.
  • Trigger dependency from a host trigger to a template trigger may not be added.
  • Trigger dependency may be added from a trigger prototype to another trigger prototype (within the same low-level discovery rule) or a real trigger. A trigger prototype may not depend on a trigger prototype from a different LLD rule or on a trigger created from trigger prototype. Host trigger prototype cannot depend on a trigger from a template.

Configuration

Pour définir une dépendance, ouvrez l'onglet Dépendances dans un formulaire de configuration de déclencheur. Cliquez sur Ajouter dans le bloc 'Dépendances' et sélectionnez un ou plusieurs déclencheurs dont dépendra notre déclencheur.

Cliquez sur Mettre à jour. Maintenant, le déclencheur a une indication de sa dépendance dans la liste.

Exemple de plusieurs dépendances

Par exemple, un hôte (Host) est derrière un routeur (Router2) et Router2 est derrière un autre routeur (Router1).

Zabbix - Router1 - Router2 - Host

Si Router1 est en panne, alors évidemment Host et Router2 sont également inaccessibles, mais nous ne voulons pas recevoir trois notifications indiquant que Host, Router1 et Router2 sont tous en panne.

Donc, dans ce cas, nous définissons deux dépendances :

'Host is down' trigger depends on 'Router2 is down' trigger
       'Router2 is down' trigger depends on 'Router1 is down' trigger

Avant de modifier l'état du déclencheur 'Host is down', Zabbix vérifiera les dépendances de déclencheur correspondantes. S'il est trouvé et que l'un de ces déclencheurs est à l'état 'Problème', l'état du déclencheur ne sera pas modifié et les actions ne seront donc pas exécutées et les notifications ne seront pas envoyées.

Zabbix effectue cette vérification de manière récursive. Si Router1 ou Router2 est inaccessible, le déclencheur Host ne sera pas mis à jour.