Bug 737565 - do not allow user to pick the same metric in multiple measurement conditionals in same ALL alert def
do not allow user to pick the same metric in multiple measurement conditional...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Alerts (Show other bugs)
4.1
Unspecified Unspecified
high Severity high (vote)
: ---
: ---
Assigned To: John Mazzitelli
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-12 11:00 EDT by John Mazzitelli
Modified: 2012-02-07 14:24 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:24:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2011-09-12 11:00:56 EDT
with bug #735262 finished, it would be nice to have the metric drop downs not offer a metric name for metrics already used in another conditional. this  only should be done if using the ALL conjunection. If using ANY, you are allowed to use the same metric.

not sure what should happen if I have an ANY set of conditionals, and then someone flips it to ALL. I guess we can validate on save to catch that.
Comment 1 John Mazzitelli 2011-09-13 12:12:58 EDT
master commit c069df149d473b09550339a7602e1739f99341d5

two things to test:

FIRST TEST:
1) go to platform Alert>Definitions tab and click "New" to start creating a new alert def.
2) enter a name for your alert
3) click "Conditions" tab
4) Select "ALL" from the drop down menu ("Fire alert when")
5) create new condition - pick any measurement condition (like measurement absolute threshold, or measurement range or measurement change or measurement baseline) and pick any metric (we'll call it metric M)
6) create a second condition - pick any measurement condition (doesn't have to be the one you did in step 5) but try to pick the SAME metric M. You should notice you can't - metric M should not be in the metric drop down. This confirms the fix.
7) repeat step 6, but pick a different metric. Continue creating lots of conditions using any mix of the different measurement conditions. Use up all the available metrics in the drop down. Once you get them all, the next condition you try to create should show a message when you try to create a new measurement condition when no metrics are available - should say something to the effect of "there are no more metrics to pick from" or some such thing.

SECOND TEST
1) go to platform Alert>Definitions tab and click "New" to start creating a new alert def.
2) enter a name for your alert
3) click "Conditions" tab
4) Select "ANY" from the drop down menu ("Fire alert when") - NOTE THIS IS DIFFERENT THAN THE FIRST TEST - you want to pick ANY here
5) create new condition - pick any measurement condition (like measurement absolute threshold, or measurement range or measurement change or measurement baseline) and pick any metric (we'll call it metric M)
6) create a second condition - pick any measurement condition (doesn't have to be the one you did in step 5) but you must pick the SAME metric M. You should notice you CAN pick M - metric M is valid and will be available in the metric drop down.
7) Now select "ALL" from the "Fire alert when" drop down box.  You should immediately see a yellow box warning that you can't do this and the drop down should remain with the "ANY" value.
8) Delete one of the conditions
9) Now select "ALL" again and it should work, assuming you have no conditions that are using the same metric.
Comment 2 Mike Foley 2011-09-14 13:28:52 EDT
FIRST TEST, step 6 does not pass.  I chose "Drift Detection" for the first conditional, and it appeared in the dropdown when creating the 2nd conditional.
Comment 3 John Mazzitelli 2011-09-14 13:50:59 EDT
i think you misunderstood the replication procedures.

I'm talking about the METRIC drop down. When you choose one of the measurement conditionals (and by that I mean one of: Measurement Absolute Value Threshold, Measurement Baseline Threshold, Measurement Value Change, Measurement Value Range), you will see a METRIC drop down menu (those shows all the metrics that are available to select). it is this metric drop down menu that will dynamically alter its choices.

You can still have many different types of conditionals in your alert def - and choosing Drift Detection has no bearing on this issue. you can have a Drift Detection conditional in your alert def.

We are only worried about MEASUREMENT CONDITIONALS (one of the four I listed above). You can have any number of measurement conditionals in your alert def, its only the METRICS that are restricted, hence that METRIC DROP DOWN MENU is the one whose choices dynamically change based on what other measurement conditionals are using.

Putting back to ON_QA for futher testing.
Comment 4 Mike Foley 2011-09-14 14:00:27 EDT
FIRST TEST = PASS.
updating BZ title to more explicitly say "MEASUREMENT CONDITIONALS"
Comment 5 Mike Foley 2011-09-14 14:05:32 EDT
2nd TEST = PASS.
Comment 6 John Mazzitelli 2011-09-14 14:12:59 EDT
just to be clear, you CAN have multiple measurement conditionals in the same alert def. Its only when 2 measurement conditionals use the same METRIC when you hit problems (and of course, this also requires you use the ALL conjunction; using ANY and there is no problem).

So I could have 20 measurement conditionals in an alert definition, and they all use 20 different metrics - that would be fine.

Its only if 2 measurement conditionals use the SAME metric (like "Free Memory") when problems occur.

Changed subject of this BZ to make this more clear.
Comment 7 Mike Foley 2012-02-07 14:24:47 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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