Bug 870564
Summary: | Peak and Low metric values are incorrectly aggregated from compressed avg. value instead of minvalue and maxvalue | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Larry O'Leary <loleary> |
Component: | Monitoring | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4 | CC: | hrupp |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 870561 | Environment: | |
Last Closed: | Type: | Bug | |
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: | 870561 |
Description
Larry O'Leary
2012-10-26 21:16:01 UTC
Here is an example to illustrate everything going on with this query. Suppose we will be querying against the rhq_measurement_data_num_1h table and for the date range specified, we have the following rows that will be included in aggregation/data points query, time_stamp | schedule_id | value | minvalue | maxvalue ---------------------+-------------+-------+----------+---------- Mon Jul 09 11:48:35 | 10013 | 2 | 1 | 3 Mon Jul 09 12:48:35 | 10013 | 5 | 4 | 6 Mon Jul 09 13:48:35 | 10013 | 3 | 3 | 3 Fri Jul 20 07:24:35 | 10013 | 5 | 2 | 9 Fri Jul 20 08:24:35 | 10013 | 5 | 4 | 6 Fri Jul 20 09:24:35 | 10013 | 3 | 3 | 3 The data points query takes the time range, which is 11 days in this example, and divides it into 60 buckets. Each of the above rows will fall into one of the buckets. A bucket can have zero or more rows in it. The first three rows fall into bucket 0 while the last three rows fall into bucket 59. The aggregation/data points query then generates the average, max, and min of the value column of the rows in each bucket. We then wind up with the following results, Bucket[0] - {avg: 3.333, min: 2, max: 5} Bucket[1..58] - {avg: Double.NaN, min: Double.NaN, max: Double.NaN} Bucket[59] - {avg: 4.333, min: 3, max: 5} Note that the minvalue and maxvalue columns are not used all. This query supports the candlestick graphs and provides a mechanism to summarize the data which is helpful when there are a lot of data points. As I found this afternoon, it does not look like we provide an API to allow users to get at the unsummarized data. A bigger potential problem with this query is that if the date range changes slightly, it can yield different results even if that range covers the same data points. |