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

count_foreach() must not fail calculation if there is no data

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Confirmed
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 5.4.0, 5.4.1
    • Fix Version/s: None
    • Component/s: Server (S)
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Create host and add one item that is not receiving any data (e.g. trapper item1[1])
      2. Add calculated item calc1 with formula: count(//item1[1],1h)
      3. Observe that calc1 has last value 0
      4. Add calculated item calc1.aggregate with formula: sum(count_foreach(//item1[*],1h))

      Result:
      calc1.aggregate turns Unsupported with the message:

      Cannot evaluate function: no data for query at "count_foreach(//item1[*],1h))".
      

      Expected:
      Given that count(//item1[1],1h) properly handles the situation when there is no history for the item, I expect the same from count_foreach(). It must return a set of values 0 by the number of items found, not an empty set.

        Attachments

          Activity

            People

            Assignee:
            zabbix.dev Zabbix Development Team
            Reporter:
            Kalimulin Alex Kalimulin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: