avg(latest_foreach(...., 30s)) result is non sensical

XMLWordPrintable

    • Type: Change Request
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 6.0.0beta2, 6.0.0beta3
    • Component/s: Server (S)
    • None

      Two seperate bugs cause the output of avg(latest_foreach(...., 30s)) to be non sensical if any item being queried becomes unavailable (such as if discovery no longer returns it).

       

      1. avg appears to cast the null value from latest_foreach to 0 resulting in a low average (we have values of 100 in all items, but half of them are unavailable resulting in 50%)
      2. latest_foreach doesnt support a time parameter. Documentation as to the parameters of latest_foreach is vauge but seems to indicate that foreach functions should have a time parameter "foreach_function(item filter,time period)" - if you look at the code last_foreach does not.

       

      I'm willing to submit a patch for part 2, it looks simple enough to fix.

            Assignee:
            Andris Zeila
            Reporter:
            Mathew
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: