Bug 726508

Summary: Can't create alert condition on certain metrics
Product: [Other] RHQ Project Reporter: Jay Shaughnessy <jshaughn>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.1CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 4.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 19:25:13 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: 678340    

Description Jay Shaughnessy 2011-07-28 20:57:59 UTC
It seems that we may be doing something bad with substrings or menu values.
I can't create an alert condition for metrics with names that start with
the name of another metric.

Recreate:

1) Import RHQ Agent resource

2) Navigate the the Agent Measurement Subsystem resource 
  (child of the RHQ Agent)

3) Nav to Alert tab and start a New Alert Def

4) try adding an metric baseline condition on 'Failed Collections Per Minute'

Note that the condition actually shows up using 'Failed Collections' as
opposed to 'Failed Collections Per Minute'.

This is wrong.

For fun, try saving the new alert def. It will fail because
'Failed Collections' is trendsup and you can't create a threshold baseline
condition on a trendsup, because it will never get a baseline.

Note that this is dangerous because, unlike the baseline condition, other conditions would have been saved just fine and this would probably get missed.

Comment 1 Jay Shaughnessy 2011-07-29 21:27:12 UTC
git commit c4a82bca1620900e3bb2c7353ca5425a1ee4b354
Author: Jay Shaughnessy <jshaughn>
Date:   Fri Jul 29 17:20:11 2011 -0400

Since metric def names may not be unique, they are duplicated
for the 'Per Minute' version of certain metrics, don't use them
for the value map keys in alert def drop downs.

- Also, some of these metric name lists are long, sort the
  menu entries.

Comment 2 Mike Foley 2011-08-01 13:20:10 UTC
repro'd in 7/28 build.

Comment 3 Mike Foley 2011-08-01 14:11:14 UTC
verified 8/1 build by following the reproduction steps

Comment 4 Mike Foley 2012-02-07 19:25:13 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE