From d4c48b0fde6d895bce527f43a9cd802bf1bd94a1 Mon Sep 17 00:00:00 2001 From: John Schulz Date: Tue, 16 Jun 2020 18:04:54 -0400 Subject: [PATCH] [Ingest Manager] Use search param vs KQL for events count (#69209) (#69326) * Replace filter with search in events count Co-authored-by: Elastic Machine Co-authored-by: Elastic Machine --- .../plugins/ingest_manager/server/services/agents/status.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/ingest_manager/server/services/agents/status.ts b/x-pack/plugins/ingest_manager/server/services/agents/status.ts index 63388db890ea5..0efb202eff532 100644 --- a/x-pack/plugins/ingest_manager/server/services/agents/status.ts +++ b/x-pack/plugins/ingest_manager/server/services/agents/status.ts @@ -56,9 +56,8 @@ export async function getAgentStatusForConfig( async function getEventsCount(soClient: SavedObjectsClientContract, configId?: string) { const { total } = await soClient.find({ type: AGENT_EVENT_SAVED_OBJECT_TYPE, - filter: configId - ? `${AGENT_EVENT_SAVED_OBJECT_TYPE}.attributes.config_id:"${configId}"` - : undefined, + searchFields: ['config_id'], + search: configId, perPage: 0, page: 1, sortField: 'timestamp',