Bug 770366

Summary: The condition of the THRESHOLD category for group alert is incorrectly shown.
Product: [Other] RHQ Project Reporter: ud1 <ud1bugzilla>
Component: Core UIAssignee: John Mazzitelli <mazz>
Status: CLOSED WORKSFORME QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1CC: hrupp, jshaughn, mazz, ud1bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-31 20:29:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 760116    
Attachments:
Description Flags
screenshot
none
alert1.1
none
alert1.2
none
alert1.3
none
alert2.1
none
alert2.2
none
alert2.3 none

Description ud1 2011-12-26 07:38:36 UTC
Created attachment 549554 [details]
screenshot

Description of problem:
The condition of the THRESHOLD category rounds threshold value ignoring MeasurementUnits in the interface.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Select resource group containing one or more platforms.
2. Go to Alerts->Definitions. Create new alert definition. Add condition:
Type - Measurement absolute value threshold,
Metric - System load,
Comparator - > (Greater than)
Metric value - 0.75
3. Press "Back to List", select created definition, go to Conditions tab.
  
Actual results:
The condition will be displayed as "Metric Value Threshold [System Load > 0.8]"

Expected results:
"Metric Value Threshold [System Load > 75%]"

Additional info:

Comment 1 Jay Shaughnessy 2012-01-16 21:31:50 UTC
This is working as expected, I think.  System Load is a percentage metric.
If you enter 0.75 it is literally taken as 0.75 percent, and it gets rounded
in the display to 0.8%.

For 75% the user can just type 75.

I believe this was fixed after 4.1 was released, which is the version
noted on this BZ.


No code changes, setting to ON_QA for optional verification.  Asking for
additional info from reporter in case I've misinterpreted the issue.

Comment 2 ud1 2012-01-25 12:56:33 UTC
If I enter 75, it will be 7500%

Right after how I have entered a condition, it is shows correctly: "Metric Value Threshold [System Load > 75%]", but then I press "Back to list button" and open conditions form again it will be "Metric Value Threshold [System Load > 0.8]".

I think it's some kind of uninitialized variable, so the correct Measurement Units cannot be determined, and used the default one.

Comment 3 John Mazzitelli 2012-01-31 18:41:04 UTC
this is probably just a poor way to show the values, but they are correct.

"Right after I have entered a condition, it is shows correctly: "Metric
Value Threshold [System Load > 75%]"

Right, so in this way of showing the value, its a percentage (as denoted with the % sign).

"but then I press Back to list button and open conditions form again it will be "Metric Value Threshold [System Load > 0.8]".

In this case, it appears it uses a different way of formatting the value. Its still the same thing - notice it doesn't show a percentage sign - its just 0.8. This is your 75% rounded up to the tenths place as a decimal (75% = 0.75 rounded up to a single decimal place thus 0.8).

Poor way of mixing the different formats of the value, but in the end, the values are still the same. One is 75% and one is a rounded decimal value of 0.8.

So, while this issue is still valid - its really to fix the UI. The value itself is the same under the covers (that is, if you look in the revelant DB row/column, it will be 0.75).

Comment 4 John Mazzitelli 2012-01-31 20:04:30 UTC
I'm currently not seeing this behavior at all. Wondering what version this issue was written against. I'm running a build off of master, and I can enter either "75%" as the value or "0.75" and I'm seeing the same display showing in the UI.

I'm gonna keep playing around to see if I can replicate something.

Comment 5 John Mazzitelli 2012-01-31 20:25:01 UTC
I think this is fixed in the latest release - or at least in master branch.

See the attached images.

I created my first alert definiton with a system load value of 75%:

alert1.1.png - creating first alert definition with value of "75%"
alert1.2.png - shows the "75%" string in the UI before saving the alert definition
alert1.3.png - the condition string after going back to the list and re-entering the newly created alert definition. Also shows the value as stored in the database - 0.75.

I then created a second alert definition with a system load value of 0.75:

alert2.1.png - creating second alert definition with value of "0.75"
alert2.2.png - shows the "0.8%" string in the UI before saving the alert definition
alert2.3.png - the condition string after going back to the list and re-entering the newly created alert definition. Also shows the value as stored in the database - 0.0075.

I think, therefore, this has been fixed in a more recent version (and will at least be fixed in the next release of RHQ if this fix hasn't yet made it out to a GA release) I think this actually might have been fixed with bug #698600

Comment 6 John Mazzitelli 2012-01-31 20:25:23 UTC
Created attachment 558697 [details]
alert1.1

Comment 7 John Mazzitelli 2012-01-31 20:25:47 UTC
Created attachment 558698 [details]
alert1.2

Comment 8 John Mazzitelli 2012-01-31 20:26:04 UTC
Created attachment 558699 [details]
alert1.3

Comment 9 John Mazzitelli 2012-01-31 20:26:25 UTC
Created attachment 558700 [details]
alert2.1

Comment 10 John Mazzitelli 2012-01-31 20:26:46 UTC
Created attachment 558701 [details]
alert2.2

Comment 11 John Mazzitelli 2012-01-31 20:27:10 UTC
Created attachment 558702 [details]
alert2.3

Comment 12 ud1 2012-02-09 10:12:18 UTC
I have installed RHQ 4.2 and it seems to be working. Thank you.