From a5f5e901aa19d33ea764af99197e1313c4aa0718 Mon Sep 17 00:00:00 2001 From: Chris Roberson Date: Thu, 23 May 2019 16:07:33 -0400 Subject: [PATCH 1/2] Used fixed interval explicitly --- .../server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.js b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.js index 9f135ae1da38..ff2d0470968b 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.js +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/get_metric_aggs.js @@ -47,7 +47,7 @@ export function getMetricAggs(listingMetrics, bucketSize) { date_histogram: { field: 'timestamp', min_doc_count: 1, - interval: bucketSize + 's' + fixed_interval: bucketSize + 's' }, aggs: metric.aggs || metricAgg }; From 61aaea0c977b5bb4a6e43a358facb443efa516e2 Mon Sep 17 00:00:00 2001 From: Chris Roberson Date: Fri, 24 May 2019 15:59:03 -0400 Subject: [PATCH 2/2] Fix tests --- .../__test__/__snapshots__/get_metric_aggs.test.js.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/__test__/__snapshots__/get_metric_aggs.test.js.snap b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/__test__/__snapshots__/get_metric_aggs.test.js.snap index b5f8ad2b8b84..8b5b445b9311 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/__test__/__snapshots__/get_metric_aggs.test.js.snap +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/get_nodes/__test__/__snapshots__/get_metric_aggs.test.js.snap @@ -18,7 +18,7 @@ Object { }, "date_histogram": Object { "field": "timestamp", - "interval": "30s", + "fixed_interval": "30s", "min_doc_count": 1, }, }, @@ -38,7 +38,7 @@ Object { }, "date_histogram": Object { "field": "timestamp", - "interval": "30s", + "fixed_interval": "30s", "min_doc_count": 1, }, }, @@ -76,7 +76,7 @@ Object { }, "date_histogram": Object { "field": "timestamp", - "interval": "30s", + "fixed_interval": "30s", "min_doc_count": 1, }, }, @@ -109,7 +109,7 @@ Object { }, "date_histogram": Object { "field": "timestamp", - "interval": "30s", + "fixed_interval": "30s", "min_doc_count": 1, }, },