mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
Metrictank: Fix meta inspector consolidator field names (#23838)
to match https://github.com/grafana/metrictank/pull/1798
This commit is contained in:
parent
94e28cb65b
commit
3d17d63891
@ -20,7 +20,7 @@ export class MetricTankMetaInspector extends PureComponent<Props, State> {
|
||||
const buckets = parseSchemaRetentions(meta['schema-retentions']);
|
||||
const rollupNotice = getRollupNotice([meta]);
|
||||
const runtimeNotice = getRuntimeConsolidationNotice([meta]);
|
||||
const normFunc = (meta['consolidate-normfetch'] || '').replace('Consolidator', '');
|
||||
const normFunc = (meta['consolidator-normfetch'] || '').replace('Consolidator', '');
|
||||
|
||||
let totalSeconds = 0;
|
||||
|
||||
|
@ -38,7 +38,7 @@ export function getRollupNotice(metaList: MetricTankSeriesMeta[]): QueryResultMe
|
||||
if (archiveIndex > 0) {
|
||||
const schema = parseSchemaRetentions(meta['schema-retentions']);
|
||||
const intervalString = schema[archiveIndex].interval;
|
||||
const func = meta['consolidate-normfetch'].replace('Consolidator', '');
|
||||
const func = meta['consolidator-normfetch'].replace('Consolidator', '');
|
||||
|
||||
return {
|
||||
text: `Data is rolled up, aggregated over ${intervalString} using ${func} function`,
|
||||
@ -56,7 +56,7 @@ export function getRuntimeConsolidationNotice(metaList: MetricTankSeriesMeta[]):
|
||||
const runtimeNr = meta['aggnum-rc'];
|
||||
|
||||
if (runtimeNr > 0) {
|
||||
const func = meta['consolidate-rc'].replace('Consolidator', '');
|
||||
const func = meta['consolidator-rc'].replace('Consolidator', '');
|
||||
|
||||
return {
|
||||
text: `Data is runtime consolidated, ${runtimeNr} datapoints combined using ${func} function`,
|
||||
|
@ -58,8 +58,8 @@ describe('graphiteDatasource', () => {
|
||||
'aggnum-rc': 7,
|
||||
'archive-interval': 3600,
|
||||
'archive-read': 1,
|
||||
'consolidate-normfetch': 'AverageConsolidator',
|
||||
'consolidate-rc': 'AverageConsolidator',
|
||||
'consolidator-normfetch': 'AverageConsolidator',
|
||||
'consolidator-rc': 'AverageConsolidator',
|
||||
count: 1,
|
||||
'schema-name': 'wpUsageMetrics',
|
||||
'schema-retentions': '1h:35d:6h:2,2h:2y:6h:2',
|
||||
@ -74,8 +74,8 @@ describe('graphiteDatasource', () => {
|
||||
'aggnum-rc': 0,
|
||||
'archive-interval': 3600,
|
||||
'archive-read': 0,
|
||||
'consolidate-normfetch': 'AverageConsolidator',
|
||||
'consolidate-rc': 'NoneConsolidator',
|
||||
'consolidator-normfetch': 'AverageConsolidator',
|
||||
'consolidator-rc': 'NoneConsolidator',
|
||||
count: 1,
|
||||
'schema-name': 'wpUsageMetrics',
|
||||
'schema-retentions': '1h:35d:6h:2,2h:2y:6h:2',
|
||||
|
@ -25,9 +25,9 @@ export interface MetricTankSeriesMeta {
|
||||
'archive-read': number;
|
||||
'archive-interval': number;
|
||||
'aggnum-norm': number;
|
||||
'consolidate-normfetch': string; //"MaximumConsolidator",
|
||||
'consolidator-normfetch': string; //"MaximumConsolidator",
|
||||
'aggnum-rc': number;
|
||||
'consolidate-rc': string; //"MaximumConsolidator",
|
||||
'consolidator-rc': string; //"MaximumConsolidator",
|
||||
count: number;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user