Skip to content

Commit

Permalink
Metrictank: Fix meta inspector consolidator field names (#23838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe authored and aknuds1 committed Jun 29, 2020
1 parent 15c04a5 commit 5d00979
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/datasource/graphite/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/datasource/graphite/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5d00979

Please sign in to comment.