diff --git a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts index e0f0333bb8cfd8..540e60a28b066c 100644 --- a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts +++ b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts @@ -19,10 +19,4 @@ export const CONTEXT_DEFAULTS = { cursorDirection: CursorDirection.AFTER, sortOrder: SortOrder.ASC, }, - - /** - * Defines the maximum number of monitors to iterate on - * in a single count session. The intention is to catch as many as possible. - */ - MAX_MONITORS_FOR_SNAPSHOT_COUNT: 1000000, }; diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/monitor_states/elasticsearch_monitor_states_adapter.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/monitor_states/elasticsearch_monitor_states_adapter.ts index eaaa8087e57cdd..7ed973e6f057d2 100644 --- a/x-pack/legacy/plugins/uptime/server/lib/adapters/monitor_states/elasticsearch_monitor_states_adapter.ts +++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/monitor_states/elasticsearch_monitor_states_adapter.ts @@ -61,7 +61,7 @@ export const elasticsearchMonitorStatesAdapter: UMMonitorStatesAdapter = { dateRangeEnd, CONTEXT_DEFAULTS.CURSOR_PAGINATION, filters && filters !== '' ? JSON.parse(filters) : null, - CONTEXT_DEFAULTS.MAX_MONITORS_FOR_SNAPSHOT_COUNT, + Infinity, statusFilter );