Red Hat Bugzilla – Bug 770366
The condition of the THRESHOLD category for group alert is incorrectly shown.
Last modified: 2012-02-09 05:12:18 EST
Created attachment 549554 [details]
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):
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.
The condition will be displayed as "Metric Value Threshold [System Load > 0.8]"
"Metric Value Threshold [System Load > 75%]"
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.
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.
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).
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.
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
Created attachment 558697 [details]
Created attachment 558698 [details]
Created attachment 558699 [details]
Created attachment 558700 [details]
Created attachment 558701 [details]
Created attachment 558702 [details]
I have installed RHQ 4.2 and it seems to be working. Thank you.