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.
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.
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.
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 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?
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 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>
(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.
Moving to ON_QA as available to test with the latest brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=394734
Created attachment 949964 [details] metrics-sameVlue
Created attachment 949966 [details] metric_graph_with_same_minMaxAvg1
Created attachment 949967 [details] metric_graph_with_same_minMaxAvg2
verified in JON3.3 ER05
Re-opening issue, it still exists in 3.3.0GA
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..
@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?
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.
ce8ef7bc4d1b01617ef15a53a900854db7000c7a in master
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 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>
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 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/
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 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>
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
Created attachment 980558 [details] scala script for creating the queries
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
Created attachment 985581 [details] graph4
Created attachment 985582 [details] graph5
verified for metrics scheduled every 30sec, for >30 mins