Bug 737565 - do not allow user to pick the same metric in multiple measurement conditionals in same ALL alert def
Summary: do not allow user to pick the same metric in multiple measurement conditional...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Alerts
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-12 15:00 UTC by John Mazzitelli
Modified: 2012-02-07 19:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:24:47 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 735262 0 high CLOSED alert def with multiple conditions using the same metric fires alerts at wrong times 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 741414 0 low NEW alerts with compound AND conditions can incorrectly fire when one of the conditions goes from true to false within 30 se... 2024-03-04 13:35:02 UTC

Internal Links: 735262 741414

Description John Mazzitelli 2011-09-12 15:00:56 UTC
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 16:12:58 UTC
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 17:28:52 UTC
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 17:50:59 UTC
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 18:00:27 UTC
FIRST TEST = PASS.
updating BZ title to more explicitly say "MEASUREMENT CONDITIONALS"

Comment 5 Mike Foley 2011-09-14 18:05:32 UTC
2nd TEST = PASS.

Comment 6 John Mazzitelli 2011-09-14 18:12:59 UTC
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 19:24:47 UTC
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.