diff --git a/src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts b/src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts index e817ee652bc75..57e28c819dcc9 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts @@ -115,7 +115,8 @@ function findMatchingDescriptors({ // avoid system indices caught by very fuzzy index patterns (i.e.: *log* would catch `.kibana-log-...`) return false; } - return new RegExp(`^${pattern.replace(/\./g, '\\.').replace(/\*/g, '.*')}$`).test(name); + const escapedPattern = pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + return new RegExp(`^${escapedPattern.replace(/\\\*/g, '.*')}$`).test(name); }); }