Skip to content

Commit

Permalink
[Ingest Manager] Use search param vs KQL for events count (#69209) (#…
Browse files Browse the repository at this point in the history
…69326)

* Replace filter with search in events count

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
John Schulz and elasticmachine authored Jun 16, 2020
1 parent 6af38c7 commit d4c48b0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d4c48b0

Please sign in to comment.