Description of problem:
When setting an alert definition condition to use a metric's absolute value threshold, the base unit displayed is not the base unit used. This results in bad alert definition conditions being used/applied to a resource.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install and start JBoss ON 3.2 system.
2. Import RHQ Server resource into inventory.
3. From the _alerts definitions_ page of the *RHQ Server* resource, create the *High Request Time* alert definition:
* *Name*: `High Request Time`
* *Condition Type*: *Maximum request time*
* *Metric*: *Actual Free Memory*
* *Comparator*: *> (Greater Than)*
* *Metric Value*: `20`
**note that *Base Units* indicates *s* for seconds**
Alert condition states: Metric Value Threshold [Maximum request time < 20.0 ms]
Alert condition states: Metric Value Threshold [Maximum request time < 20.0 s]
**OR** Metric Value Threshold [Maximum request time < 20000.0 ms]
Not sure if this is simply a UI issue or a problem with the alert definition page/process. None the less, the issue means that my alert definition condition, at creation time, leads me to believe my threshold is 20 seconds while in reality the alert condition evaluation is 20 milliseconds.
I have a feeling this is a UI issue in the Add Condition Box. Looking into it. For what it's worth, the metric in question is defined as unit=milliseconds, so the actual condition seems correct.
A tricky UI issue, not an issue with the underlying conditions unless the UI bug caused a mistake in the condition definition. Introduced I think with the work on Bug 959587.
master commit f07cf57907921190eb792bf24b410f5c9a0babab
Author: Jay Shaughnessy <firstname.lastname@example.org>
Date: Wed Jul 2 21:38:08 2014 -0400
- fix issue where MeasurementUnits object was used where its String form was
- fix issues with keeping the units paired correctly with the selected
metric, and ensure the first list entry is always the default.
- simplified the widget initialization (although this was not a primary issue)
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
moving to VERIFIED
After Creating the alert "High Request Time" for RHQ Server with condition "Metric Value Threshold", metric "Maximum request time", comparator ">" and metric value "20000 ms", the server shows correct value "20.0 s" if the condition is inspected in web UI (see attached screenshot).
Created attachment 925169 [details]