Ad Widget

Collapse

Imprecision calculation value_avg in trends_uint? (Zabbix-2.0.5 + Postgresql-9.0.1)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roman-sh
    Junior Member
    • May 2013
    • 7

    #1

    Imprecision calculation value_avg in trends_uint? (Zabbix-2.0.5 + Postgresql-9.0.1)

    Hello,

    Why is a large range of inaccuracies in trends_uint?
    Sorry for my bad English.

    Experience 27 Jun 11:00
    1) Time from 22 Jun 2013 00:00 to 23 Jun 2013 00:00

    Code:
    select AVG(value) AS value_avg from history_uint where itemid='23328' and clock>='1371844800' and clock<='1371931200';
           value_avg       
    -----------------------
     1438.8833333333333333
    (1 row)
    
    select AVG(value_avg) AS avg_value_avg from trends_uint where itemid='23328' and clock>='1371844800' and clock<='1371931200';
         avg_value_avg     
    -----------------------
     1426.8400000000000000
    (1 row)
    Inaccuracy: -<1% trends 24 hours

    Code:
    select AVG(value) AS value_avg, COUNT(value) AS count from history_uint where itemid='23329' and clock>='1371844800' and clock<='1371931200';
          value_avg      | count 
    ---------------------+-------
     63.1777777777777778 |  1440
    (1 row)
    
    select AVG(value_avg) AS avg_value_avg, COUNT(value_avg) AS count from trends_uint where itemid='23329' and clock>='1371844800' and clock<='1371931200';
        avg_value_avg    | count 
    ---------------------+-------
     53.4800000000000000 |    25
    (1 row)
    Inaccuracy: -15,9% trends 24 hours !?

    2) Time from 21 Jun 2013 23:00 to 22 Jun 2013 00:00

    Code:
    select AVG(value) AS value_avg, COUNT(value) AS count from history_uint where itemid='23328' and clock>='1371841200' and clock<='1371844800';
           value_avg       | count 
    -----------------------+-------
     1421.0666666666666667 |    60
    (1 row)
    
    select AVG(value_avg) AS avg_value_avg from trends_uint where itemid='23328' and clock>='1371841200' and clock<='1371844800';
         avg_value_avg     
    -----------------------
     1451.0000000000000000
    (1 row)
    Inaccuracy: +2,1% trends 1 hour

    Code:
    select AVG(value) AS value_avg, COUNT(value) AS count from history_uint where itemid='23329' and clock>='1371841200' and clock<='1371844800';
          value_avg      | count 
    ---------------------+-------
     63.2000000000000000 |    60
    (1 row)
    
    
    select AVG(value_avg) AS avg_value_avg from trends_uint where itemid='23329' and clock>='1371841200' and clock<='1371844800';
        avg_value_avg    
    ---------------------
     57.0000000000000000
    (1 row)
    
    select num, value_avg, clock from trends_uint where itemid='23329' and clock>='1371841200' and clock<='1371844800';
     num | value_avg |   clock    
    -----+-----------+------------
      60 |        56 | 1371841200
      60 |        58 | 1371844800
    (2 rows)
    Inaccuracy: -9,5% trends 1 hour

    Can anyone verify this?
    Last edited by roman-sh; 27-06-2013, 14:02.
  • roman-sh
    Junior Member
    • May 2013
    • 7

    #2
    Imprecision calculation value_avg in trends_uint? (Zabbix-2.0.5 + Postgresql-9.0.1)

    Bug report "trend calculation utterly broken for unsigned values":



    Thread can be closed.

    ###

    Comment

    Working...