[ZBX-6484] Bar report does not show first period bar Created: 2013 Apr 12  Updated: 2017 May 30  Resolved: 2013 Apr 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.16, 2.0.5
Fix Version/s: 1.8.17rc1, 2.0.7rc1, 2.1.0

Type: Incident report Priority: Major
Reporter: Kodai Terashima Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: barreports, frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File bar-report1.png     PNG File bar-report2.png     JPEG File chart_bar.JPG    
Issue Links:
Duplicate

 Description   

Bar report does not show first period bar.

For example, there is not 2013.04.01 bar on attached screenshot bar-report1.png (2013.04.01 - 2013.04.10), however the data exists on bar-report2.png (2013.03.31 - 2013.04.10).

Same problem exists in both 1.8 and 2.0



 Comments   
Comment by Kodai Terashima [ 2013 Apr 12 ]

The SQL query that the bar report gets data from trends table is below.

mysql> SELECT itemid,round(10*(mod( CAST(clock AS UNSIGNED) +378000,864000))/(864000),0) as i, sum(num) as count,avg(value_avg) as avg,min(value_min) as min, max(value_max) as max,max(clock) as clock FROM trends  WHERE itemid=22857 AND clock>=1364742000 AND clock<=1365606000 GROUP BY itemid,round(10*(mod( CAST(clock AS UNSIGNED) +378000,864000))/(864000),0) ORDER BY clock ASC'
+--------+------+-------+------------+--------+--------+------------+
| itemid | i    | count | avg        | min    | max    | clock      |
+--------+------+-------+------------+--------+--------+------------+
|  22857 |    1 |   288 | 0.02429583 | 0.0104 | 1.0568 | 1364868000 | 
|  22857 |    2 |   288 | 0.02717083 | 0.0104 | 0.9040 | 1364954400 | 
|  22857 |    3 |   288 | 0.03162083 | 0.0084 | 0.8904 | 1365040800 | 
|  22857 |    4 |   288 | 0.03020000 | 0.0104 | 0.9417 | 1365127200 | 
|  22857 |    5 |   288 | 0.02592917 | 0.0104 | 1.0032 | 1365213600 | 
|  22857 |    6 |   288 | 0.03989583 | 0.0083 | 1.9121 | 1365300000 | 
|  22857 |    7 |   288 | 0.03157917 | 0.0083 | 0.8790 | 1365386400 | 
|  22857 |    8 |   288 | 0.03436250 | 0.0083 | 0.8985 | 1365472800 | 
|  22857 |    9 |   288 | 0.03193750 | 0.0104 | 0.8927 | 1365559200 | 
|  22857 |   10 |   144 | 0.03187500 | 0.0104 | 0.8506 | 1365602400 | 
|  22857 |    0 |   156 | 0.03200769 | 0.0083 | 0.9073 | 1365606000 | 
+--------+------+-------+------------+--------+--------+------------+
Comment by richlv [ 2013 Apr 13 ]

ZBX-1138 might be similar

oleg.egorov Not fixed

Comment by Oleg Egorov (Inactive) [ 2013 Apr 17 ]

FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-6484 r35081

Comment by Toms (Inactive) [ 2013 Apr 18 ]

(1) I changed clock value for item 22166 whose avg value is 30 in trends table. Now this item is not taken into account e.g. it is ignored.

oleg.egorov RESOLVED IN r35104, thanks for "floor" idea

tomtom CLOSED

Comment by Toms (Inactive) [ 2013 Apr 18 ]

TESTED

Comment by Oleg Egorov (Inactive) [ 2013 Apr 18 ]

FIXED IN 1.8 1.8.17rc1 r35109, 2.0.7rc1 r35165, 2.1.0(trunk) r35166

Generated at Thu Apr 25 00:31:47 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.