Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20334

Host macro support missing for Foreach functions

XMLWordPrintable

    • Sprint 84 (Jan 2022), Sprint 85 (Feb 2022)
    • 2

      In Zabbix 5.0 you can use {HOST.NAME} macro in aggregate function:

      grpsum["test/{HOST.NAME}","proc.cpu.util[]",last,0]

       

      But in 5.4:

      sum(last_foreach(/*/proc.cpu.util[]?[group="test/{HOST.NAME}"]))

      you got error:

      Cannot evaluate function: no items matching query at "last_foreach(/*/proc.cpu.util[]?[group="test/{HOST.NAME}"]))".

      but this work with user macro:

      sum(last_foreach(/*/proc.cpu.util[]?[group="test/{$M}"]))

       

      My thought  is that last_foreach is heir of grpsum function - {HOST.NAME} should work.

            asestakovs Aleksejs Sestakovs
            avolodin Aleksey Volodin
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: