Skip to content

Commit c0d021a

Browse files
authored
[7.x] [Uptime] Remove hard coded value for monitor states histograms (#64396) (#64895)
1 parent d4467a7 commit c0d021a

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

x-pack/plugins/uptime/common/constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export { CONTEXT_DEFAULTS } from './context_defaults';
1111
export * from './capabilities';
1212
export * from './settings_defaults';
1313
export { PLUGIN } from './plugin';
14-
export { QUERY, STATES } from './query';
14+
export { QUERY } from './query';
1515
export * from './ui';
1616
export * from './rest_api';

x-pack/plugins/uptime/common/constants/query.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,3 @@ export const QUERY = {
2525
'error.type',
2626
],
2727
};
28-
29-
export const STATES = {
30-
// Number of results returned for a states query
31-
LEGACY_STATES_QUERY_SIZE: 10,
32-
// The maximum number of monitors that should be supported
33-
MAX_MONITORS: 35000,
34-
};

x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { get, sortBy } from 'lodash';
88
import { QueryContext } from './query_context';
9-
import { QUERY, STATES } from '../../../../common/constants';
9+
import { QUERY } from '../../../../common/constants';
1010
import {
1111
Check,
1212
Histogram,
@@ -314,7 +314,7 @@ const getHistogramForMonitors = async (
314314
by_id: {
315315
terms: {
316316
field: 'monitor.id',
317-
size: STATES.LEGACY_STATES_QUERY_SIZE,
317+
size: queryContext.size,
318318
},
319319
aggs: {
320320
histogram: {

0 commit comments

Comments
 (0)