diff --git a/x-pack/legacy/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts b/x-pack/legacy/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts index 8f1efb9e3de89..80ccad9567a0f 100644 --- a/x-pack/legacy/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts +++ b/x-pack/legacy/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts @@ -63,7 +63,14 @@ export const populateSeriesWithTSVBData = ( timestampField: options.timerange.field, timerange: options.timerange, }, - model.requires + options.metrics + .filter(metric => metric.field) + .map(metric => { + return metric + .field!.split(/\./) + .slice(0, 2) + .join('.'); + }) ); if (calculatedInterval) { diff --git a/x-pack/legacy/plugins/infra/server/utils/calculate_metric_interval.ts b/x-pack/legacy/plugins/infra/server/utils/calculate_metric_interval.ts index 09abe17a3cf87..7696abd2ac250 100644 --- a/x-pack/legacy/plugins/infra/server/utils/calculate_metric_interval.ts +++ b/x-pack/legacy/plugins/infra/server/utils/calculate_metric_interval.ts @@ -76,7 +76,7 @@ export const calculateMetricInterval = async ( return; } - return Math.max(...intervals); + return Math.max(...intervals) / 1000; }; interface PeriodAggregationData {