File tree Expand file tree Collapse file tree
x-pack/plugins/uptime/server/lib/requests/search Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515 SortOrder ,
1616} from '../../../../common/runtime_types' ;
1717import { MonitorEnricher } from './fetch_page' ;
18+ import { getHistogramInterval } from '../../helper/get_histogram_interval' ;
1819
1920export const enrichMonitorGroups : MonitorEnricher = async (
2021 queryContext : QueryContext ,
@@ -317,11 +318,13 @@ const getHistogramForMonitors = async (
317318 } ,
318319 aggs : {
319320 histogram : {
320- auto_date_histogram : {
321+ date_histogram : {
321322 field : '@timestamp' ,
322323 // 12 seems to be a good size for performance given
323324 // long monitor lists of up to 100 on the overview page
324- buckets : 12 ,
325+ fixed_interval :
326+ getHistogramInterval ( queryContext . dateRangeStart , queryContext . dateRangeEnd , 12 ) +
327+ 'ms' ,
325328 missing : 0 ,
326329 } ,
327330 aggs : {
You can’t perform that action at this time.
0 commit comments