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

[Metrics UI] Add aws.dimensions prefix to AWS metrics in Metrics Explorer #56216

Merged
Merged
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
8 changes: 3 additions & 5 deletions x-pack/legacy/plugins/infra/common/ecs_allowed_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DOCKER_ALLOWED_LIST = [
];

export const AWS_S3_ALLOWED_LIST = ['aws.s3'];
export const AWS_METRICS_ALLOWED_LIST = ['aws.cloudwatch'];
export const AWS_METRICS_ALLOWED_LIST = ['aws.dimensions'];

export const getAllowedListForPrefix = memoize((prefix: string) => {
const firstPart = first(prefix.split(/\./));
Expand All @@ -60,11 +60,9 @@ export const getAllowedListForPrefix = memoize((prefix: string) => {
return [...defaultAllowedList, ...K8S_ALLOWED_LIST];
case 'aws':
if (prefix === 'aws.s3_daily_storage') {
return [...defaultAllowedList, ...AWS_S3_ALLOWED_LIST];
}
if (prefix === 'aws.metrics') {
return [...defaultAllowedList, ...AWS_METRICS_ALLOWED_LIST];
return [...defaultAllowedList, ...AWS_S3_ALLOWED_LIST, ...AWS_METRICS_ALLOWED_LIST];
}
return [...defaultAllowedList, ...AWS_METRICS_ALLOWED_LIST];
default:
return defaultAllowedList;
}
Expand Down