Ad Widget

Collapse

Trigger based on other hosts with an inventory tag also having the same problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artooro
    Junior Member
    • Nov 2022
    • 4

    #1

    Trigger based on other hosts with an inventory tag also having the same problem

    What I'm trying to accomplish right now with zabbix triggers is something that will only fire when all hosts with the same inventory tag have the same issue.

    For example, I know this is an invalid expression but should get the idea across:
    Code:
    nodata(/My Host Group/agent.ping,10m)=1 AND nodata(/{INVENTORY.TAG}/agent.ping,10m=1
    Essentially would check if all hosts with the same INVENTORY.TAG as the reporting host haven't had an agent ping for the last 10 minutes. And this would result in a higher severity trigger that we can route to a separate trigger action.

    I realize that I can simply create a trigger that specifies the name of each host in a chain and evaluates the sum of their values. But we have hundreds of hosts that operate in pairs, and we need to know if both of the hosts in the pair go down.
    So I'm really hoping there's a way to automate this on tags as it will be a lot of manual effort to do this for each pair.

    Using Zabbix v6.0.9 right now.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    INVENTORY.* macros cannot be used in such way... https://www.zabbix.com/documentation...ed_by_location

    Comment

    • artooro
      Junior Member
      • Nov 2022
      • 4

      #3
      OK thanks cyber
      So unless there's some other trick that I'm not aware of, it sounds like what I'll have to do is create a trigger for each host containing something like

      Code:
      (nodata(/hostname1/agent.ping,10m)) + (nodata(/hostname2/agent.ping,10m))=2

      Comment

      Working...