Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fix for hasUserIndexPattern breaking for a new default data_stream #127141

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/plugins/data_views/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const FLEET_ASSETS_TO_IGNORE = {
METRICS_INDEX_PATTERN: 'metrics-*',
LOGS_DATA_STREAM_TO_IGNORE: 'logs-elastic_agent', // ignore ds created by Fleet server itself
METRICS_DATA_STREAM_TO_IGNORE: 'metrics-elastic_agent', // ignore ds created by Fleet server itself
ENTERPRISE_SEARCH_DATA_STREAM_TO_IGNORE: 'logs-enterprise_search.api-default', // ignore ds created by Enterprise Search
METRICS_ENDPOINT_INDEX_TO_IGNORE: 'metrics-endpoint.metadata_current_default', // ignore index created by Fleet endpoint package installed by default in Cloud
};

Expand Down
3 changes: 2 additions & 1 deletion src/plugins/data_views/server/has_user_index_pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export const hasUserIndexPattern = async ({ esClient, soClient }: Deps): Promise
const hasAnyNonDefaultFleetDataStreams = resolveResponse.data_streams.some(
(ds) =>
ds.name !== FLEET_ASSETS_TO_IGNORE.METRICS_DATA_STREAM_TO_IGNORE &&
ds.name !== FLEET_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE
ds.name !== FLEET_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE &&
ds.name !== FLEET_ASSETS_TO_IGNORE.ENTERPRISE_SEARCH_DATA_STREAM_TO_IGNORE
);

if (hasAnyNonDefaultFleetDataStreams) return true;
Expand Down