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

Host macro support missing for Foreach functions

    XMLWordPrintable

Details

    • Incident report
    • Status: Confirmed
    • Minor
    • Resolution: Unresolved
    • 5.4.8
    • None
    • Server (S)
    • None

    Description

      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.

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            avolodin Aleksey Volodin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: