Ad Widget

Collapse

Compare values between hosts and aggregated host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #1

    Compare values between hosts and aggregated host

    I have some real hosts (URA_X​) with items that return the number of active calls. They are spread over 3 sites (group).
    Each host has one such item:
    Code:
    Asterisk Calls - asterisk.active.calls - Zabbix agent item (user parameter)
    I also created a virtual host (URA_Aggregated
    ​) with calculated items that return the aggregated sum and average of active calls for each site.
    Code:
    Average -- uras.calls.siteX[avg] - avg(last_foreach(/*/asterisk.active.calls?[group="SiteX"]))
    Sum -- uras.calls.siteX[sum] - sum(last_foreach(/*/asterisk.active.calls?[group="SiteX"]))
    This host also aggregates the sum and average of all sites.
    Code:
    Average -- last(//uras.calls.site1[avg]) + last(//uras.calls.site2[avg]) + last(//uras.calls.site3[avg])
    Sum -- last(//uras.calls.site1[sum]) + last(//uras.calls.site2[sum]) + last(//uras.calls.site3[sum])
    Now, I need to compare the number of active calls of a single host with the average number of
    calls of all hosts of a site.
    In my mind, every single host should have a trigger that compares the last value of active calls with the (average number of
    calls of all hosts of the same site* 1.5).

    At first I thought of a formula like this:
    Code:
    avg(/URA_X/asterisk.active.calls,#3)
    >=
    (last(/URA_Aggregated/uras.calls.siteX[avg],#1) * 1.5)
    This is not supported because the trigger "belongs to templates with different linkages".

    Any tips on how to do that?
    Last edited by markfree; 03-11-2023, 17:39.
Working...