Ad Widget

Collapse

Creating a trigger dependency when there are lots of devices using the same trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John_W
    Member
    • Apr 2026
    • 59

    #1

    Creating a trigger dependency when there are lots of devices using the same trigger

    I was given a good suggestion to create trigger dependencies for my organization's UPSes so that an alert would only go out about the UPS not being reachable when the upstream switch was still reachable. I checked out two Zabbix videos on dependencies, so the idea sounds simple enough, but the examples were for a given Server on a single switch or an application with a related database. I have at least one UPS on every network switch rack. The UPSes use the same template and the switches almost all use the same template. How do I create trigger dependencies for unique UPSes that have to be dependent on only the switch they are connected to being up? I have 216 UPSes and over 360 switches. I assume a macro could be used for the UPSes like {hostname} but how would it determine the upstream switch in the dependency?
  • alex_pager
    Junior Member
    • Dec 2026
    • 2

    #2
    John_W no macro can work out the upstream switch since zabbix has no idea of your topology, so each UPS trigger needs a dependency on its own switch's ping trigger

    with 216 of them i'd script it against the API. put the mapping somewhere first, like a tag uplink=<switch name> on each UPS (or your naming if the IDF names line up), then loop the UPS hosts and call trigger.update on the UPS ping trigger with the switch trigger ID as the dependency

    iirc you can add dependencies on the host even when the trigger comes from a template, but do one by hand first to be sure. afaik trigger.update replaces the whole dependency list too

    Comment

    Working...