Bug 1146266 - Metric graph is empty if high, low, and avg values are all the same for every time bucket within the selected time range
Summary: Metric graph is empty if high, low, and avg values are all the same for every...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.2.3,JON 3.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER01
: JON 3.3.1
Assignee: Jirka Kremser
QA Contact: Armine Hovsepyan
URL:
Whiteboard:
Keywords: Regression, Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-24 21:38 UTC by Larry O'Leary
Modified: 2018-12-09 18:39 UTC (History)
7 users (show)

(edit)
The JBoss ON metric graph did not display as expected if there were missing values, or if all values were the same within a selected time range that included 60 or more collected values. The minimum and maximum values allowed have been modified. Metric graphs now display the expected data.
Clone Of:
(edit)
Last Closed: 2015-02-27 19:58:20 UTC


Attachments (Terms of Use)
Screenshot showing empty graph in 3.2.3 (51.22 KB, image/png)
2014-09-24 21:47 UTC, Larry O'Leary
no flags Details
Screenshot showing empty graph in 3.3.0.ER03 (41.25 KB, image/png)
2014-09-24 21:48 UTC, Larry O'Leary
no flags Details
metrics-sameVlue (97.77 KB, image/png)
2014-10-23 14:59 UTC, Armine Hovsepyan
no flags Details
metric_graph_with_same_minMaxAvg1 (103.71 KB, image/png)
2014-10-23 15:00 UTC, Armine Hovsepyan
no flags Details
metric_graph_with_same_minMaxAvg2 (104.23 KB, image/png)
2014-10-23 15:00 UTC, Armine Hovsepyan
no flags Details
master@localhost (194.87 KB, image/png)
2014-12-19 11:56 UTC, Jirka Kremser
no flags Details
script for filling the C* with data (86 bytes, application/x-shellscript)
2015-01-15 16:40 UTC, Jirka Kremser
no flags Details
scala script for creating the queries (383 bytes, application/x-shellscript)
2015-01-15 16:41 UTC, Jirka Kremser
no flags Details
graph4 (78.13 KB, image/png)
2015-01-29 12:58 UTC, Armine Hovsepyan
no flags Details
graph5 (145.66 KB, image/png)
2015-01-29 12:58 UTC, Armine Hovsepyan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1210413 None None None Never

Description Larry O'Leary 2014-09-24 21:38:30 UTC
Description of problem:
If the time range contains 60 metric values that have the exact same high, low, and avg values, the graph's y axis will be missing its values and no the bar is rendered as if it is at the minimum value.

For example, viewing a metric that that has a value of 92% for the past several days will result in a high, low, and average of 92%. If you view this metric's graph for a 2 day period, the graph is rendered without data and all 60 time slices report the same values:

    { "x":1411411320000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411414200000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411417080000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411419960000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411422840000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411425720000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411428600000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411431480000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411434360000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411437240000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411440120000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411443000000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411445880000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411448760000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411451640000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411454520000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411457400000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411460280000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411463160000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411466040000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411468920000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411471800000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411474680000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411477560000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411480440000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411483320000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411486200000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411489080000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411491960000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411494840000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411497720000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411500600000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411503480000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411506360000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411509240000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411512120000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411515000000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411517880000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411520760000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411523640000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411526520000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411529400000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411532280000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411535160000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411538040000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411540920000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411543800000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411546680000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411549560000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411552440000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411555320000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411558200000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411561080000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411563960000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411566840000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411569720000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411572600000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411575480000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411578360000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"},
	{ "x":1411581240000, "barDuration": "48.0 m",  "high":92, "highFormatted":"92 %", "low":92, "lowFormatted":"92 %", "avg":92, "avgFormatted":"92 %"}


Version-Release number of selected component (if applicable):
3.2.3
3.3.0.ER03

How reproducible:
Always

Steps to Reproduce:
1.  Install and start JBoss ON system.
2.  From the platform resource's monitoring schedules page, set the _Total Swap Space_ measurement to be collected every 30 seconds.
3.  Wait for at least 30 minutes.
4.  From the platform resource's metrics monitoring page, expand the _Total Swap Space_ graph.
5.  Set the graph time range to represent the last 30 minutes.

Actual results:
Graph appears empty.

Expected results:
Graph should be rendered with values displayed on the y axis and a bar at the same level for every time slice of the x axis.

Additional info:
If any of the time slices contain nodata = true, the graph is rendered just fine. Additionally, if the value for high, low, or average is different in any one of the 60 time slices, the graph is also rendered correctly.

I have tested this on 3.2.3 and ER03 of 3.3 with the exact same result.

Comment 1 Larry O'Leary 2014-09-24 21:47:00 UTC
Created attachment 940933 [details]
Screenshot showing empty graph in 3.2.3

In the screenshot you can see that _Total Swap Space_ is and has been 7.6953 GB for the past thirty minutes. Because this metric has been collected 60 times during the 30 minute interval, all 60 time slices in the graph have the same low, high, and avg values. This results in the graph being empty. This is not the expected behavior.

Comment 2 Larry O'Leary 2014-09-24 21:48:09 UTC
Created attachment 940934 [details]
Screenshot showing empty graph in 3.3.0.ER03

Same as previous attachment but from a 3.3.0.ER03 instance.

Comment 4 Jirka Kremser 2014-10-10 21:35:48 UTC
branch:  master
link:    https://github.com/rhq-project/rhq/commit/265d3ea40
time:    2014-10-10 23:32:06 +0200
commit:  265d3ea40d4644df258689de6bbee30ac3c6a3bb
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 1146266] - Metric graph is empty if high, low, and avg values are
         all the same for every time bucket within the selected time
         range - d3.scale.linear().domain() funcion excepts an array
         with >2 distinct elements. The global min and max were used
         here, but if all the values were the same it didn't work so
         I've changed it to [0.9 * min, 1.1 * max] if min == max.


Perhaps this could be also back-ported to 3.2.x branch, Larry?

Comment 5 Libor Zoubek 2014-10-14 13:20:32 UTC
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/b9d395370
time:    2014-10-14 15:20:07 +0200
commit:  b9d395370d478cde7354682240349d6bbb5d5cfb
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 1146266] - Metric graph is empty if high, low, and avg values are
         all the same for every time bucket within the selected time
         range - d3.scale.linear().domain() funcion excepts an array
         with >2 distinct elements. The global min and max were used
         here, but if all the values were the same it didn't work so
         I've changed it to [0.9 * min, 1.1 * max] if min == max.
         (cherry picked from commit
         265d3ea40d4644df258689de6bbee30ac3c6a3bb) Signed-off-by: Libor
         Zoubek <lzoubek@redhat.com>

Comment 6 Larry O'Leary 2014-10-15 19:25:14 UTC
(In reply to Jirka Kremser from comment #4)
> Perhaps this could be also back-ported to 3.2.x branch, Larry?

At this time there is no plan to back-port to 3.2.x as we do not have any 3.2 updates planned. Additionally, as the data is valid this is more of a cosmetic issue.

Comment 7 Simeon Pinder 2014-10-21 20:24:16 UTC
Moving to ON_QA as available to test with the latest brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=394734

Comment 8 Armine Hovsepyan 2014-10-23 14:59:32 UTC
Created attachment 949964 [details]
metrics-sameVlue

Comment 9 Armine Hovsepyan 2014-10-23 15:00:08 UTC
Created attachment 949966 [details]
metric_graph_with_same_minMaxAvg1

Comment 10 Armine Hovsepyan 2014-10-23 15:00:32 UTC
Created attachment 949967 [details]
metric_graph_with_same_minMaxAvg2

Comment 11 Armine Hovsepyan 2014-10-23 15:01:05 UTC
verified in JON3.3 ER05

Comment 12 dsteigne 2014-12-17 20:31:21 UTC
Re-opening issue, it still exists in 3.3.0GA

Comment 14 Jirka Kremser 2014-12-19 11:56:00 UTC
Created attachment 971109 [details]
master@localhost

It's ok in master running on my localhost (as shown on the screenshot), however, I was able to reproduce in JON. The change was cherry-picked.

I doubt it is a caching issue, because I was able to replicate on a new node (new hostname and everything). Investigating..

Comment 15 Larry O'Leary 2015-01-13 22:45:40 UTC
@Jirka, are you stating that this fix has already been committed to the 3.3 update stream? If so could you please provide commit information and set this BZs status accordingly?

Comment 16 Jirka Kremser 2015-01-14 16:10:13 UTC
The problem is still there. By saying "the change was cherry-picked" I meant that the original change 265d3ea40d was cherry-picked, but it looks it didn't fix the issue.

I need to figure out what is wrong here.

Comment 17 Jirka Kremser 2015-01-14 23:32:43 UTC
ce8ef7bc4d1b01617ef15a53a900854db7000c7a in master

Comment 18 Libor Zoubek 2015-01-15 07:25:35 UTC
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/7323aae46
time:    2015-01-15 08:25:07 +0100
commit:  7323aae46c01a277f4a6b4ca1ec025c2b1b2c0c0
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 1146266] - Metric graph is empty if high, low, and avg values are
         all the same for every time bucket within the selected time
         range
         (cherry picked from commit
         ce8ef7bc4d1b01617ef15a53a900854db7000c7a) Signed-off-by: Libor
         Zoubek <lzoubek@redhat.com>

Comment 19 Jirka Kremser 2015-01-15 15:18:56 UTC
My previous fix worked on my localhost where _Total Swap Space_ metric was about 6 gigs, but it failed on the this machine [1] where the metric give 2 gigs. It's because Math.round(2 * 0.2) gives 0, so I am adding this logic to make it at least 1 all the time.


branch:  master
link:    https://github.com/rhq-project/rhq/commit/630cecd97
time:    2015-01-15 16:14:58 +0100
commit:  630cecd97e64ec760b17ea197de2f517966e25bd
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 1146266] - Metric graph is empty if high, low, and avg values are
         all the same for every time bucket within the selected time
         range - if global min and global max of the graph were the
         same, but low enough that Math.round(max * 0.2) would equal to
         zero, the fix didn't work. Therefore I am adding this piece of
         code (making the reserve (using the domain d3 feature) from
         both top and bottom of the graph at least 1, if percentage
         based calculation gives 0).


[1]: jk-rhq-master.bc.jonqe.lab.eng.bos.redhat.com:7080/coregui/

Comment 20 Libor Zoubek 2015-01-15 16:09:35 UTC
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/56c694717
time:    2015-01-15 17:02:10 +0100
commit:  56c694717e8067de6f42d7169fcf778aa15eafeb
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 1146266] - Metric graph is empty if high, low, and avg values are
         all the same for every time bucket within the selected time
         range - if global min and global max of the graph were the
         same, but low enough that Math.round(max * 0.2) would equal to
         zero, the fix didn't work. Therefore I am adding this piece of
         code (making the reserve (using the domain d3 feature) from
         both top and bottom of the graph at least 1, if percentage
         based calculation gives 0).
         (cherry picked from commit
         630cecd97e64ec760b17ea197de2f517966e25bd) Signed-off-by: Libor
         Zoubek <lzoubek@redhat.com>

Comment 21 Jirka Kremser 2015-01-15 16:40:34 UTC
Created attachment 980557 [details]
script for filling the C* with data

Including the scripts I used for easier replication, may be handy for someone. It assumes Scala to be installed, rpc_server being enabled (in cassandra.yaml), rhq password and login to C* set to rhqadmin and run the c1.sh from rhq-server/rhq-storage/bin

Comment 22 Jirka Kremser 2015-01-15 16:41:10 UTC
Created attachment 980558 [details]
scala script for creating the queries

Comment 23 Simeon Pinder 2015-01-26 08:15:06 UTC
Moving to ON_QA as available for test with the latest 3.3.1.ER01 bits from here:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/12/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

Comment 24 Armine Hovsepyan 2015-01-29 12:58:15 UTC
Created attachment 985581 [details]
graph4

Comment 25 Armine Hovsepyan 2015-01-29 12:58:40 UTC
Created attachment 985582 [details]
graph5

Comment 26 Armine Hovsepyan 2015-01-29 12:59:18 UTC
verified for metrics scheduled every 30sec, for >30 mins


Note You need to log in before you can comment on or make changes to this bug.