Commit 3d17d638 by Dieter Plaetinck Committed by GitHub

Metrictank: Fix meta inspector consolidator field names (#23838)

to match https://github.com/grafana/metrictank/pull/1798
parent 94e28cb6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment