From 80fdcde8139df3ea6c24848a567b89d29d362400 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Fri, 26 Mar 2021 19:45:24 -0700 Subject: [PATCH] [Alerts][Actions] Added missing telemetry mapping for a new alert and action types: geo-containment, es-query, teams (#95464) * [Alerts][Actions] Added missing telemtry mapping for a new alert and action types: geo-containment, es-query, teams * fixed mappings * fixed ML alert type telemetry mappings Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../server/usage/actions_usage_collector.ts | 1 + .../server/usage/alerts_usage_collector.ts | 5 ++++ .../schema/xpack_plugins.json | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/x-pack/plugins/actions/server/usage/actions_usage_collector.ts b/x-pack/plugins/actions/server/usage/actions_usage_collector.ts index f8a91e3a0a67..c338bbc998c4 100644 --- a/x-pack/plugins/actions/server/usage/actions_usage_collector.ts +++ b/x-pack/plugins/actions/server/usage/actions_usage_collector.ts @@ -23,6 +23,7 @@ const byTypeSchema: MakeSchemaFrom['count_by_type'] = { __servicenow: { type: 'long' }, __jira: { type: 'long' }, __resilient: { type: 'long' }, + __teams: { type: 'long' }, }; export function createActionsUsageCollector( diff --git a/x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts b/x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts index 884120d3d03d..59aeb4854d9f 100644 --- a/x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts +++ b/x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts @@ -16,6 +16,7 @@ const byTypeSchema: MakeSchemaFrom['count_by_type'] = { // Known alerts (searching the use of the alerts API `registerType`: // Built-in '__index-threshold': { type: 'long' }, + '__es-query': { type: 'long' }, // APM apm__error_rate: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention apm__transaction_error_rate: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention @@ -41,6 +42,10 @@ const byTypeSchema: MakeSchemaFrom['count_by_type'] = { xpack__uptime__alerts__monitorStatus: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention xpack__uptime__alerts__tls: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention xpack__uptime__alerts__durationAnomaly: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention + // Maps + '__geo-containment': { type: 'long' }, + // ML + xpack_ml_anomaly_detection_alert: { type: 'long' }, }; export function createAlertsUsageCollector( diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 36488fceb2a1..ef09937da3fb 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -39,6 +39,9 @@ }, "__resilient": { "type": "long" + }, + "__teams": { + "type": "long" } } }, @@ -73,6 +76,9 @@ }, "__resilient": { "type": "long" + }, + "__teams": { + "type": "long" } } } @@ -136,6 +142,9 @@ "__index-threshold": { "type": "long" }, + "__es-query": { + "type": "long" + }, "apm__error_rate": { "type": "long" }, @@ -195,6 +204,12 @@ }, "xpack__uptime__alerts__durationAnomaly": { "type": "long" + }, + "__geo-containment": { + "type": "long" + }, + "xpack_ml_anomaly_detection_alert": { + "type": "long" } } }, @@ -206,6 +221,9 @@ "__index-threshold": { "type": "long" }, + "__es-query": { + "type": "long" + }, "apm__error_rate": { "type": "long" }, @@ -265,6 +283,12 @@ }, "xpack__uptime__alerts__durationAnomaly": { "type": "long" + }, + "__geo-containment": { + "type": "long" + }, + "xpack_ml_anomaly_detection_alert": { + "type": "long" } } }