This is an old revision of the document!
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:
Note that “Secondary” (dependent) trigger in the above-mentioned cases will not be immediately updated.
It is important to note that events/actions for dependent triggers will not be suppressed if the trigger they depend on is disabled, has disabled item or disabled item host.
To define a dependency, open the trigger configuration form. Click on Add next to 'New dependency' and select one or more triggers that our trigger will depend on.
Click Save. Now the trigger has an indication of its dependency in the list.
For example, a Host is behind a Router2 and the Router2 is behind a Router1.
Zabbix - Router1 - Router2 - Host
If Router1 is down, then obviously Host and Router2 are also unreachable yet we don't want to receive three notifications about Host, Router1 and Router2 all being down.
So in this case we define two dependencies:
'Host is down' trigger depends on 'Router2 is down' trigger 'Router2 is down' trigger depends on 'Router1 is down' trigger
Before changing the status of the 'Host is down' trigger, Zabbix will check for corresponding trigger dependencies. If found, and one of those triggers is in 'Problem' state, then the trigger status will not be changed and thus actions will not be executed and notifications will not be sent.
Zabbix performs this check recursively. If Router1 or Router2 is unreachable, the Host trigger won't be updated.