Skip to content

Commit

Permalink
[EDR Workflows][Osquery] Use newly added action responses data stream (
Browse files Browse the repository at this point in the history
…#184209)

Follow up to #183892 with a commit
that got lost during local rebase.
  • Loading branch information
szwarckonrad committed May 27, 2024
1 parent dc46dfc commit efd4887
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export const buildActionResultsQuery = ({

let index: string;
if (useNewDataStream) {
index = ACTION_RESPONSES_DATA_STREAM_INDEX;
index = `${ACTION_RESPONSES_DATA_STREAM_INDEX}*`;
} else if (componentTemplateExists) {
index = ACTION_RESPONSES_INDEX;
index = `${ACTION_RESPONSES_INDEX}*`;
} else {
index = AGENT_ACTIONS_RESULTS_INDEX;
index = `${AGENT_ACTIONS_RESULTS_INDEX}*`;
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const osquerySearchStrategyProvider = <T extends FactoryQueryTypes>(
}),
newDataStreamIndexExists: esClient.asInternalUser.indices.exists({
index: `${ACTION_RESPONSES_DATA_STREAM_INDEX}*`,
allow_no_indices: false,
expand_wildcards: 'all',
}),
}).pipe(
mergeMap(({ actionsIndexExists, newDataStreamIndexExists }) => {
Expand Down

0 comments on commit efd4887

Please sign in to comment.