diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8ef919aed4a92..c7a8d8e932ffa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,6 +26,7 @@ # Vis Editors /x-pack/plugins/lens/ @elastic/kibana-visualizations /src/plugins/charts/ @elastic/kibana-visualizations +/src/plugins/event_annotation @elastic/kibana-visualizations /src/plugins/vis_default_editor/ @elastic/kibana-visualizations /src/plugins/vis_types/metric/ @elastic/kibana-visualizations /src/plugins/vis_types/table/ @elastic/kibana-visualizations @@ -389,14 +390,16 @@ /x-pack/plugins/triggers_actions_ui/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/response-ops -/docs/user/alerting/ @elastic/response-ops @elastic/mlr-docs -/docs/management/connectors/ @elastic/response-ops @elastic/mlr-docs +/docs/user/alerting/ @elastic/response-ops +/docs/management/connectors/ @elastic/response-ops /x-pack/plugins/stack_alerts/ @elastic/response-ops /x-pack/plugins/cases/ @elastic/response-ops /x-pack/test/cases_api_integration/ @elastic/response-ops /x-pack/test/functional/services/cases/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/cases/ @elastic/response-ops /x-pack/test/api_integration/apis/cases/ @elastic/response-ops +/docs/api/actions-and-connectors @elastic/mlr-docs +/docs/api/alerting @elastic/mlr-docs /docs/api/cases @elastic/mlr-docs /x-pack/plugins/cases/docs/openapi @elastic/mlr-docs @@ -705,7 +708,7 @@ packages/analytics/shippers/elastic_v3/common @elastic/kibana-core packages/analytics/shippers/elastic_v3/server @elastic/kibana-core packages/analytics/shippers/fullstory @elastic/kibana-core packages/analytics/shippers/gainsight @elastic/kibana-core -packages/content-management/inspector @elastic/shared-ux +packages/content-management/inspector @elastic/kibana-global-experience packages/content-management/table_list @elastic/kibana-global-experience packages/core/analytics/core-analytics-browser @elastic/kibana-core packages/core/analytics/core-analytics-browser-internal @elastic/kibana-core @@ -884,6 +887,7 @@ packages/home/sample_data_tab @elastic/kibana-global-experience packages/home/sample_data_types @elastic/kibana-global-experience packages/kbn-ace @elastic/platform-deployment-management packages/kbn-alerts @elastic/security-solution +packages/kbn-ambient-common-types @elastic/kibana-operations packages/kbn-ambient-storybook-types @elastic/kibana-operations packages/kbn-ambient-ui-types @elastic/kibana-operations packages/kbn-analytics @elastic/kibana-core @@ -955,6 +959,8 @@ packages/kbn-monaco @elastic/kibana-app-services packages/kbn-optimizer @elastic/kibana-operations packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations packages/kbn-osquery-io-ts-types @elastic/security-asset-management +packages/kbn-peggy @elastic/kibana-operations +packages/kbn-peggy-loader @elastic/kibana-operations packages/kbn-performance-testing-dataset-extractor @elastic/kibana-performance-testing packages/kbn-plugin-discovery @elastic/kibana-operations packages/kbn-plugin-generator @elastic/kibana-operations diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 9ed6b213e1a31..b2d95d934c7ab 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 3e363f8b04ede..06d9d714d4426 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 708da2e8da6d9..c1b284357960d 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 7a4564da3e83c..9ad42cdce240f 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -3126,7 +3126,27 @@ }, " | ", "RuleWithLegacyId", - ")[]; total: number; taskIdsFailedToBeEnabled: string[]; }>; updateApiKey: ({ id }: { id: string; }) => Promise; snooze: ({ id, snoozeSchedule, }: { id: string; snoozeSchedule: ", + ")[]; total: number; taskIdsFailedToBeEnabled: string[]; }>; bulkDisableRules: (options: ", + "BulkOptions", + ") => Promise<{ errors: ", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.BulkOperationError", + "text": "BulkOperationError" + }, + "[]; rules: (", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.Rule", + "text": "Rule" + }, + " | ", + "RuleWithLegacyId", + ")[]; total: number; }>; updateApiKey: ({ id }: { id: string; }) => Promise; snooze: ({ id, snoozeSchedule, }: { id: string; snoozeSchedule: ", { "pluginId": "alerting", "scope": "common", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 212ddb8465ee5..275fef88e842c 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 8081434b322dc..0a55344538090 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 2d7e7fb45e4a0..1e7ea5f89a633 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 3b15fe9011939..8af5466e04b9f 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 00aa21bfc02dd..7a677990bff24 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 5075366f1d4ae..3dd6a0f3be9b1 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index b2ada08835e9f..0ce4f96d5958b 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index f02f76dba0b06..1fb7a1a92511b 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index b04e7dd2bfbae..8e1754c183657 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 3f482e17b93a7..2d02f8005f706 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.devdocs.json b/api_docs/cloud_security_posture.devdocs.json index 49320bbccb442..ca11b206b5a57 100644 --- a/api_docs/cloud_security_posture.devdocs.json +++ b/api_docs/cloud_security_posture.devdocs.json @@ -157,7 +157,7 @@ "Gets the `SpyRoute` component for navigation highlighting and breadcrumbs." ], "signature": [ - "() => React.ComponentType<{ pageName?: ", + "() => React.ComponentType<{ pageName: ", { "pluginId": "cloudSecurityPosture", "scope": "public", @@ -165,27 +165,7 @@ "section": "def-public.CloudSecurityPosturePageId", "text": "CloudSecurityPosturePageId" }, - " | undefined; }>" - ], - "path": "x-pack/plugins/cloud_security_posture/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "cloudSecurityPosture", - "id": "def-public.CspSecuritySolutionContext.getManageBreadcrumbEntry", - "type": "Function", - "tags": [], - "label": "getManageBreadcrumbEntry", - "description": [ - "Gets the `Manage` breadcrumb entry." - ], - "signature": [ - "() => ", - "BreadcrumbEntry", - " | undefined" + "; state?: Record | undefined; }>" ], "path": "x-pack/plugins/cloud_security_posture/public/types.ts", "deprecated": false, @@ -226,7 +206,7 @@ "\nAll the IDs for the cloud security posture pages.\nThis needs to match the cloud security posture page entries in `SecurityPageName` in `x-pack/plugins/security_solution/common/constants.ts`." ], "signature": [ - "\"cloud_security_posture-dashboard\" | \"cloud_security_posture-findings\" | \"cloud_security_posture-benchmarks\" | \"cloud_security_posture-rules\"" + "\"cloud_security_posture-dashboard\" | \"cloud_security_posture-findings\" | \"cloud_security_posture-benchmarks\" | \"cloud_security_posture-benchmarks-rules\"" ], "path": "x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts", "deprecated": false, diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index fdfb4370fc00d..2b10487024750 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-pos | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 18 | 0 | 2 | 3 | +| 17 | 0 | 2 | 2 | ## Client diff --git a/api_docs/console.mdx b/api_docs/console.mdx index e312482573452..910878ac733bd 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index e8178bccc5d3b..91bef448937c8 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 1ae304e45c901..cefdc2fe90cb1 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index a2b406ab38dac..40711926c5cd2 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index bc1e7d92d640c..52fa80a7a3a70 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 294715ebfd44f..4ac0e234500cf 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 20712dbd0b88f..5b8520d5ee5b5 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 037b9be620893..d52772da31315 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index c5ec63bc7b3a9..be8bd7f66a77e 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 8052ee965a58a..e6a899dbce30b 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index ba0d50b120def..8c5fda3b154c0 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 651178d57a19c..92eaaf8ee90ae 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 7e6775fb977dc..4d6daf5050178 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 6e869ed61832b..7184421b9ca9d 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 41551a6cd75ab..b758e284c11bb 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 12d85f1e4f07e..8ff3ed943a695 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -849,8 +849,8 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts#:~:text=options) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx#:~:text=title)+ 18 more | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx#:~:text=title)+ 4 more | - | -| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 6 more | 8.8.0 | -| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 6 more | 8.8.0 | +| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | +| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts#:~:text=license%24) | 8.8.0 | | | [request_context_factory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/request_context_factory.ts#:~:text=authc), [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts#:~:text=authc), [create_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts#:~:text=authc), [delete_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts#:~:text=authc), [finalize_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts#:~:text=authc), [open_close_signals_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts#:~:text=authc), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts#:~:text=authc) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/index.tsx#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 070d1dfac6294..6dad3dce668a0 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -187,8 +187,8 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 6 more | 8.8.0 | -| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 6 more | 8.8.0 | +| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | +| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | securitySolution | | [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts#:~:text=license%24) | 8.8.0 | | securitySolution | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/index.tsx#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | | securitySolution | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/types.ts#:~:text=AppLeaveHandler), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/types.ts#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [use_timeline_save_prompt.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/timeline/use_timeline_save_prompt.ts#:~:text=AppLeaveHandler)+ 1 more | 8.8.0 | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index e341c2a68e824..46a93e69c4d9e 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 7b095279ac53d..6a8fb5cf56b56 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index ca40e80627257..667e653e9e783 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 8c9016995d951..d4c5c3469ed5b 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 79272dbfb80f4..15757f9e80bd8 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index d987f416c0488..4378feb5c7123 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 5e3511e0f9bf5..0e4956ed6c433 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 8f3b8c7143609..bff897494a86d 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.devdocs.json b/api_docs/event_annotation.devdocs.json index ffce75ed34ebc..224bdbecb294c 100644 --- a/api_docs/event_annotation.devdocs.json +++ b/api_docs/event_annotation.devdocs.json @@ -512,6 +512,17 @@ "path": "src/plugins/event_annotation/common/event_annotation_group/index.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.EventAnnotationGroupArgs.ignoreGlobalFilters", + "type": "boolean", + "tags": [], + "label": "ignoreGlobalFilters", + "description": [], + "path": "src/plugins/event_annotation/common/event_annotation_group/index.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -558,6 +569,20 @@ "path": "src/plugins/event_annotation/common/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.EventAnnotationGroupConfig.ignoreGlobalFilters", + "type": "CompoundType", + "tags": [], + "label": "ignoreGlobalFilters", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/event_annotation/common/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -878,7 +903,7 @@ "section": "def-common.KibanaQueryOutput", "text": "KibanaQueryOutput" }, - "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; ignoreGlobalFilters?: boolean | undefined; } & StyleSharedProps & { icon?: ", + "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; } & StyleSharedProps & { icon?: ", { "pluginId": "eventAnnotation", "scope": "common", @@ -911,7 +936,7 @@ "section": "def-common.KibanaQueryOutput", "text": "KibanaQueryOutput" }, - "; timeField?: string | undefined; textField?: string | undefined; extraFields?: string[] | undefined; ignoreGlobalFilters?: boolean | undefined; key: { type: \"point_in_time\"; }; } & StyleSharedProps & { icon?: ", + "; timeField?: string | undefined; textField?: string | undefined; extraFields?: string[] | undefined; key: { type: \"point_in_time\"; }; } & StyleSharedProps & { icon?: ", { "pluginId": "eventAnnotation", "scope": "common", @@ -944,7 +969,7 @@ "section": "def-common.KibanaQueryOutput", "text": "KibanaQueryOutput" }, - "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; ignoreGlobalFilters?: boolean | undefined; } & StyleSharedProps & { icon?: ", + "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; } & StyleSharedProps & { icon?: ", { "pluginId": "eventAnnotation", "scope": "common", @@ -2702,61 +2727,6 @@ "trackAdoption": false } ] - }, - { - "parentPluginId": "eventAnnotation", - "id": "def-common.queryPointEventAnnotation.args.ignoreGlobalFilters", - "type": "Object", - "tags": [], - "label": "ignoreGlobalFilters", - "description": [], - "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "eventAnnotation", - "id": "def-common.queryPointEventAnnotation.args.ignoreGlobalFilters.types", - "type": "Array", - "tags": [], - "label": "types", - "description": [], - "signature": [ - "\"boolean\"[]" - ], - "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "eventAnnotation", - "id": "def-common.queryPointEventAnnotation.args.ignoreGlobalFilters.help", - "type": "Any", - "tags": [], - "label": "help", - "description": [], - "signature": [ - "any" - ], - "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "eventAnnotation", - "id": "def-common.queryPointEventAnnotation.args.ignoreGlobalFilters.default", - "type": "boolean", - "tags": [], - "label": "default", - "description": [], - "signature": [ - "true" - ], - "path": "src/plugins/event_annotation/common/query_point_event_annotation/index.ts", - "deprecated": false, - "trackAdoption": false - } - ] } ] }, @@ -2784,7 +2754,7 @@ "section": "def-common.KibanaQueryOutput", "text": "KibanaQueryOutput" }, - "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; ignoreGlobalFilters?: boolean | undefined; label: string; color?: string | undefined; isHidden?: boolean | undefined; icon?: ", + "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; label: string; color?: string | undefined; isHidden?: boolean | undefined; icon?: ", { "pluginId": "eventAnnotation", "scope": "common", @@ -2831,7 +2801,7 @@ "section": "def-common.KibanaQueryOutput", "text": "KibanaQueryOutput" }, - "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; ignoreGlobalFilters?: boolean | undefined; } & StyleSharedProps & { icon?: ", + "; timeField?: string | undefined; extraFields?: string[] | undefined; textField?: string | undefined; } & StyleSharedProps & { icon?: ", { "pluginId": "eventAnnotation", "scope": "common", diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index ec76fb35f8884..9af9312be9da9 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualization | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 174 | 31 | 174 | 3 | +| 172 | 30 | 172 | 3 | ## Client diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 1f58efb3f1165..c817224197a40 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 0acbbbba6eb7c..91ef1ce4fa033 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index a1c772ceed404..07458f24ff6f3 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index a10366cf1dc59..981e2bb3db509 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 5888d6ae2320a..b97b7e7fdcd8e 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index d4be3ce83edc1..1867bdc77007b 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 8a6a6571d3eac..d7fec5ff2f918 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index d35a196408fe0..eb0d7df69ec97 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index a3a100285a9cc..ca1582f4ecd29 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 1b7c8e0c659c4..91003e6b576e6 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index ec59989fb19f7..7c6dccc0bdcc8 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index f96245c37e79e..18d9f86455753 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index f79a9e05eeff5..3705438c2e471 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 8cc931870c59c..9b0f7c44ff4cf 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 1cbbcb39723ea..9bcdc67117f0a 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 8ddc81d8d3e2b..f9e09315992fe 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 42876db3e3c35..1f3bc971b0a44 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index b909d0be6a8bb..68700b01302fc 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 9f653a485425c..d7658be3fd8af 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index a2bde62d32a80..ca8f27a43acff 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 852bba6a41062..2c923d56ecf2e 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 3ec56b522f9da..b589a7728e2a7 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index f6a4e6b5133cb..fd4863adaa1ed 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index e814b32772357..3f1c3297450f1 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 1d042375a2349..a5d4151059bf0 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index dbf2e440791ce..44ee3b51f0b8d 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index fe4e515eddcab..0b6d899f10905 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 155760c633bcc..ac8412c33ee61 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index cac24ef801d81..18e90f58ac3d6 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index c35a1e7c19a92..1ae2ebdff17c6 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index e371b94a95226..d97c41e905cc2 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index a597d2b44caf9..cc4b4865650c8 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 52b42a5cc0bc5..ae626ad3bcd9a 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index e6c39b55007e5..f6af53d79ac17 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index b922a643c926d..d720badba720b 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index f9e6642219e3c..a5c54ea501de8 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 5099b1219356f..58ff9ffa1f997 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 024f36dcf956b..3b4ba251d9181 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index dab83ed78a60d..b016a29fca54c 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index c5fab5a5d9f01..01cdce28fc87f 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index a3eeada197886..85797f0d427ca 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 5bea6ea6abfe7..5d11a15625d35 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 746e8a3fe2947..f9adf1107b7b6 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index aba968dbff9e6..17fd26624c307 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index ebab070262aa9..8d91a72ad7cd9 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index bdee46b411068..ef2bc39a0c359 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index a5cd5e9a09eed..69f22fe49498f 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 8ae158deec95e..a6ed789c9dca4 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 49fde20e8120a..085132c0e069b 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 643a03a884f35..89c83444f155e 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 908110e4376f1..5d456ef4df690 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index d2cce0b2a83ba..abd486934e17b 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 00d95e1335b01..227f22715683b 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 8ee317714c6b7..b5ee6c2fb7e5b 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_inspector.mdx b/api_docs/kbn_content_management_inspector.mdx index 890308e272d21..88fc60bb6ffa7 100644 --- a/api_docs/kbn_content_management_inspector.mdx +++ b/api_docs/kbn_content_management_inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-inspector title: "@kbn/content-management-inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-inspector plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-inspector'] --- import kbnContentManagementInspectorObj from './kbn_content_management_inspector.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index f4b2863fe2f00..04a7b2645818e 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index b38742eba4fc7..2f4960b38bd4f 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index d60f4f2897afc..a435093554208 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index b0d1f945f2e45..2f1238b3beb77 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 71bacffadddee..c6624c698443a 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 6df2ff849423b..937ddc9f61dee 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 1bd68d7210692..2e335c981ea28 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index d0dcf4678e235..a5b58c3461f44 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 59c95794c7912..bbe3cff5cef12 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index fdb4d1a85fc52..64f3162ce1fe6 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 67d8a3d8b6c81..f4e1e4702a5ec 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index c454c3920b812..6ad62713c631b 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index e9460aa1653b6..3322bcab57ab7 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 3a60412a55ef4..c9b5921f66202 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 9e872e0b708c5..13b021f671bf2 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 79fc6fbb25c3d..ce64298c526a2 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index dd686130688ae..238fa7761004b 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 2470b934b9949..c041b1a625d51 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 16ea316853d03..c86493965e7a4 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 98e4e9de830d5..603e3073e3429 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 3be57ab9908eb..b515b4316118c 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index ee1615c203b34..53eed543f5d7e 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index b1f0a93267445..b0cb6ea1c2c4f 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 6cbf9cd8c2d15..f8ace8ac0098a 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index d6cfb232b8cb3..59e75648ddb23 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 9f96971e1a208..be026079e2b9d 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 50b971a9d3ebf..8b2db0ad54e73 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 047fd3b6b7f92..622dcee68f39e 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index c21022f7379ad..6b317e30a3e64 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 0b77abeb5ee51..f3a0056ea7f83 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 1ab18bc04b457..6b0f7c67c2d43 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index e21a3d48fa475..92ce7fbc339e9 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index bb49b76d2f262..d13b1f6a31b9a 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index bc6708c61d560..f618f4a842d5f 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 9eb129c489e11..711797cd66719 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index bb7a91e2ccb02..378bf192bf89e 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 449e4db39a119..51a66a9126641 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index b6dcccc5cf616..b98d7b91a8165 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 73cdc3717fd1c..031c7a8a9953b 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index c419e76a04c08..45a0d0f290429 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index eef60aa14ec8e..056e958330496 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 615ccf859792f..4b806754ba62c 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 37c73419ab18f..6bc4c6d2f27d0 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 343c414dcce9b..372ded600db49 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 13db2d9ed22e1..411f1717c88a0 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 1de207fe3dcf8..f19de66d763ef 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index fa69ac6dbcee5..916ec0ae26927 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index c65fe46aa360c..19a29b7bad177 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 65eff4ee3bfdc..f1d59a1f8ccfc 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 9ddec218c2870..6b3f8003de270 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 1ead3f39f926c..f450916d8cb6a 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 0997609be78f4..1e95cc2c44978 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 4c1079029271c..dedb0eef2dc7b 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 0aecb0f781c92..12d30abe6c8ce 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 444aaa249e5e2..2102457befe0d 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 9fe6ce9dd6b0e..52c150656d6c3 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index d41a257ede6cd..f503cdd92a543 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index ec373edf96dab..68a0273a36e08 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 79747b1fe3cac..df5cbbee007cc 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index ce820ceedebb8..7c45759871a03 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index bbf3082b502db..09a4b696e3dba 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 392cbe3a4dbbd..8292cfa9869e9 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 5015bfe59fc64..74c92566eea1e 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 2619224394dc3..1afb462a64e37 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index c2ec87c2abf99..c58eb1dfbda53 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index c3188e158adcc..ceed5a860cc47 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index c180eebfd34a0..935348fef9c68 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 0a5448e2b2627..85122627bdd5e 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 788246a2505da..4a0d1b67d6b03 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index a5bbd26289b36..5a5ccccd91860 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 9fc4ed85f9174..49bec8891fbdf 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index 38a139e8581df..a5a7b02284135 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index c8e35188ac228..8a7df4633308f 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 92c7ab4f6bf56..b2dd36629d0b4 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index ad8e81eb8462c..58a87b491771f 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index dd1b520179260..ba96350651909 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 3c1ece2e38c66..bd15450144eb5 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index c25942c344ea0..dfe35893a012f 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 7b8435f096321..68aa431df2a0e 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index f89c6a19520ff..2ad0bdfcc1486 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 70a17bb0cd45d..18259c8f44775 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index b69bb20d34417..9053d6228e787 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index ef6d1701b294c..b01bc8892a40b 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index dcbe6b1a2fea0..2fc4a238be6c5 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 3b50bb85f8d1e..9b60780a28751 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 89d5777668d40..c2bc51d316d12 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index d3f723a4a76d6..3f6e7ed663bf4 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index cc9fcfa3e3c33..f7f8a6aea85f5 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index dc8696fb0b75e..d6885fc52b3ef 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 225854b3c4b35..663b01490fa9e 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index b30d11a80c1d6..a679a5ac3c5a5 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 09e170830d9b4..f5e2239b01c7a 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 250dd132e2d7a..d0de4025fd880 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 9b4bceb960912..f92061c7b8d39 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 83a84bcd441dd..c95974db63276 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 19e5f33326f63..1a3e11c344c70 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index bf19bbd008755..91aebefa1f048 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index e2fba059abcbc..13c28c45fc0aa 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 350c181edc280..d22d360b114fe 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index e114411ccc57f..cc58f6b9a96b2 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 19b19fc967a60..0854f97395b38 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 01ce6d08ec59e..8ca92cc3b25e3 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index f89ddb4e48a7b..3ed2bd1d32558 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index f3d3cfb6fedb0..cca5ebb0e7c1b 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index eb2d58a552663..2879e189ca3b1 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 9cc1b7a7d7669..cb14be00b8ccc 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 088069837a02d..5ced9ef5a6e0a 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 688e7c20089b6..ea9785930fab1 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index abf4b7e3c447c..389b089eda875 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 133a238bd9134..82d08a517d442 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 448dc09808350..5a8ae52e5a862 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index 47b053d8f0bb0..937c58a86fd66 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 4a14f6e69bfec..da54b6bff9651 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index f890c75c6f3d7..d5279863c7bce 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 63f7e8ab63161..b973ba0ca06ae 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 874252d47a192..a9eac7864a6e3 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index a7abb6523835e..5ac09cc531069 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 180c20b6f0eeb..1dfe736629987 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index cf0976d766a30..aea5b2604ecfb 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index e31fb1e867d3f..362f52c766fa6 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 49e56ca554cd5..24d594ae0896a 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 478eac47f3c35..4387fabcdba9f 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 89a742bccaa53..df292a0bc3253 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 8cb3bf0b85c09..94dc18a09e970 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 5578a191823be..9d945e33e9742 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 7e6a40a93b95c..ee65fc9c0748a 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 150571931628e..5fbaeddd41718 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index a0733335f1e40..e24ebeaf94a4c 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 03b68e1570561..35ef1015b86db 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index e0aaa0f65b2d5..bb7da97b180cc 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 5d6bf6a591cda..7a2f20d4f886b 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 9ab4595691377..3a5b5d8cf46a5 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index f55d46a820ad5..f8b1510ccbfc2 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index c2836721af567..ad00dfdb73abf 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index e2e933b305768..cfe257e76ef7f 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index e0d52ff9dc360..f6e4657ea5fb4 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 6e9a0014441b5..d1714f54207f0 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index a5e73ccde5d03..89b26220e95bf 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 26b0badb9d46d..a03e40ba375f6 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 098b95ae64fca..90d7df7eb6267 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 31b56b2da1b45..2e7208dcd07ab 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index b62c7a3beb8c4..3d74ba71fbc1f 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 47b64e5d142a9..b74ff3623ee3d 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index d40383f9497e7..6da526e3df3a9 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index e3a4dde44035f..56422a1bacaf6 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 0f64d5a725b14..7a00501954651 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 97a492eaf56d9..e233caf3bbbbb 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index a18eb7fa23f1d..fd63e63ed2872 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index bb2641fbe77f3..214be2ae35939 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 87ee4585a82c0..fd959914f650e 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index e893bbb052621..4724e1cdbe8f2 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 949d95b1bcc89..e12e116bf6785 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index a45e899cf7291..1dfc780bf4f3c 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index ad5aebc98a602..e8d907c4cd0bd 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 11f317e21ecad..4dff69e8cc85e 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 721020d6a9ba6..3febd844f1a14 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index 50c2d3b0fed7a..ea3e6bd91ea30 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -300,7 +300,7 @@ "label": "enterpriseSearch", "description": [], "signature": [ - "{ readonly apiKeys: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsWorkplaceSearch: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly ingestPipelines: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly mailService: string; readonly start: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" + "{ readonly apiKeys: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsWorkplaceSearch: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly ingestPipelines: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly mailService: string; readonly start: string; readonly syncRules: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index a187a2496b288..083cba82c4070 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 65a053414375c..32ce212d5ffc6 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index fed499f6aa307..ee51d5a66f5d8 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 361e3ba02da15..d5c3a1084bfe0 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 283b663228d1c..91d56f9c07b54 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index c80a692a4a0c1..dc50eb4c5c855 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 3565116e5645d..0c705b09cdfa4 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index d69981f14c86a..55673a9bbe889 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 3285df69060eb..b3b6878c32809 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 31d58a0309f54..31d112715f1cd 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 3c482519f1b23..8b02906bd401a 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 635e2abe39359..cba7e7c1f50a7 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 9fc69118eb12c..d2190b195ee93 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index 68bc5cc596416..9f577b030afb9 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index bf5be306ce157..af5a2fef09348 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 647945cccfc78..9484fd624fe0f 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index d3bcad5dedf9b..8f38f33cad50c 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index cf5d534df5221..b259170068fd8 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 23f948f99f104..a1d4bc678d3b7 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 4d59489cf4502..775183ce78d74 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index ca775278d7784..e68413d12ace6 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 1070197364876..cdc35dd62c52f 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 4a5620756c9ee..e1024cd821d08 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.devdocs.json b/api_docs/kbn_interpreter.devdocs.json index 6da1bcc3242c3..2247b5001b0fe 100644 --- a/api_docs/kbn_interpreter.devdocs.json +++ b/api_docs/kbn_interpreter.devdocs.json @@ -752,6 +752,52 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/interpreter", + "id": "def-common.typedParse", + "type": "Function", + "tags": [], + "label": "typedParse", + "description": [], + "signature": [ + "(input: string, options?: ", + "ParserOptions", + " | undefined) => any" + ], + "path": "packages/kbn-interpreter/src/common/lib/parse.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/interpreter", + "id": "def-common.typedParse.$1", + "type": "string", + "tags": [], + "label": "input", + "description": [], + "path": "node_modules/@kbn/ambient-common-types/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/interpreter", + "id": "def-common.typedParse.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "ParserOptions", + " | undefined" + ], + "path": "node_modules/@kbn/ambient-common-types/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "interfaces": [], @@ -937,21 +983,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/interpreter", - "id": "def-common.typedParse", - "type": "Any", - "tags": [], - "label": "typedParse", - "description": [], - "signature": [ - "any" - ], - "path": "packages/kbn-interpreter/src/common/lib/parse.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 6575b761e4c20..4de38b56ea175 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; @@ -21,7 +21,7 @@ Contact Visualizations for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 50 | 13 | 41 | 0 | +| 52 | 12 | 41 | 0 | ## Common diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 8327ccb3ceb15..1452f07d79dc8 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 47033eca12dcc..aee532027bafa 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index c3612f39c98f2..204bd0485557f 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 8419ed286ed0b..3b26f98d0d1d5 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 09a431da3e5c4..f34d1730364c5 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 51ab314b5007c..af6be9ee75609 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 38d28ef180a2d..7c3c9187e4a21 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 2ad2db52913fe..8d8db42528215 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 2f793d1546713..832b41533616a 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 2ff035a1f0fa7..5319fcee01c11 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 2f85f639c7706..1377f92823029 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index e2ccd404d8140..2ed9524986b02 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index e8636da76e9b2..34c3cb5b19e59 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index f2267c58fd66c..ec0a340c8e95e 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 380c73b507905..34b2bb6194f4f 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index d5010ad348cde..334a458a6b5ab 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_peggy.devdocs.json b/api_docs/kbn_peggy.devdocs.json new file mode 100644 index 0000000000000..7b6c4f5341d94 --- /dev/null +++ b/api_docs/kbn_peggy.devdocs.json @@ -0,0 +1,416 @@ +{ + "id": "@kbn/peggy", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.findConfigFile", + "type": "Function", + "tags": [], + "label": "findConfigFile", + "description": [], + "signature": [ + "(grammarPath: string) => ", + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Config", + "text": "Config" + }, + " | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.findConfigFile.$1", + "type": "string", + "tags": [], + "label": "grammarPath", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.getJsSource", + "type": "Function", + "tags": [], + "label": "getJsSource", + "description": [], + "signature": [ + "(options: ", + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Options", + "text": "Options" + }, + ") => Promise<", + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Result", + "text": "Result" + }, + ">" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.getJsSource.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Options", + "text": "Options" + } + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.getJsSourceSync", + "type": "Function", + "tags": [], + "label": "getJsSourceSync", + "description": [], + "signature": [ + "(options: ", + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Options", + "text": "Options" + }, + " & { content: string; }) => ", + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Result", + "text": "Result" + } + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.getJsSourceSync.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Options", + "text": "Options" + }, + " & { content: string; }" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Config", + "type": "Interface", + "tags": [], + "label": "Config", + "description": [], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Config.path", + "type": "string", + "tags": [], + "label": "path", + "description": [ + "the path of the discovered config file" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Config.source", + "type": "string", + "tags": [], + "label": "source", + "description": [ + "the content of the config file as a string (primarily for hashing)" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Config.parsed", + "type": "Any", + "tags": [], + "label": "parsed", + "description": [ + "the parsed content of the config file" + ], + "signature": [ + "any" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options", + "type": "Interface", + "tags": [], + "label": "Options", + "description": [], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.path", + "type": "string", + "tags": [], + "label": "path", + "description": [ + "\nThe path to the peggy content. If this is not defined then\nconfig files can not be found and `content` must be passed." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.content", + "type": "string", + "tags": [], + "label": "content", + "description": [ + "\nPrevent loading the content from disk by specifying it here" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.config", + "type": "Object", + "tags": [], + "label": "config", + "description": [ + "\nPrevent loading the config from disk by specifying it here" + ], + "signature": [ + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Config", + "text": "Config" + }, + " | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.format", + "type": "CompoundType", + "tags": [], + "label": "format", + "description": [ + "\nWhat type of module format should the generated code use. Defaults to\ncommonjs for broadest compatibility" + ], + "signature": [ + "\"esm\" | \"commonjs\" | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.optimize", + "type": "CompoundType", + "tags": [], + "label": "optimize", + "description": [ + "\nShould the parser optimize for execution speed or size of the code" + ], + "signature": [ + "\"size\" | \"speed\" | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Options.skipConfigSearch", + "type": "CompoundType", + "tags": [], + "label": "skipConfigSearch", + "description": [ + "\nDisable checking for a config file a `{basename}.config.json` in\nthe same directory as the grammar file." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Result", + "type": "Interface", + "tags": [], + "label": "Result", + "description": [], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Result.config", + "type": "CompoundType", + "tags": [], + "label": "config", + "description": [ + "\nThe source code of the module which parses expressions in the format\ndefined by the peggy grammar file" + ], + "signature": [ + { + "pluginId": "@kbn/peggy", + "scope": "server", + "docId": "kibKbnPeggyPluginApi", + "section": "def-server.Config", + "text": "Config" + }, + " | null" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.Result.source", + "type": "string", + "tags": [], + "label": "source", + "description": [ + "\nThe loaded config if it was found" + ], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/peggy", + "id": "def-server.VERSION", + "type": "string", + "tags": [], + "label": "VERSION", + "description": [], + "path": "packages/kbn-peggy/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_peggy.mdx b/api_docs/kbn_peggy.mdx new file mode 100644 index 0000000000000..ecf30ce24fb9f --- /dev/null +++ b/api_docs/kbn_peggy.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnPeggyPluginApi +slug: /kibana-dev-docs/api/kbn-peggy +title: "@kbn/peggy" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/peggy plugin +date: 2022-11-23 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/peggy'] +--- +import kbnPeggyObj from './kbn_peggy.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 21 | 1 | 10 | 0 | + +## Server + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index fa6ad0b5312bb..e337263bc39e0 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 14dc9a58bde30..d77153711a878 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 27a9e235e156c..32c31cdb3ed0e 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 46a9490185b60..95f6080b94ccf 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 601c57c40b7b4..55ca53949c22b 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index a1ee7bb80e944..64f00819636c0 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 312198f71e16b..0ae58fafd5acc 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 07f85d9498b7c..8dde75f3c6b13 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 03d0355872c2f..9812a20c795f5 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 67c05e20ec96a..99019b09db54d 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 1d5854ccf516d..5be5c7b9ee4b5 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 46d077447abfb..41e125b3966e8 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index c4b9cd5280610..9374cfb55489b 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index b820b348fe2c6..b7519b598182a 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index da489992a3489..a389dba5710db 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 8ed433fc554e8..0db6e18d3c5d6 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index cef6589c7121b..fed2404f37a3f 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index d0dbc93f0dafa..d62bba3cfa533 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 1603aa4917cb4..c924658c3199e 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 26c6065eb7eca..d9e7515a86ff5 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 394becbef4053..06bed9741a35b 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 22c219d22cd44..3252aa6b5973d 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 7030c81a5cbe9..1a85ef844b589 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index daee0e48a152d..eb7b5be87976f 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 38ddcc236312b..ddaab2a636eb5 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index e6ed1a2abbd36..4fb3c30c1f90f 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 28f3d441b9d49..7d13bcb5b909d 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index 4e73d5fe7000f..f9fdd5d571d94 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 3cd5e6a5393bf..a74f6d8022cfd 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index c942b397fe359..2aaf07cf64a1e 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index fb61da218ef5e..e4c7e43c31cd6 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 5d9bc8a530c1d..7c8455555f62d 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 4755a2f90a784..811d36fad0c8c 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 293335c7eeb2f..f2c3787d5d432 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 67cc4e57e6f5e..b3216e94c6c13 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 2b789946c4075..9dead067c85ab 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index bf87166fe3c57..3aa9054ac18d1 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 4f3c0c76979c5..4a90e38611a43 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index d1f1769a2c50a..fd8d9953a4385 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 9efc1f2ff3f8e..bd91b7efb1fd4 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 5672dfc62f5b2..adfd9ed7b4059 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 1f26fdbe51262..c01f09d3d0595 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 44c8c21e54ae8..0d9362a965bcb 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index fe42fdfb8d028..79c48f96cd5c1 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 2c237ba0852d0..bde790859562e 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 0a3f75264f609..a37e6d86e3293 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index e1c082da5cffe..8e95012f26e35 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index c4fd4654c6364..374499721b80f 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index c13b12f4be5be..9e3de68c668e1 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 2e31ff6c01aab..45dc3c99e9279 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index c640702557a95..7205f9fa0cdfa 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index bfee23224b87a..facaba6ce8ecb 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index a64280f9ccb9c..bb270711f2785 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index e4ae309d076cc..0e4a54a528be1 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index 754039ddc408b..66790119b1006 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index f9fc0c9ee2834..32fadf3c74029 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index e72669d20e9a9..61c6fe46b5a38 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index f6c8b0e3caa4c..95aa6b7218413 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 2033049e0db97..432aed675d556 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.devdocs.json b/api_docs/kbn_test.devdocs.json index c8dd06291eab2..71146e0174054 100644 --- a/api_docs/kbn_test.devdocs.json +++ b/api_docs/kbn_test.devdocs.json @@ -487,6 +487,22 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/test", + "id": "def-server.EsVersion.toJSON", + "type": "Function", + "tags": [], + "label": "toJSON", + "description": [], + "signature": [ + "() => string" + ], + "path": "packages/kbn-test/src/functional_test_runner/lib/es_version.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/test", "id": "def-server.EsVersion.toString", diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 2a1d32d256cc3..0d06642c01832 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; @@ -21,7 +21,7 @@ Contact Operations for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 264 | 4 | 220 | 11 | +| 265 | 4 | 221 | 11 | ## Server diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 6cf5d4b1aab74..5898576bc0dcf 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index c515721889e23..f66fb13303436 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index fe4a9f01ee995..1f015df355310 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index c4b8260d9f278..849f264146d35 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index d019eae18234a..37dadc9e00c59 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index b3363f9e947ab..e56087ba67009 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 09bff7986b475..b559613d178a0 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 182d67f635712..1383cff94ab21 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 4800d9ad03b55..d83c7afce15c6 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 8603018fe3981..c78a07e142e04 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 4b6e59b1e13f9..d78d6654c7a68 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index b5b5cf337fea2..6428e4af88d38 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 4fc98591c2d8a..225287b59e294 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index c24319c87e6c1..207006d085949 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 17b9c4fe8259c..9361f28b3111a 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 5e47164695208..092537ecc8044 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index de0c12f1d634f..4efbc1c5ede34 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index e965cca884f7e..c0b2e565917d5 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index d71b55a18a7cc..cef227a8dae64 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index f5872a88705d8..0543842b02eca 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.devdocs.json b/api_docs/licensing.devdocs.json index 682c8d781850b..75ac7584f1510 100644 --- a/api_docs/licensing.devdocs.json +++ b/api_docs/licensing.devdocs.json @@ -602,6 +602,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts" @@ -1897,6 +1901,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts" diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index cb259d51a9cd8..a062581001619 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index d736caa59fa05..fc5d36a27fb0b 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index d90efa9ab0383..14847f8531304 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 44550b24f13f0..9f831aaa7c09f 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 50406700acf16..353ba725be719 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 32a2462067741..04161bb6b9daa 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index bd4811b2c6a31..ec3f11657d834 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index c4af1d7adfe0a..0dc7a801e0366 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 2a754d986adb4..98cf790b2d6da 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index a95e5825eabe5..b6fdb380cc5a3 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 1b09a6b360244..1c24d7ba90028 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index ba13f19061bbb..f8999bf83cbe4 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -1559,6 +1559,23 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.useTimeZone", + "type": "Function", + "tags": [], + "label": "useTimeZone", + "description": [], + "signature": [ + "() => string" + ], + "path": "x-pack/plugins/observability/public/hooks/use_time_zone.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.useTrackMetric", @@ -2486,6 +2503,20 @@ "path": "x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-public.FetchDataParams.timeZone", + "type": "string", + "tags": [], + "label": "timeZone", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index bcbf3577d0aea..0491d7f5f3e81 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 567 | 42 | 564 | 31 | +| 569 | 42 | 566 | 31 | ## Client diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index b03af5e062799..75e49b3ad0075 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 0f0ec053aedd2..0c6f996d0a3f8 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 512 | 430 | 39 | +| 516 | 431 | 40 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 33617 | 518 | 23351 | 1131 | +| 33640 | 517 | 23362 | 1130 | ## Plugin Directory @@ -43,11 +43,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | cloudFullStory | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers FullStory as a shipper for telemetry. | 0 | 0 | 0 | 0 | | cloudGainsight | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers Gainsight as a shipper for telemetry. | 0 | 0 | 0 | 0 | | cloudLinks | [Kibana Core](https://github.com/orgs/elastic/teams/@kibana-core) | Adds the links to the Elastic Cloud console | 0 | 0 | 0 | 0 | -| | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 18 | 0 | 2 | 3 | +| | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 17 | 0 | 2 | 2 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 237 | 0 | 228 | 7 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2796 | 17 | 1007 | 0 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | +| customBranding | [global-experience](https://github.com/orgs/elastic/teams/kibana-global-experience) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 107 | 0 | 88 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 121 | 0 | 114 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | @@ -65,7 +66,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 51 | 0 | 44 | 0 | | | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 9 | 0 | 9 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 114 | 3 | 110 | 5 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 174 | 31 | 174 | 3 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 172 | 30 | 172 | 3 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 115 | 0 | 115 | 11 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 58 | 0 | 58 | 2 | @@ -121,7 +122,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 2 | 0 | 2 | 1 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 567 | 42 | 564 | 31 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 569 | 42 | 566 | 31 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 21 | 0 | 21 | 4 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 227 | 7 | 171 | 12 | @@ -394,7 +395,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 51 | 0 | 48 | 0 | | | Kibana Core | - | 61 | 0 | 1 | 0 | | | [Owner missing] | - | 43 | 0 | 36 | 0 | -| | Visualizations | - | 50 | 13 | 41 | 0 | +| | Visualizations | - | 52 | 12 | 41 | 0 | | | [Owner missing] | - | 20 | 0 | 20 | 2 | | | [Owner missing] | - | 13 | 0 | 13 | 0 | | | [Owner missing] | - | 64 | 0 | 59 | 5 | @@ -411,6 +412,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 47 | 0 | 46 | 10 | | | [Owner missing] | - | 51 | 5 | 34 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the osquery project | 62 | 0 | 62 | 0 | +| | [Owner missing] | - | 21 | 1 | 10 | 0 | | | [Owner missing] | A library to convert APM traces into JSON format for performance testing. | 3 | 0 | 3 | 1 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | Just some helpers for kibana plugin devs. | 1 | 0 | 1 | 0 | @@ -470,7 +472,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 4 | 0 | 2 | 0 | | | Operations | - | 41 | 2 | 21 | 0 | | | Kibana Core | - | 2 | 0 | 2 | 0 | -| | Operations | - | 264 | 4 | 220 | 11 | +| | Operations | - | 265 | 4 | 221 | 11 | | | [Owner missing] | - | 135 | 5 | 103 | 2 | | | [Owner missing] | - | 2 | 0 | 1 | 0 | | | [Owner missing] | - | 72 | 0 | 55 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 2604efd933511..77bac0817c325 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 411562d512058..90519a5b374b6 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 88d16cab1801c..ccda5bbd6dab4 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index f40a51eb67d49..c109729addfce 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 9f5819aa2bd75..9fd2718014fde 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 73693a4dc2e47..e2ba36825bab3 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 8f07c8b0369c1..e6305c2b8936e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 40760f0b885b3..6e0379569dd62 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 105c54b2eca8f..9a5b330ca67f0 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 84d49e1306bb5..57c8f84966a4a 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index be4ac71b9a5c0..e6ef1600adc7c 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 3b1bcf12df61d..98e5f345c9aa8 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 497456ec95fd5..b3565c26913fb 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index ea239153e7456..719073c828821 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 2ee9a4490155f..5dea833291d2d 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 5cb299651c33d..0c69afaa6f582 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index ff014f7e41434..260d4fd22236b 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index aa856cca59519..da57f42b5ce87 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 5c0238261d862..9b3b6cea9f9d6 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 814448064c8d4..ae62a062f4161 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index e32fa32b29611..664a7da0099af 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index d5529e87777f1..467b9c366efd8 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index e779f36d11f1e..314575225cb44 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index e3bcef1271526..8ba3d36fa0eb4 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 6ab5e33530cad..0311990fffd9e 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 7385bef6a5f02..0668135ed5cc1 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index eaf32f4920d4f..e47431171911b 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 6080113e6fe83..c1a983d8f286e 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index e26357d0151dd..849240bac724a 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index e7a42d0f71977..2ff5ccabc87eb 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index f70b13c5a9e96..af65f18a7b69a 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0a22a2c81238c..af3a659d80605 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index e87e181e5f24b..b73140a370233 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 6a52d99d5c22e..f04b294447fe7 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index bf40e7776f848..c5b8122e1b037 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 769cb85a68fa5..2e955c9dfe55d 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 50b02cd415471..50046b7e1087e 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index c101201cdeec1..9ce76f8ac7e27 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 6f1fd683237a3..576e39ee42c67 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 51a7e7373bb80..3771be78f36d0 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index fbc60034a829d..246a804780f8b 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 9f839bdb7e3e4..24372f733eaa0 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 8234930ac3303..164e3fb7b6a50 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 04d1ff808fead..54219b6fa81cf 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index ee28b761358f2..fcaaac431f63f 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 6d2ae98bc3da9..2c2f642afd39b 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 8baf3581e86e1..2c54cc1844d4a 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index eff6efeccaa3f..fea9fdf21f218 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index de3a55d3239a6..93758c0d9dbd2 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index c33be76c9e065..c90a8cfcb87a2 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index fc0d42be3620a..c181aa31a47da 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index a8941d42d2287..c554356e7a3ab 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-11-21 +date: 2022-11-23 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/dev_docs/operations/operations_landing.mdx b/dev_docs/operations/operations_landing.mdx index 9004141255f58..b38570ea44d13 100644 --- a/dev_docs/operations/operations_landing.mdx +++ b/dev_docs/operations/operations_landing.mdx @@ -64,6 +64,7 @@ layout: landing { pageId: "kibDevDocsOpsExpect" }, { pageId: "kibDevDocsOpsAmbientStorybookTypes" }, { pageId: "kibDevDocsOpsAmbientUiTypes" }, + { pageId: "kibDevDocsOpsAmbientCommonTypes" }, { pageId: "kibDevDocsOpsTestSubjSelector" }, { pageId: "kibDevDocsOpsBazelRunner" }, { pageId: "kibDevDocsOpsCliDevMode" }, @@ -77,5 +78,7 @@ layout: landing { pageId: "kibDevDocsOpsManagedVscodeConfigCli" }, { pageId: "kibDevDocsOpsTest" }, { pageId: "kibDevDocsOpsEsArchiver" }, + { pageId: "kibDevDocsOpsPeggy" }, + { pageId: "kibDevDocsOpsPeggyLoader" }, ]} /> \ No newline at end of file diff --git a/docs/api/actions-and-connectors.asciidoc b/docs/api/actions-and-connectors.asciidoc index 991dfb5ade1d4..1e8b5d426e310 100644 --- a/docs/api/actions-and-connectors.asciidoc +++ b/docs/api/actions-and-connectors.asciidoc @@ -1,27 +1,26 @@ [[actions-and-connectors-api]] == Action and connector APIs -Manage Actions and Connectors. - The following connector APIs are available: -* <> to retrieve a single connector by ID +* <> to retrieve a single connector by ID -* <> to retrieve all connectors +* <> to retrieve all connectors -* <> to retrieve a list of all connector types +* <> to retrieve a list of all connector types -* <> to create connectors +* <> to create connectors -* <> to update the attributes for an existing connector +* <> to update the attributes for an existing connector -* <> to execute a connector by ID +* <> to execute a connector by ID -* <> to delete a connector by ID +* <> to delete a connector by ID For deprecated APIs, refer to <>. -For information about the actions and connectors that {kib} supports, refer to <>. +For information about the actions and connectors that {kib} supports, refer to +<>. include::actions-and-connectors/create.asciidoc[leveloffset=+1] include::actions-and-connectors/delete.asciidoc[leveloffset=+1] diff --git a/docs/api/actions-and-connectors/create.asciidoc b/docs/api/actions-and-connectors/create.asciidoc index b277a49d43723..cdaab61e5581e 100644 --- a/docs/api/actions-and-connectors/create.asciidoc +++ b/docs/api/actions-and-connectors/create.asciidoc @@ -15,9 +15,8 @@ Creates a connector. === {api-prereq-title} -You must have `all` privileges for the *Actions and Connectors* feature in the -*Management* section of the -<>. +You must have `all` privileges for the *{connectors-feature}* feature in the +*Management* section of the <>. [[create-connector-api-path-params]] === {api-path-parms-title} diff --git a/docs/api/actions-and-connectors/delete.asciidoc b/docs/api/actions-and-connectors/delete.asciidoc index 1ef917f58d24f..fcf3ca3e8b69e 100644 --- a/docs/api/actions-and-connectors/delete.asciidoc +++ b/docs/api/actions-and-connectors/delete.asciidoc @@ -19,7 +19,7 @@ WARNING: When you delete a connector, _it cannot be recovered_. [discrete] === {api-prereq-title} -You must have `all` privileges for the *Actions and Connectors* feature in the +You must have `all` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/actions-and-connectors/execute.asciidoc b/docs/api/actions-and-connectors/execute.asciidoc index 8b046038b8d07..a3e10efc5720b 100644 --- a/docs/api/actions-and-connectors/execute.asciidoc +++ b/docs/api/actions-and-connectors/execute.asciidoc @@ -16,7 +16,7 @@ Runs a connector by ID. [[execute-connector-api-prereq]] === {api-prereq-title} -You must have `read` privileges for the *Actions and Connectors* feature in the +You must have `read` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/actions-and-connectors/get.asciidoc b/docs/api/actions-and-connectors/get.asciidoc index 2d5cc4edd4276..23266e1351d07 100644 --- a/docs/api/actions-and-connectors/get.asciidoc +++ b/docs/api/actions-and-connectors/get.asciidoc @@ -17,7 +17,7 @@ Retrieves a connector by ID. [discrete] === {api-prereq-title} -You must have `read` privileges for the *Actions and Connectors* feature in the +You must have `read` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/actions-and-connectors/get_all.asciidoc b/docs/api/actions-and-connectors/get_all.asciidoc index b2ebe316fc5b2..aced6e91914fa 100644 --- a/docs/api/actions-and-connectors/get_all.asciidoc +++ b/docs/api/actions-and-connectors/get_all.asciidoc @@ -17,7 +17,7 @@ Retrieves all connectors. [discrete] === {api-prereq-title} -You must have `read` privileges for the *Actions and Connectors* feature in the +You must have `read` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/actions-and-connectors/update.asciidoc b/docs/api/actions-and-connectors/update.asciidoc index 58056cb8085f9..16fb327e61931 100644 --- a/docs/api/actions-and-connectors/update.asciidoc +++ b/docs/api/actions-and-connectors/update.asciidoc @@ -16,7 +16,7 @@ Updates the attributes for a connector. [discrete] === {api-prereq-title} -You must have `all` privileges for the *Actions and Connectors* feature in the +You must have `all` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/alerting/create_rule.asciidoc b/docs/api/alerting/create_rule.asciidoc index 24abf15d02dea..b7c27b75c1801 100644 --- a/docs/api/alerting/create_rule.asciidoc +++ b/docs/api/alerting/create_rule.asciidoc @@ -21,7 +21,7 @@ the `consumer` and `rule_type_id` of the rules you're creating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, and *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. === {api-description-title} diff --git a/docs/api/alerting/mute_alert.asciidoc b/docs/api/alerting/mute_alert.asciidoc index 4feb03f72afdc..92c42e1be682c 100644 --- a/docs/api/alerting/mute_alert.asciidoc +++ b/docs/api/alerting/mute_alert.asciidoc @@ -20,7 +20,7 @@ the `consumer` and `rule_type_id` of the rules you're creating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, and *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. [[mute-alert-api-path-params]] diff --git a/docs/api/alerting/mute_all_alerts.asciidoc b/docs/api/alerting/mute_all_alerts.asciidoc index 329d05257d4f5..043b329a14dd4 100644 --- a/docs/api/alerting/mute_all_alerts.asciidoc +++ b/docs/api/alerting/mute_all_alerts.asciidoc @@ -20,7 +20,7 @@ the `consumer` and `rule_type_id` of the rules you're creating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, and *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. === {api-description-title} diff --git a/docs/api/alerting/unmute_alert.asciidoc b/docs/api/alerting/unmute_alert.asciidoc index d962b480b3ab8..6bda4cb5c039a 100644 --- a/docs/api/alerting/unmute_alert.asciidoc +++ b/docs/api/alerting/unmute_alert.asciidoc @@ -20,7 +20,7 @@ the `consumer` and `rule_type_id` of the rules you're creating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, and *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. [[unmute-alert-api-path-params]] diff --git a/docs/api/alerting/unmute_all_alerts.asciidoc b/docs/api/alerting/unmute_all_alerts.asciidoc index ea10b9434e918..7c0972bb0c53b 100644 --- a/docs/api/alerting/unmute_all_alerts.asciidoc +++ b/docs/api/alerting/unmute_all_alerts.asciidoc @@ -20,7 +20,7 @@ the `consumer` and `rule_type_id` of the rules you're creating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, and *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. === {api-description-title} diff --git a/docs/api/alerting/update_rule.asciidoc b/docs/api/alerting/update_rule.asciidoc index 19a9c7c0144b0..fe5e91212d7d1 100644 --- a/docs/api/alerting/update_rule.asciidoc +++ b/docs/api/alerting/update_rule.asciidoc @@ -20,7 +20,7 @@ the `consumer` and `rule_type_id` of the rule you're updating. For example, the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}* features, *{observability}*, or *Security* features. If the rule has `actions`, you must also have `read` privileges for the *Management* > -*Actions and Connectors* feature. For more details, refer to +*{connectors-feature}* feature. For more details, refer to <>. === {api-description-title} diff --git a/docs/api/cases/cases-api-find-connectors.asciidoc b/docs/api/cases/cases-api-find-connectors.asciidoc index aee6900155726..6968bc55d88bb 100644 --- a/docs/api/cases/cases-api-find-connectors.asciidoc +++ b/docs/api/cases/cases-api-find-connectors.asciidoc @@ -24,7 +24,7 @@ For the most up-to-date API details, refer to the === {api-prereq-title} -You must have `read` privileges for the *Actions and Connectors* feature in the +You must have `read` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. diff --git a/docs/api/cases/cases-api-push.asciidoc b/docs/api/cases/cases-api-push.asciidoc index 2eb8d70e4634e..5f7a0c268ff1c 100644 --- a/docs/api/cases/cases-api-push.asciidoc +++ b/docs/api/cases/cases-api-push.asciidoc @@ -20,7 +20,7 @@ For the most up-to-date API details, refer to the === {api-prereq-title} -You must have `all` privileges for the *Actions and Connectors* feature in the +You must have `all` privileges for the *{connectors-feature}* feature in the *Management* section of the <>. You must also have `all` privileges for the *Cases* feature in the *Management*, *{observability}*, or diff --git a/docs/apm/apm-alerts.asciidoc b/docs/apm/apm-alerts.asciidoc index d8ce1fafc783c..102a31be4c4a9 100644 --- a/docs/apm/apm-alerts.asciidoc +++ b/docs/apm/apm-alerts.asciidoc @@ -100,7 +100,8 @@ Click **Save**. The alert has been created and is now active! [[apm-alert-manage]] === Manage alerts and rules -From the APM app, select **Alerts and rules** > **Manage rules** to be taken to the Kibana **Rules and Connectors** page. +From the APM app, select **Alerts and rules** > **Manage rules** to be taken to +the {kib} *{rules-ui}* page. From this page, you can disable, mute, and delete APM alerts. [float] diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 099d147526eed..c2cad75d32e3f 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -464,6 +464,11 @@ The plugin exposes the static DefaultEditorController class to consume. |You can run a local cluster and simulate a remote cluster within a single Kibana directory. +|{kib-repo}blob/{branch}/x-pack/plugins/custom_branding/README.md[customBranding] +|This is a plugin to configure custom branding. +This plugin is currently under active development; do not use. + + |<> |Adds drilldown capabilities to dashboard. Owned by the Kibana App team. diff --git a/docs/management/action-types.asciidoc b/docs/management/action-types.asciidoc index 330f05734cb6a..9a48f3c9b9ae4 100644 --- a/docs/management/action-types.asciidoc +++ b/docs/management/action-types.asciidoc @@ -87,7 +87,7 @@ For a comparison of the Elastic subscription levels, go to [[connector-management]] === Managing connectors -Rules use connectors to route actions to different destinations like log files, ticketing systems, and messaging tools. While each {kib} app can offer their own types of rules, they typically share connectors. The *Connectors* tab offers a central place to view and manage all the connectors in the current space. +Rules use connectors to route actions to different destinations like log files, ticketing systems, and messaging tools. While each {kib} app can offer their own types of rules, they typically share connectors. *{stack-manage-app} > {connectors-ui}* offers a central place to view and manage all the connectors in the current space. [role="screenshot"] image::images/connector-listing.png[Example connector listing in the {rules-ui} UI] @@ -102,15 +102,16 @@ features. For more information, go to <>. [float] === Connector networking configuration -Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. +Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. [float] [[connectors-list]] === Connector list -The *Connectors* tab lists all connectors in the current space. The search bar -can be used to find specific connectors by name and type. The *Type* dropdown -also enables you to filter to a subset of connector types. +In *{stack-manage-app} > {connectors-ui}*, you can find a list of the connectors +in the current space. You can use the search bar to find specific connectors by +name and type. The *Type* dropdown also enables you to filter to a subset of +connector types. [role="screenshot"] image::images/connector-filter-by-type.png[Filtering the connector list by types of connectors] @@ -151,7 +152,7 @@ To import and export connectors, use the image::images/connectors-import-banner.png[Connectors import banner, width=50%] If a connector is missing sensitive information after the import, a **Fix** -button appears in *{rules-ui}*. +button appears in *{connectors-ui}*. [role="screenshot"] image::images/connectors-with-missing-secrets.png[Connectors with missing secrets] diff --git a/docs/management/cases/add-connectors.asciidoc b/docs/management/cases/add-connectors.asciidoc index 49176e5e8c035..dac588b99950d 100644 --- a/docs/management/cases/add-connectors.asciidoc +++ b/docs/management/cases/add-connectors.asciidoc @@ -20,9 +20,9 @@ appropriate {kib} feature privileges. Refer to <>. [[create-case-connectors]] == Create connectors -You can create connectors in *Management > {stack-manage-app} > {rules-ui}*, as -described in <>. Alternatively, you can create them in -*Management > {stack-manage-app} > Cases*: +You can create connectors in *{stack-manage-app} > {connectors-ui}*, +as described in <>. Alternatively, you can create them in +*{stack-manage-app} > Cases*: . Click *Edit external connection*. + @@ -47,7 +47,7 @@ configuration details. You can create additional connectors, update existing connectors, change the default connector, and change case closure options. -. Go to *Management > {stack-manage-app} > Cases*, click *Edit external connection*. +. Go to *{stack-manage-app} > Cases*, click *Edit external connection*. . To change whether cases are automatically closed after they are sent to an external system, update the case closure options. diff --git a/docs/management/cases/setup-cases.asciidoc b/docs/management/cases/setup-cases.asciidoc index 51165cd7c4691..9131a92e7049d 100644 --- a/docs/management/cases/setup-cases.asciidoc +++ b/docs/management/cases/setup-cases.asciidoc @@ -13,11 +13,11 @@ privileges: | Give full access to manage cases a| * `All` for the *Cases* feature under *Management*. -* `All` for the *Actions and Connectors* feature under *Management*. +* `All` for the *{connectors-feature}* feature under *Management*. [NOTE] ==== -The *Actions and Connectors* feature privilege is required to create, add, +The *{connectors-feature}* feature privilege is required to create, add, delete, and modify case connectors and to send updates to external systems. By default, `All` for the *Cases* feature includes authority to delete cases diff --git a/docs/management/connectors/action-types/email.asciidoc b/docs/management/connectors/action-types/email.asciidoc index f926d86e7767f..d348ede2f84e1 100644 --- a/docs/management/connectors/action-types/email.asciidoc +++ b/docs/management/connectors/action-types/email.asciidoc @@ -170,7 +170,7 @@ A string that corresponds to *Client Secret*. Should be stored in the [float] [[define-email-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define email connector properties. diff --git a/docs/management/connectors/action-types/index.asciidoc b/docs/management/connectors/action-types/index.asciidoc index 6bc2d7dac6983..87751a10328b7 100644 --- a/docs/management/connectors/action-types/index.asciidoc +++ b/docs/management/connectors/action-types/index.asciidoc @@ -59,7 +59,7 @@ A string that corresponds to *Execution time field*. [float] [[define-index-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Index connector properties. diff --git a/docs/management/connectors/action-types/jira.asciidoc b/docs/management/connectors/action-types/jira.asciidoc index aa6e92f965e82..b85e1361844e2 100644 --- a/docs/management/connectors/action-types/jira.asciidoc +++ b/docs/management/connectors/action-types/jira.asciidoc @@ -13,7 +13,7 @@ The Jira connector uses the https://developer.atlassian.com/cloud/jira/platform/ Jira connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. URL:: Jira instance URL. Project key:: Jira project key. Email:: The account email for HTTP Basic authentication. @@ -54,7 +54,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-jira-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Jira connector properties. diff --git a/docs/management/connectors/action-types/opsgenie.asciidoc b/docs/management/connectors/action-types/opsgenie.asciidoc index 9ca081b1e55f1..384595be2fae8 100644 --- a/docs/management/connectors/action-types/opsgenie.asciidoc +++ b/docs/management/connectors/action-types/opsgenie.asciidoc @@ -156,8 +156,6 @@ User:: The display name of the owner (optional). After obtaining an Opsgenie instance, configure the API integration. For details, refer to the https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/[Opsgenie documentation]. -After creating an Opsgenie instance, https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/[configure the API integration]. - If you're using a free trial, go to the `Teams` dashboard and select the appropriate team. image::management/connectors/images/opsgenie-teams.png[Opsgenie teams dashboard] diff --git a/docs/management/connectors/action-types/pagerduty.asciidoc b/docs/management/connectors/action-types/pagerduty.asciidoc index 5e12eddaa5c77..aba9db8f997f7 100644 --- a/docs/management/connectors/action-types/pagerduty.asciidoc +++ b/docs/management/connectors/action-types/pagerduty.asciidoc @@ -48,7 +48,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-pagerduty-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define PagerDuty connector properties. @@ -128,20 +128,20 @@ image::images/pagerduty-integration.png[PagerDuty Integrations tab] [[pagerduty-in-elastic]] *In Elastic* -. Create a PagerDuty Connector in Kibana. You can: +. Create a PagerDuty connector in Kibana. You can: + * Create a connector as part of creating an rule by selecting PagerDuty in the *Actions* section of the rule configuration and selecting *Add new*. -* Alternatively, create a connector. To create a connector, open the main menu, click *Stack Management > Rules and Connectors*, select *Connectors*, click *Create connector*, then select the PagerDuty option. +* Alternatively, create a connector. To create a connector, go to *{stack-manage-app} > {connectors-ui}*, click *Create connector*, then select the PagerDuty option. . Configure the connector by giving it a name and entering the Integration Key, optionally entering a custom API URL. + -See <> for how to obtain the endpoint and key information from PagerDuty and -<> for more details. +See <> for how to obtain the endpoint and key information from PagerDuty and +<> for more details. -. Save the Connector. +. Save the connector. -. To create a rule, open the main menu, then click *Stack Management > Rules and Connectors* or the application of your choice. +. To create a rule, go to *{stack-manage-app} > {rules-ui}* or the application of your choice. . Set up an action using your PagerDuty connector, by determining: + @@ -151,5 +151,5 @@ See <> for how to obtain the endpoint and Depending on your custom needs, assign them variables from the rule context. To see the available context variables, click on the *Add variable* icon next to each corresponding field. For more details on these parameters, see the -<> and the PagerDuty +<> and the PagerDuty https://v2.developer.pagerduty.com/v2/docs/send-an-event-events-api-v2[API v2 documentation]. diff --git a/docs/management/connectors/action-types/resilient.asciidoc b/docs/management/connectors/action-types/resilient.asciidoc index ef8196bea0aab..3ba0e8e701dfd 100644 --- a/docs/management/connectors/action-types/resilient.asciidoc +++ b/docs/management/connectors/action-types/resilient.asciidoc @@ -13,7 +13,7 @@ The IBM Resilient connector uses the https://developer.ibm.com/security/resilien IBM Resilient connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. URL:: IBM Resilient instance URL. Organization ID:: IBM Resilient organization ID. API key ID:: The authentication key ID for HTTP Basic authentication. @@ -54,7 +54,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-resilient-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define IBM Resilient connector properties. diff --git a/docs/management/connectors/action-types/server-log.asciidoc b/docs/management/connectors/action-types/server-log.asciidoc index 0810724d39ead..7d9171ca99ed8 100644 --- a/docs/management/connectors/action-types/server-log.asciidoc +++ b/docs/management/connectors/action-types/server-log.asciidoc @@ -13,7 +13,7 @@ This connector writes an entry to the {kib} server log. Server log connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +Name:: The name of the connector. [float] [[Preconfigured-server-log-configuration]] @@ -28,7 +28,7 @@ Name:: The name of the connector. The name is used to identify a connector [float] [[define-serverlog-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Server log connector properties. diff --git a/docs/management/connectors/action-types/servicenow-itom.asciidoc b/docs/management/connectors/action-types/servicenow-itom.asciidoc index 609ac85c931b6..6016ee3d6f8c7 100644 --- a/docs/management/connectors/action-types/servicenow-itom.asciidoc +++ b/docs/management/connectors/action-types/servicenow-itom.asciidoc @@ -54,7 +54,7 @@ include::servicenow.asciidoc[tag=servicenow-endpoint] {sn-itom} connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. Is OAuth:: The type of authentication to use. URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. @@ -125,7 +125,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-servicenow-itom-ui]] -=== Define connector in Stack Management +=== Define connector in {stack-manage-app} Define {sn-itom} connector properties. Choose whether to use OAuth for authentication. diff --git a/docs/management/connectors/action-types/servicenow-sir.asciidoc b/docs/management/connectors/action-types/servicenow-sir.asciidoc index 44c034cd35f61..e9a9c80b13a45 100644 --- a/docs/management/connectors/action-types/servicenow-sir.asciidoc +++ b/docs/management/connectors/action-types/servicenow-sir.asciidoc @@ -82,7 +82,7 @@ IMPORTANT: Deprecated connectors will continue to function with the rules they w To update a deprecated connector: -. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*. +. Open the main menu and go to *{stack-manage-app} > {connectors-ui}*. . Select the deprecated connector to open the *Edit connector* flyout. . In the warning message, click *Update this connector*. . Complete the guided steps in the *Edit connector* flyout. @@ -97,7 +97,7 @@ To update a deprecated connector: {sn-sir} connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. Is OAuth:: The type of authentication to use. URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. @@ -173,7 +173,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-servicenow-sir-ui]] -=== Define connector in Stack Management +=== Define connector in {stack-manage-app} Define {sn} SecOps connector properties. Choose whether to use OAuth for authentication. diff --git a/docs/management/connectors/action-types/servicenow.asciidoc b/docs/management/connectors/action-types/servicenow.asciidoc index 658532d1226f9..b5c5bcecc1800 100644 --- a/docs/management/connectors/action-types/servicenow.asciidoc +++ b/docs/management/connectors/action-types/servicenow.asciidoc @@ -166,7 +166,7 @@ IMPORTANT: Deprecated connectors will continue to function with the rules they w To update a deprecated connector: -. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*. +. Open the main menu and go to *{stack-manage-app} > {connectors-ui}*. . Select the deprecated connector to open the *Edit connector* flyout. . In the warning message, click *Update this connector*. . Complete the guided steps in the *Edit connector* flyout. @@ -181,7 +181,7 @@ To update a deprecated connector: {sn-itsm} connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. Is OAuth:: The type of authentication to use. URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. @@ -257,7 +257,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-servicenow-ui]] -=== Define connector in Stack Management +=== Define connector in {stack-manage-app} Define {sn-itsm} connector properties. Choose whether to use OAuth for authentication. diff --git a/docs/management/connectors/action-types/slack.asciidoc b/docs/management/connectors/action-types/slack.asciidoc index 19abf9119b837..cd6860d6d3027 100644 --- a/docs/management/connectors/action-types/slack.asciidoc +++ b/docs/management/connectors/action-types/slack.asciidoc @@ -13,14 +13,14 @@ The Slack connector uses https://api.slack.com/incoming-webhooks[Slack Incoming Slack connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +Name:: The name of the connector. Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <> setting, make sure the hostname is added to the allowed hosts. [float] [[slack-connector-networking-configuration]] ==== Connector networking configuration -Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. +Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. [float] [[Preconfigured-slack-configuration]] @@ -41,7 +41,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-slack-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Slack connector properties. diff --git a/docs/management/connectors/action-types/swimlane.asciidoc b/docs/management/connectors/action-types/swimlane.asciidoc index 88447bb496a86..ff4f1bcb05fe0 100644 --- a/docs/management/connectors/action-types/swimlane.asciidoc +++ b/docs/management/connectors/action-types/swimlane.asciidoc @@ -13,7 +13,7 @@ The Swimlane connector uses the https://swimlane.com/knowledge-center/docs/devel Swimlane connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. +Name:: The name of the connector. URL:: Swimlane instance URL. Application ID:: Swimlane application ID. API token:: Swimlane API authentication token for HTTP Basic authentication. @@ -81,7 +81,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-swimlane-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Swimlane connector properties. diff --git a/docs/management/connectors/action-types/teams.asciidoc b/docs/management/connectors/action-types/teams.asciidoc index 32cfaaf801d70..f80e3e010f995 100644 --- a/docs/management/connectors/action-types/teams.asciidoc +++ b/docs/management/connectors/action-types/teams.asciidoc @@ -13,7 +13,7 @@ The Microsoft Teams connector uses https://docs.microsoft.com/en-us/microsofttea Microsoft Teams connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +Name:: The name of the connector. Webhook URL:: The URL of the incoming webhook. See https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook#add-an-incoming-webhook-to-a-teams-channel[Add Incoming Webhooks] for instructions on generating this URL. If you are using the <> setting, make sure the hostname is added to the allowed hosts. [float] @@ -41,7 +41,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-teams-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Teams connector properties. diff --git a/docs/management/connectors/action-types/webhook.asciidoc b/docs/management/connectors/action-types/webhook.asciidoc index 4c001920f716c..9f6d41c8cb85b 100644 --- a/docs/management/connectors/action-types/webhook.asciidoc +++ b/docs/management/connectors/action-types/webhook.asciidoc @@ -13,7 +13,7 @@ The Webhook connector uses https://github.com/axios/axios[axios] to send a POST Webhook connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +Name:: The name of the connector. URL:: The request URL. If you are using the <> setting, make sure the hostname is added to the allowed hosts. Method:: HTTP request method, either `post`(default) or `put`. Headers:: A set of key-value pairs sent as headers with the request @@ -60,7 +60,7 @@ Secrets defines sensitive information for the connector type. [float] [[define-webhook-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define Webhook connector properties. diff --git a/docs/management/connectors/action-types/xmatters.asciidoc b/docs/management/connectors/action-types/xmatters.asciidoc index 8eae305d9f92d..e4ad978dc35dd 100644 --- a/docs/management/connectors/action-types/xmatters.asciidoc +++ b/docs/management/connectors/action-types/xmatters.asciidoc @@ -12,7 +12,7 @@ The xMatters connector uses the https://help.xmatters.com/integrations/#cshid=El xMatters connectors have the following configuration properties: -Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +Name:: The name of the connector. Authentication Type:: The type of authentication used in the request made to xMatters. URL:: The request URL for the Elastic Alerts trigger in xMatters. If you are using the <> setting, make sure the hostname is added to the allowed hosts. Username:: Username for HTTP Basic Authentication. @@ -22,7 +22,7 @@ Password:: Password for HTTP Basic Authentication. [[xmatters-connector-networking-configuration]] ==== Connector networking configuration -Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. +Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. [float] [[Preconfigured-xmatters-configuration]] @@ -70,7 +70,7 @@ Secrets defines sensitive information for the connector type: [float] [[define-xmatters-ui]] -==== Define connector in Stack Management +==== Define connector in {stack-manage-app} Define xMatters connector properties. Choose between basic and URL authentication for the requests: diff --git a/docs/management/connectors/pre-configured-connectors.asciidoc b/docs/management/connectors/pre-configured-connectors.asciidoc index 7498784ef389e..ad580d87e712b 100644 --- a/docs/management/connectors/pre-configured-connectors.asciidoc +++ b/docs/management/connectors/pre-configured-connectors.asciidoc @@ -66,9 +66,8 @@ Sensitive properties, such as passwords, can also be stored in the [[managing-pre-configured-connectors]] ==== View preconfigured connectors -When you open the main menu, click *Stack Management > Rules and Connectors*. -Preconfigured connectors appear on the -<>, regardless of which space you are +When you open the main menu, click *{stack-manage-app} > {connectors-ui}*. +Preconfigured connectors appear regardless of which space you are in. They are tagged as “preconfigured”, and you cannot delete them. [role="screenshot"] diff --git a/docs/maps/asset-tracking-tutorial.asciidoc b/docs/maps/asset-tracking-tutorial.asciidoc index f33ce2ef7547e..c87cdfde9ee68 100644 --- a/docs/maps/asset-tracking-tutorial.asciidoc +++ b/docs/maps/asset-tracking-tutorial.asciidoc @@ -442,7 +442,7 @@ image::maps/images/asset-tracking-tutorial/construction_zones.png[] Create a new alert by defining a rule and a connector. The rule includes the conditions that will trigger the alert, and the connector defines what action takes place once the alert is triggered. In this case, each alert will log a message to the Kibana log. -. Open *Stack Management*, and then click *Rules and Connectors*. +. Open *{stack-manage-app}*, and then click *{rules-ui}*. . Click *Create rule*. . Name the rule *Bus Alerts*. . Set *Check every* to *5 seconds*. @@ -481,9 +481,6 @@ image::maps/images/asset-tracking-tutorial/tracking_containment_configuration.pn . Click *Save*. -The *Bus Alert connector* is added to the *Rules and Connectors* page. For more information on common connectors, refer to the <> and <> connectors. - -[role="screenshot"] -image::maps/images/asset-tracking-tutorial/rules_and_connectors.png[] +The *Bus Alert connector* is added to the *{connectors-ui}* page. For more information on common connectors, refer to the <> and <> connectors. Congratulations! You have completed the tutorial and have the recipe for tracking assets. You can now try replicating this same analysis with your own data. diff --git a/docs/maps/images/asset-tracking-tutorial/rules_and_connectors.png b/docs/maps/images/asset-tracking-tutorial/rules_and_connectors.png deleted file mode 100644 index 35d89dd42ab27..0000000000000 Binary files a/docs/maps/images/asset-tracking-tutorial/rules_and_connectors.png and /dev/null differ diff --git a/docs/user/alerting/alerting-getting-started.asciidoc b/docs/user/alerting/alerting-getting-started.asciidoc index 708c4f0ddfeff..e169bcfc24869 100644 --- a/docs/user/alerting/alerting-getting-started.asciidoc +++ b/docs/user/alerting/alerting-getting-started.asciidoc @@ -3,32 +3,32 @@ -- -Alerting allows you to define *rules* to detect complex conditions within different {kib} apps and trigger actions when those conditions are met. Alerting is integrated with {observability-guide}/create-alerts.html[*Observability*], {security-guide}/prebuilt-rules.html[*Security*], <> and {ml-docs}/ml-configuring-alerts.html[*{ml-app}*], can be centrally managed from the <> UI, and provides a set of built-in <> and <> (known as stack rules) for you to use. +Alerting allows you to define _rules_ to detect complex conditions within different {kib} apps and trigger actions when those conditions are met. Alerting is integrated with {observability-guide}/create-alerts.html[*Observability*], {security-guide}/prebuilt-rules.html[*Security*], <> and {ml-docs}/ml-configuring-alerts.html[*{ml-app}*], can be centrally managed from the <> UI, and provides a set of built-in <> and <> (known as stack rules) for you to use. image::images/alerting-overview.png[{rules-ui} UI] [IMPORTANT] ============================================== -To make sure you can access alerting and actions, see the <> section. +To make sure you can access alerting and actions, see the <> section. ============================================== [float] == Concepts and terminology -Alerting works by running checks on a schedule to detect conditions defined by a *rule*. When a condition is met, the rule tracks it as an *alert* and responds by triggering one or more *actions*. -Actions typically involve interaction with {kib} services or third party integrations. *Connectors* allow actions to talk to these services and integrations. +Alerting works by running checks on a schedule to detect conditions defined by a rule. When a condition is met, the rule tracks it as an _alert_ and responds by triggering one or more _actions_. +Actions typically involve interaction with {kib} services or third party integrations. _Connectors_ allow actions to talk to these services and integrations. This section describes all of these elements and how they operate together. [float] === Rules -A rule specifies a background task that runs on the {kib} server to check for specific conditions. {kib} provides two types of rules: stack rules that are built into {kib} and the rules that are registered by {kib} apps. Refer to <> for more information. +A rule specifies a background task that runs on the {kib} server to check for specific conditions. {kib} provides two types of rules: stack rules that are built into {kib} and the rules that are registered by {kib} apps. For more information, refer to <>. A rule consists of three main parts: -* *Conditions*: what needs to be detected? -* *Schedule*: when/how often should detection checks run? -* *Actions*: what happens when a condition is detected? +* _Conditions_: what needs to be detected? +* _Schedule_: when/how often should detection checks run? +* _Actions_: what happens when a condition is detected? For example, when monitoring a set of servers, a rule might: @@ -46,10 +46,10 @@ The following sections describe each part of the rule in more detail. Under the hood, {kib} rules detect conditions by running a JavaScript function on the {kib} server, which gives it the flexibility to support a wide range of conditions, anything from the results of a simple {es} query to heavy computations involving data from multiple sources or external systems. -These conditions are packaged and exposed as *rule types*. A rule type hides the underlying details of the condition, and exposes a set of parameters +These conditions are packaged and exposed as _rule types_. A rule type hides the underlying details of the condition, and exposes a set of parameters to control the details of the conditions to detect. -For example, an <> lets you specify the index to query, an aggregation field, and a time window, but the details of the underlying {es} query are hidden. +For example, an <> lets you specify the index to query, an aggregation field, and a time window, but the details of the underlying {es} query are hidden. See <> for the rules provided by {kib} and how they express their conditions. @@ -72,8 +72,8 @@ Actions are invocations of connectors, which allow interaction with {kib} servic When defining actions in a rule, you specify: -* The *connector type*: the type of service or integration to use -* The connection for that type by referencing a <> +* The _connector type_: the type of service or integration to use +* The connection for that type by referencing a <> * A mapping of rule values to properties exposed for that type of action The result is a template: all the parameters needed to invoke a service are supplied except for specific values that are only known at the time the rule condition is detected. @@ -101,40 +101,43 @@ image::images/alerts.svg[{kib} tracks each detected condition as an alert and ta === Connectors Actions often involve connecting with services inside {kib} or integrating with third-party systems. -Rather than repeatedly entering connection information and credentials for each action, {kib} simplifies action setup using *connectors*. +Rather than repeatedly entering connection information and credentials for each action, {kib} simplifies action setup using connectors. -*Connectors* provide a central place to store connection information for services and integrations. For example if four rules send email notifications via the same SMTP service, they can all reference the same SMTP connector. When the SMTP settings change, you can update them once in the connector, instead of having to update four rules. +Connectors provide a central place to store connection information for services and integrations. For example if four rules send email notifications via the same SMTP service, they can all reference the same SMTP connector. When the SMTP settings change, you can update them once in the connector, instead of having to update four rules. image::images/rule-concepts-connectors.svg[Connectors provide a central place to store service connection settings] [float] == Putting it all together -A *rule* consists of conditions, *actions*, and a schedule. When conditions are met, *alerts* are created that render *actions* and invoke them. To make action setup and update easier, actions use *connectors* that centralize the information used to connect with {kib} services and third-party integrations. The following example ties these concepts together: +A rule consists of conditions, actions, and a schedule. When conditions are met, alerts are created that render actions and invoke them. To make action setup and update easier, actions use connectors that centralize the information used to connect with {kib} services and third-party integrations. The following example ties these concepts together: image::images/rule-concepts-summary.svg[Rules, connectors, alerts and actions work together to convert detection into action] -. Anytime a *rule*'s conditions are met, an *alert* is created. This example checks for servers with average CPU > 0.9. Three servers meet the condition, so three alerts are created. -. Alerts create *actions* as long as they are not muted or throttled. When actions are created, the template that was setup in the rule is filled with actual values. In this example, three actions are created, and the template string {{server}} is replaced with the server name for each alert. -. {kib} invokes the actions, sending them to a third party *integration* like an email service. -. If the third party integration has connection parameters or credentials, {kib} will fetch these from the *connector* referenced in the action. +. Anytime a rule's conditions are met, an alert is created. This example checks for servers with average CPU > 0.9. Three servers meet the condition, so three alerts are created. +. Alerts create actions as long as they are not muted or throttled. When actions are created, the template that was setup in the rule is filled with actual values. In this example, three actions are created, and the template string {{server}} is replaced with the server name for each alert. +. {kib} invokes the actions, sending them to a third party integration like an email service. +. If the third party integration has connection parameters or credentials, {kib} will fetch these from the connector referenced in the action. [float] [[alerting-concepts-differences]] == Differences from {watcher} -Alerting and <> are both used to detect conditions and can trigger actions in response, but they are completely independent alerting systems. +<> and the {kib} {alert-features} are both used to detect +conditions and can trigger actions in response, but they are completely +independent alerting systems. -This section will clarify some of the important differences in the function and intent of the two systems. +This section will clarify some of the important differences in the function and +intent of the two systems. -Functionally, Alerting differs in that: +Functionally, the {alert-features} differ in that: * Scheduled checks are run on {kib} instead of {es} -* {kib} <> through *rule types*, whereas watches provide low-level control over inputs, conditions, and transformations. -* {kib} rules track and persist the state of each detected condition through *alerts*. This makes it possible to mute and throttle individual alerts, and detect changes in state such as resolution. -* Actions are linked to *alerts* in Alerting. Actions are fired for each occurrence of a detected condition, rather than for the entire rule. +* {kib} <> through rule types, whereas watches provide low-level control over inputs, conditions, and transformations. +* {kib} rules track and persist the state of each detected condition through alerts. This makes it possible to mute and throttle individual alerts, and detect changes in state such as resolution. +* Actions are linked to alerts in Alerting. Actions are fired for each occurrence of a detected condition, rather than for the entire rule. -At a higher level, Alerting allows rich integrations across use cases like <>, <>, <>, and <>. -Prepackaged *rule types* simplify setup and hide the details of complex, domain-specific detections, while providing a consistent interface across {kib}. +At a higher level, the {alert-features} allow rich integrations across use cases like <>, <>, <>, and <>. +Prepackaged rule types simplify setup and hide the details of complex, domain-specific detections, while providing a consistent interface across {kib}. -- diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc index 62604c465dafc..6f3246956be49 100644 --- a/docs/user/alerting/alerting-troubleshooting.asciidoc +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -31,7 +31,8 @@ and Task Manager <>. [float] [[alerting-managment-detail]] === Using rules and connectors list for the current state and finding issues -*{rules-ui}* in *{stack-manage-app}* lists the rules and connectors available in the space you're currently in. When you click a rule name, you are navigated to the <> for the rule, where you can see currently active alerts. + +*{rules-ui}* in *{stack-manage-app}* lists the rules available in the space you're currently in. When you click a rule name, you are navigated to the <> for the rule, where you can see currently active alerts. The start date on this page indicates when a rule is triggered, and for what alerts. In addition, the duration of the condition indicates how long the instance is active. [role="screenshot"] image::images/rule-details-alerts-inactive.png[Alerting management details] @@ -64,7 +65,7 @@ curl -X POST -k \ -d '{"params":{"subject":"hallo","message":"hallo!","to":["me@example.com"]}}' -------------------------------------------------- -experimental[] In addition, there is a command-line client that uses legacy {rules-ui} APIs, which can be easier to use, but must be updated for the new APIs. +experimental[] In addition, there is a command-line client that uses legacy rule APIs, which can be easier to use, but must be updated for the new APIs. CLI tools to list, create, edit, and delete alerts (rules) and actions (connectors) are available in https://github.com/pmuellr/kbn-action[kbn-action], which you can install as follows: [source, txt] -------------------------------------------------- @@ -93,8 +94,8 @@ image::images/rules-management-health.png[Rule management page with the errors b [[task-manager-diagnostics]] === Task Manager diagnostics -Under the hood, {rules-ui} uses a plugin called Task Manager, which handles the scheduling, running, and error handling of the tasks. -This means that failure cases in {rules-ui} will, at times, be revealed by the Task Manager mechanism, rather than the Rules mechanism. +Under the hood, the {alert-features} use a plugin called Task Manager, which handles the scheduling, running, and error handling of the tasks. +This means that failure cases in {alert-features} will, at times, be revealed by the Task Manager mechanism, rather than the Rules mechanism. Task Manager provides a visible status which can be used to diagnose issues and is very well documented <> and <>. Task Manager uses the `.kibana_task_manager` index, an internal index that contains all the saved objects that represent the tasks in the system. @@ -191,7 +192,7 @@ In addition to the above methods, refer to the following approaches and common i * <> * <> -* <> +* <> [discrete] [[alerting-limitations]] diff --git a/docs/user/alerting/rule-types/index-threshold.asciidoc b/docs/user/alerting/rule-types/index-threshold.asciidoc index 03f855a861022..b19dc83ae0351 100644 --- a/docs/user/alerting/rule-types/index-threshold.asciidoc +++ b/docs/user/alerting/rule-types/index-threshold.asciidoc @@ -48,9 +48,9 @@ image::user/alerting/images/rule-types-index-threshold-preview.png[Five clauses [float] ==== Example -In this example, you will use the {kib} <> to set up and tune the conditions on an index threshold rule. For this example, you want to detect when any of the top four sites serve more than 420,000 bytes over a 24 hour period. +In this example, you will use the {kib} <> to set up and tune the conditions on an index threshold rule. For this example, you want to detect when any of the top four sites serve more than 420,000 bytes over a 24 hour period. -. Open the main menu, then click **Stack Management > Rules and Connectors**. +. Open the main menu, then click *{stack-manage-app} > {rules-ui}*. . Create a new rule that is checked every four hours and triggers actions when the rule status changes. + diff --git a/docs/user/alerting/troubleshooting/testing-connectors.asciidoc b/docs/user/alerting/troubleshooting/testing-connectors.asciidoc index 4207a6af23239..3170ec27ccdb9 100644 --- a/docs/user/alerting/troubleshooting/testing-connectors.asciidoc +++ b/docs/user/alerting/troubleshooting/testing-connectors.asciidoc @@ -3,11 +3,11 @@ === Test connectors -In *{stack-manage-app} > {rules-ui}*, you can test a newly created connector by navigating to the Test tab of Connector Edit flyout or by clicking "Save & test" button on Create flyout: +In *{stack-manage-app} > {connectors-ui}*, you can test a newly created connector by navigating to the Test tab of Connector Edit flyout or by clicking "Save & test" button on Create flyout: [role="screenshot"] image::user/alerting/images/connector-save-and-test.png[Rule management page with the errors banner] -or by directly opening the proper connector Edit flyout: +or by directly opening the proper connector edit flyout: [role="screenshot"] image::user/alerting/images/email-connector-test.png[Rule management page with the errors banner] diff --git a/docs/user/images/rules-and-connectors.png b/docs/user/images/rules-and-connectors.png deleted file mode 100644 index 1a85eeb6c0bc2..0000000000000 Binary files a/docs/user/images/rules-and-connectors.png and /dev/null differ diff --git a/docs/user/introduction.asciidoc b/docs/user/introduction.asciidoc index fa5801e622706..f3281b9bed175 100644 --- a/docs/user/introduction.asciidoc +++ b/docs/user/introduction.asciidoc @@ -127,10 +127,7 @@ When the alert triggers, you can send a notification to a system that is part of email, Slack, PagerDuty, ServiceNow, and other third party integrations. A dedicated view for creating, searching, -and editing rules is in <>. - -[role="screenshot"] -image::images/rules-and-connectors.png[Rules and Connectors view] +and editing rules is in <>. [float] [[organize-and-secure]] diff --git a/docs/user/management.asciidoc b/docs/user/management.asciidoc index 02261d062e826..67ccadf696411 100644 --- a/docs/user/management.asciidoc +++ b/docs/user/management.asciidoc @@ -74,13 +74,15 @@ You can add and remove remote clusters, and check their connectivity. [cols="50, 50"] |=== -| <> -| Centrally <> across {kib}. Create and <> for triggering actions. +| <> +| Centrally <> across {kib}. | <> | Create and manage cases to investigate issues. +| <> +| Create and <> for triggering actions. + | <> | Monitor the generation of reports—PDF, PNG, and CSV—and download reports that you previously generated. A report can contain a dashboard, visualization, saved search, or Canvas workpad. diff --git a/docs/user/monitoring/kibana-alerts.asciidoc b/docs/user/monitoring/kibana-alerts.asciidoc index eedc19a189887..a291f50364099 100644 --- a/docs/user/monitoring/kibana-alerts.asciidoc +++ b/docs/user/monitoring/kibana-alerts.asciidoc @@ -23,7 +23,8 @@ The default action for all {stack-monitor-app} rules is to write to {kib} logs and display a notification in the UI. To review and modify existing *{stack-monitor-app}* rules, click *Enter setup mode* on the *Cluster overview* page. -Alternatively, to manage all rules, including create and delete functionality go to *Stack Management > Rules and Connectors*. +Alternatively, to manage all rules, including create and delete functionality +go to *{stack-manage-app} > {rules-ui}*. [discrete] [[kibana-alerts-cpu-threshold]] diff --git a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc index de765ea542ecd..75f7973bc3af9 100644 --- a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc +++ b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc @@ -1002,7 +1002,7 @@ Task Manager has run out of Available Workers: server log [12:41:33.672] [info][plugins][taskManager][taskManager] [Task Ownership]: Task Manager has skipped Claiming Ownership of available tasks at it has ran out Available Workers. -------------------------------------------------- -This log message tells us that Task Manager is not managing to keep up with the sheer amount of work it has been tasked with completing. This might mean that Rules are not running at the frequency that was expected (instead of running every 5 minutes, it runs every 7-8 minutes, just as an example). +This log message tells us that Task Manager is not managing to keep up with the sheer amount of work it has been tasked with completing. This might mean that rules are not running at the frequency that was expected (instead of running every 5 minutes, it runs every 7-8 minutes, just as an example). By default Task Manager is limited to 10 tasks and this can be bumped up by setting a higher number in the kibana.yml file using the `xpack.task_manager.max_workers` configuration. It is important to keep in mind that a higher number of tasks running at any given time means more load on both Kibana and Elasticsearch, so only change this setting if increasing load in your environment makes sense. diff --git a/package.json b/package.json index 808c068cb878a..608d17d10d667 100644 --- a/package.json +++ b/package.json @@ -481,7 +481,7 @@ "compare-versions": "3.5.1", "constate": "^3.3.2", "copy-to-clipboard": "^3.0.8", - "core-js": "^3.26.0", + "core-js": "^3.26.1", "cronstrue": "^1.51.0", "cuid": "^2.1.8", "cytoscape": "^3.10.0", @@ -501,7 +501,7 @@ "deepmerge": "^4.2.2", "del": "^6.1.0", "elastic-apm-http-client": "^11.0.1", - "elastic-apm-node": "^3.40.0", + "elastic-apm-node": "^3.40.1", "email-addresses": "^5.0.0", "execa": "^4.0.2", "expiry-js": "0.1.7", @@ -688,7 +688,7 @@ "@babel/core": "^7.20.2", "@babel/eslint-parser": "^7.19.1", "@babel/eslint-plugin": "^7.19.1", - "@babel/generator": "^7.20.3", + "@babel/generator": "^7.20.4", "@babel/helper-plugin-utils": "^7.20.2", "@babel/parser": "^7.20.3", "@babel/plugin-proposal-class-properties": "^7.18.6", @@ -718,7 +718,9 @@ "@istanbuljs/schema": "^0.1.2", "@jest/console": "^29.3.1", "@jest/reporters": "^29.3.1", + "@jest/transform": "^29.3.1", "@jest/types": "^29.3.1", + "@kbn/ambient-common-types": "link:bazel-bin/packages/kbn-ambient-common-types", "@kbn/ambient-storybook-types": "link:bazel-bin/packages/kbn-ambient-storybook-types", "@kbn/ambient-ui-types": "link:bazel-bin/packages/kbn-ambient-ui-types", "@kbn/apm-synthtrace": "link:bazel-bin/packages/kbn-apm-synthtrace", @@ -757,6 +759,8 @@ "@kbn/managed-vscode-config-cli": "link:bazel-bin/packages/kbn-managed-vscode-config-cli", "@kbn/optimizer": "link:bazel-bin/packages/kbn-optimizer", "@kbn/optimizer-webpack-helpers": "link:bazel-bin/packages/kbn-optimizer-webpack-helpers", + "@kbn/peggy": "link:bazel-bin/packages/kbn-peggy", + "@kbn/peggy-loader": "link:bazel-bin/packages/kbn-peggy-loader", "@kbn/performance-testing-dataset-extractor": "link:bazel-bin/packages/kbn-performance-testing-dataset-extractor", "@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator", "@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers", @@ -809,7 +813,7 @@ "@types/apidoc": "^0.22.3", "@types/archiver": "^5.3.1", "@types/async": "^3.2.3", - "@types/babel__core": "^7.1.19", + "@types/babel__core": "^7.1.20", "@types/babel__generator": "^7.6.4", "@types/babel__helper-plugin-utils": "^7.10.0", "@types/base64-js": "^1.2.5", @@ -922,7 +926,7 @@ "@types/redux-logger": "^3.0.8", "@types/resolve": "^1.20.1", "@types/seedrandom": ">=2.0.0 <4.0.0", - "@types/selenium-webdriver": "^4.1.6", + "@types/selenium-webdriver": "^4.1.9", "@types/semver": "^7", "@types/set-value": "^2.0.0", "@types/sharp": "^0.30.4", @@ -978,7 +982,7 @@ "callsites": "^3.1.0", "chance": "1.0.18", "chokidar": "^3.5.3", - "chromedriver": "^107.0.2", + "chromedriver": "^107.0.3", "clean-webpack-plugin": "^3.0.0", "compression-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^6.0.2", @@ -1060,7 +1064,7 @@ "jsondiffpatch": "0.4.1", "license-checker": "^25.0.1", "listr": "^0.14.1", - "lmdb-store": "^1.6.11", + "lmdb-store": "^1", "loader-utils": "^2.0.4", "marge": "^1.0.1", "micromatch": "^4.0.5", @@ -1100,7 +1104,7 @@ "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", "sass-loader": "^10.3.1", - "selenium-webdriver": "^4.5.0", + "selenium-webdriver": "^4.6.1", "simple-git": "^3.10.0", "sinon": "^7.4.2", "sort-package-json": "^1.53.1", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index f8c862ee2f690..48c0fbca968ed 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -194,6 +194,7 @@ filegroup( "//packages/home/sample_data_types:build", "//packages/kbn-ace:build", "//packages/kbn-alerts:build", + "//packages/kbn-ambient-common-types:build", "//packages/kbn-ambient-storybook-types:build", "//packages/kbn-ambient-ui-types:build", "//packages/kbn-analytics:build", @@ -265,6 +266,8 @@ filegroup( "//packages/kbn-optimizer:build", "//packages/kbn-optimizer-webpack-helpers:build", "//packages/kbn-osquery-io-ts-types:build", + "//packages/kbn-peggy:build", + "//packages/kbn-peggy-loader:build", "//packages/kbn-performance-testing-dataset-extractor:build", "//packages/kbn-plugin-discovery:build", "//packages/kbn-plugin-generator:build", @@ -617,6 +620,8 @@ filegroup( "//packages/kbn-optimizer:build_types", "//packages/kbn-optimizer-webpack-helpers:build_types", "//packages/kbn-osquery-io-ts-types:build_types", + "//packages/kbn-peggy:build_types", + "//packages/kbn-peggy-loader:build_types", "//packages/kbn-performance-testing-dataset-extractor:build_types", "//packages/kbn-plugin-discovery:build_types", "//packages/kbn-plugin-generator:build_types", diff --git a/packages/content-management/inspector/kibana.jsonc b/packages/content-management/inspector/kibana.jsonc index 25158619f34bf..3bd3b38a35cc5 100644 --- a/packages/content-management/inspector/kibana.jsonc +++ b/packages/content-management/inspector/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "shared-common", "id": "@kbn/content-management-inspector", - "owner": "@elastic/shared-ux", + "owner": "@elastic/kibana-global-experience", "runtimeDeps": [], "typeDeps": [], } diff --git a/packages/kbn-ambient-common-types/BUILD.bazel b/packages/kbn-ambient-common-types/BUILD.bazel new file mode 100644 index 0000000000000..3a8b17248da22 --- /dev/null +++ b/packages/kbn-ambient-common-types/BUILD.bazel @@ -0,0 +1,58 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "pkg_npm") + +PKG_DIRNAME = "kbn-ambient-common-types" +PKG_REQUIRE_NAME = "@kbn/ambient-common-types" + +SRCS = glob( + [ + "*.d.ts", + ] +) + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ +] + +js_library( + name = PKG_DIRNAME, + srcs = SRCS + NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS, + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +alias( + name = "npm_module_types", + actual = ":" + PKG_DIRNAME, + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-ambient-common-types/README.mdx b/packages/kbn-ambient-common-types/README.mdx new file mode 100644 index 0000000000000..f08885537225c --- /dev/null +++ b/packages/kbn-ambient-common-types/README.mdx @@ -0,0 +1,20 @@ +--- +id: kibDevDocsOpsAmbientCommonTypes +slug: /kibana-dev-docs/ops/ambient-common-types +title: "@kbn/ambient-common-types" +description: A package holding ambient type definitions for files that are expected to run on the server and the browser +date: 2022-05-18 +tags: ['kibana', 'dev', 'contributor', 'operations', 'ambient', 'ui', 'common', 'server', 'types'] +--- + +This package holds ambient typescript definitions which should be included in projects which are expected to run on the server and the browser. + +## Plugins +These types will automatically be included for plugins. + +## Packages + +To include these types in a package: + +- add `"//packages/kbn-ambient-ui-types:npm_module_types"` to the `TYPES_DEPS` portion of the `BUILD.bazel` file. +- add `"@kbn/ambient-ui-types"` to the `types` portion of the `tsconfig.json` file. \ No newline at end of file diff --git a/packages/kbn-ambient-common-types/index.d.ts b/packages/kbn-ambient-common-types/index.d.ts new file mode 100644 index 0000000000000..4d139c64b8cca --- /dev/null +++ b/packages/kbn-ambient-common-types/index.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * These ambient types are used to define default types for anything which is + * supported in both server/browser environments. + */ + +/** + * peggy grammars are built automatically on import in both browser/server + */ +declare module '*.peggy' { + export interface ParserOptions { + [key: string]: any; + /** + * Object that will be attached to the each `LocationRange` object created by + * the parser. For example, this can be path to the parsed file or even the + * File object. + */ + grammarSource?: any; + startRule?: string; + tracer?: ParserTracer; + } + + /** + * parse `input` using the peggy grammer + * @param input code to parse + * @param options parse options + */ + export function parse(input: string, options?: ParserOptions): any; +} diff --git a/packages/kbn-ambient-common-types/jest.config.js b/packages/kbn-ambient-common-types/jest.config.js new file mode 100644 index 0000000000000..f94290b64cd90 --- /dev/null +++ b/packages/kbn-ambient-common-types/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-ambient-common-types'], +}; diff --git a/packages/kbn-ambient-common-types/kibana.jsonc b/packages/kbn-ambient-common-types/kibana.jsonc new file mode 100644 index 0000000000000..70537777cc825 --- /dev/null +++ b/packages/kbn-ambient-common-types/kibana.jsonc @@ -0,0 +1,8 @@ +{ + "type": "shared-common", + "id": "@kbn/ambient-common-types", + "owner": "@elastic/kibana-operations", + "devOnly": true, + "runtimeDeps": [], + "typeDeps": [], +} diff --git a/packages/kbn-ambient-common-types/package.json b/packages/kbn-ambient-common-types/package.json new file mode 100644 index 0000000000000..1794b046ef16e --- /dev/null +++ b/packages/kbn-ambient-common-types/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/ambient-common-types", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "types": "./target_types/index.d.ts", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/kbn-ambient-common-types/tsconfig.json b/packages/kbn-ambient-common-types/tsconfig.json new file mode 100644 index 0000000000000..292157c18591a --- /dev/null +++ b/packages/kbn-ambient-common-types/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ] +} diff --git a/packages/kbn-babel-preset/node_preset.js b/packages/kbn-babel-preset/node_preset.js index dfbca5a364f59..aa413a05013fc 100644 --- a/packages/kbn-babel-preset/node_preset.js +++ b/packages/kbn-babel-preset/node_preset.js @@ -31,7 +31,7 @@ module.exports = (_, options = {}) => { // Because of that we should use for that value the same version we install // in the package.json in order to have the same polyfills between the environment // and the tests - corejs: '3.26.0', + corejs: '3.26.1', bugfixes: true, ...(options['@babel/preset-env'] || {}), diff --git a/packages/kbn-babel-preset/webpack_preset.js b/packages/kbn-babel-preset/webpack_preset.js index d7359345bf22e..75ceab91d8af5 100644 --- a/packages/kbn-babel-preset/webpack_preset.js +++ b/packages/kbn-babel-preset/webpack_preset.js @@ -18,7 +18,7 @@ module.exports = (_, options = {}) => { modules: false, // Please read the explanation for this // in node_preset.js - corejs: '3.26.0', + corejs: '3.26.1', bugfixes: true, }, ], diff --git a/packages/kbn-ci-stats-reporter/src/report_time.ts b/packages/kbn-ci-stats-reporter/src/report_time.ts index 20cb8fc9ef86d..86ec8a603227c 100644 --- a/packages/kbn-ci-stats-reporter/src/report_time.ts +++ b/packages/kbn-ci-stats-reporter/src/report_time.ts @@ -19,7 +19,24 @@ export const getTimeReporter = (log: ToolingLog, group: string) => { group, id, ms: Date.now() - startTime, - meta, + meta: Object.fromEntries( + Object.entries(meta).flatMap(([k, v]) => { + const type = typeof v; + if (type === 'undefined') { + return []; + } + + if (type === 'string' || type === 'number' || type === 'boolean') { + return [[k, v]]; + } + + if (Array.isArray(v) && v.every((i): i is string => typeof i === 'string')) { + return [[k, v]]; + } + + return [[k, JSON.stringify(v)]]; + }) + ), }, ], }); diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index d1da648435ed2..8a3a7f58a2ec5 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -140,6 +140,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`, mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`, start: `${ENTERPRISE_SEARCH_DOCS}start.html`, + syncRules: `${ENTERPRISE_SEARCH_DOCS}sync-rules.html`, troubleshootSetup: `${ENTERPRISE_SEARCH_DOCS}troubleshoot-setup.html`, usersAccess: `${ENTERPRISE_SEARCH_DOCS}users-access.html`, }, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index a01a7699b8814..334215985918d 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -125,6 +125,7 @@ export interface DocLinks { readonly licenseManagement: string; readonly mailService: string; readonly start: string; + readonly syncRules: string; readonly troubleshootSetup: string; readonly usersAccess: string; }; diff --git a/packages/kbn-es-query/BUILD.bazel b/packages/kbn-es-query/BUILD.bazel index 772fecdbb9806..95e7dcdcbe3cc 100644 --- a/packages/kbn-es-query/BUILD.bazel +++ b/packages/kbn-es-query/BUILD.bazel @@ -1,5 +1,4 @@ load("@npm//@bazel/typescript:index.bzl", "ts_config") -load("@npm//peggy:index.bzl", "peggy") load("@build_bazel_rules_nodejs//:index.bzl", "js_library") load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") @@ -9,6 +8,8 @@ PKG_REQUIRE_NAME = "@kbn/es-query" SOURCE_FILES = glob( [ "**/*.ts", + "**/grammar.peggy.config.json", + "**/grammar.peggy", ], exclude = [ "**/*.config.js", @@ -51,6 +52,7 @@ RUNTIME_DEPS = [ TYPES_DEPS = [ "//packages/kbn-utility-types:npm_module_types", "//packages/kbn-i18n:npm_module_types", + "//packages/kbn-ambient-common-types:npm_module_types", "@npm//@elastic/elasticsearch", "@npm//tslib", "@npm//@types/jest", @@ -59,26 +61,14 @@ TYPES_DEPS = [ "@npm//@types/node", ] -peggy( - name = "grammar", - data = [ - ":grammar/grammar.peggy", - ":grammar/grammar.config.json" - ], - output_dir = True, - args = [ - "--extra-options-file", - "./%s/grammar/grammar.config.json" % package_name(), - "-o", - "$(@D)/built_grammar.js", - "./%s/grammar/grammar.peggy" % package_name() - ], -) - jsts_transpiler( name = "target_node", srcs = SRCS, build_pkg_name = package_name(), + additional_args = [ + "--copy-files", + "--quiet" + ], ) jsts_transpiler( @@ -86,6 +76,10 @@ jsts_transpiler( srcs = SRCS, build_pkg_name = package_name(), web = True, + additional_args = [ + "--copy-files", + "--quiet" + ], ) ts_config( @@ -110,7 +104,7 @@ ts_project( js_library( name = PKG_DIRNAME, - srcs = NPM_MODULE_EXTRA_FILES + [":grammar"], + srcs = NPM_MODULE_EXTRA_FILES, deps = RUNTIME_DEPS + [":target_node", ":target_web"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], @@ -118,7 +112,7 @@ js_library( js_library( name = "npm_module_types", - srcs = NPM_MODULE_EXTRA_FILES + [":grammar"], + srcs = NPM_MODULE_EXTRA_FILES, deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], diff --git a/packages/kbn-es-query/grammar/grammar.peggy b/packages/kbn-es-query/src/kuery/grammar/grammar.peggy similarity index 100% rename from packages/kbn-es-query/grammar/grammar.peggy rename to packages/kbn-es-query/src/kuery/grammar/grammar.peggy diff --git a/packages/kbn-es-query/grammar/grammar.config.json b/packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json similarity index 100% rename from packages/kbn-es-query/grammar/grammar.config.json rename to packages/kbn-es-query/src/kuery/grammar/grammar.peggy.config.json diff --git a/packages/kbn-es-query/src/kuery/grammar/index.ts b/packages/kbn-es-query/src/kuery/grammar/index.ts index b05e510486c27..fa1af47631a4a 100644 --- a/packages/kbn-es-query/src/kuery/grammar/index.ts +++ b/packages/kbn-es-query/src/kuery/grammar/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { parse } from '../../../../grammar/built_grammar.js'; +export { parse } from './grammar.peggy'; diff --git a/packages/kbn-es-query/tsconfig.json b/packages/kbn-es-query/tsconfig.json index 292157c18591a..8561f4bdc4a31 100644 --- a/packages/kbn-es-query/tsconfig.json +++ b/packages/kbn-es-query/tsconfig.json @@ -6,7 +6,8 @@ "outDir": "target_types", "types": [ "jest", - "node" + "node", + "@kbn/ambient-common-types" ] }, "include": [ diff --git a/packages/kbn-health-gateway-server/src/kibana/kibana_config.ts b/packages/kbn-health-gateway-server/src/kibana/kibana_config.ts index b44af3cbcd2da..43f5f240b0ce4 100644 --- a/packages/kbn-health-gateway-server/src/kibana/kibana_config.ts +++ b/packages/kbn-health-gateway-server/src/kibana/kibana_config.ts @@ -10,6 +10,8 @@ import { readFileSync } from 'fs'; import type { Duration } from 'moment'; import { schema, TypeOf } from '@kbn/config-schema'; import { ServiceConfigDescriptor } from '@kbn/core-base-server-internal'; +import { IConfigService } from '@kbn/config'; +import { Logger } from '@kbn/logging'; const hostURISchema = schema.uri({ scheme: ['http', 'https'] }); @@ -30,14 +32,22 @@ const configSchema = schema.object({ }), }); -export type KibanaConfigType = TypeOf; +type KibanaConfigType = TypeOf; export const config: ServiceConfigDescriptor = { path: 'kibana' as const, schema: configSchema, }; +interface KibanaConfigDependencies { + logger: Logger; + config: IConfigService; +} + export class KibanaConfig { + private readonly logger: Logger; + private readonly config: KibanaConfigType; + /** * Kibana hosts that the gateway will connect to. */ @@ -53,12 +63,15 @@ export class KibanaConfig { */ public readonly ssl: SslConfig; - constructor(rawConfig: KibanaConfigType) { - this.hosts = rawConfig.hosts; - this.requestTimeout = rawConfig.requestTimeout; + constructor({ logger, config: configService }: KibanaConfigDependencies) { + this.logger = logger.get('kibana-config'); + this.config = configService.atPathSync('kibana'); - const { verificationMode } = rawConfig.ssl; - const { certificate, certificateAuthorities } = readKeyAndCerts(rawConfig); + this.hosts = this.config.hosts; + this.requestTimeout = this.config.requestTimeout; + + const { verificationMode } = this.config.ssl; + const { certificate, certificateAuthorities } = this.readKeyAndCerts(); this.ssl = { certificate, @@ -66,44 +79,35 @@ export class KibanaConfig { verificationMode, }; } -} - -interface SslConfig { - verificationMode: 'none' | 'certificate' | 'full'; - certificate?: string; - certificateAuthorities?: string[]; -} -const readKeyAndCerts = (rawConfig: KibanaConfigType) => { - let certificate: string | undefined; - let certificateAuthorities: string[] | undefined; + private readKeyAndCerts() { + const certificate = this.config.ssl.certificate + ? readFile(this.config.ssl.certificate) + : undefined; - const addCAs = (ca: string[] | undefined) => { - if (ca && ca.length) { - certificateAuthorities = [...(certificateAuthorities || []), ...ca]; + if (certificate) { + this.logger.debug(`Reading certificate: ${this.config.ssl.certificate}`); } - }; - if (rawConfig.ssl.certificate) { - certificate = readFile(rawConfig.ssl.certificate); - } + const certificateAuthorities = [] as string[]; + const ca = this.config.ssl.certificateAuthorities || []; - const ca = rawConfig.ssl.certificateAuthorities; - if (ca) { - const parsed: string[] = []; - const paths = Array.isArray(ca) ? ca : [ca]; - if (paths.length > 0) { - for (const path of paths) { - parsed.push(readFile(path)); - } - addCAs(parsed); + for (const path of Array.isArray(ca) ? ca : [ca]) { + this.logger.debug(`Adding certificate authority: ${path}`); + certificateAuthorities.push(readFile(path)); } + + return { + certificate, + certificateAuthorities: certificateAuthorities.length ? certificateAuthorities : undefined, + }; } +} - return { - certificate, - certificateAuthorities, - }; -}; +interface SslConfig { + verificationMode: 'none' | 'certificate' | 'full'; + certificate?: string; + certificateAuthorities?: string[]; +} const readFile = (file: string) => readFileSync(file, 'utf8'); diff --git a/packages/kbn-health-gateway-server/src/kibana/kibana_service.ts b/packages/kbn-health-gateway-server/src/kibana/kibana_service.ts index 261de08711a73..d8db3a42f2a25 100644 --- a/packages/kbn-health-gateway-server/src/kibana/kibana_service.ts +++ b/packages/kbn-health-gateway-server/src/kibana/kibana_service.ts @@ -24,16 +24,16 @@ interface KibanaServiceDependencies { * A service to interact with the configured `kibana.hosts`. */ export class KibanaService { - private readonly log: Logger; + private readonly logger: Logger; private readonly config: IConfigService; constructor({ logger, config }: KibanaServiceDependencies) { - this.log = logger.get('kibana-service'); + this.logger = logger.get('kibana-service'); this.config = config; } async start({ server }: KibanaServiceStartDependencies) { - server.addRoute(createRootRoute({ config: this.config, log: this.log })); + server.addRoute(createRootRoute({ config: this.config, logger: this.logger })); } stop() { diff --git a/packages/kbn-health-gateway-server/src/kibana/routes/root.ts b/packages/kbn-health-gateway-server/src/kibana/routes/root.ts index f8f73bf92b78c..e3116e260dc94 100644 --- a/packages/kbn-health-gateway-server/src/kibana/routes/root.ts +++ b/packages/kbn-health-gateway-server/src/kibana/routes/root.ts @@ -9,10 +9,9 @@ import https from 'https'; import { URL } from 'url'; import type { Request, ResponseToolkit } from '@hapi/hapi'; -import nodeFetch, { Headers, RequestInit, Response } from 'node-fetch'; +import nodeFetch, { RequestInit, Response } from 'node-fetch'; import type { IConfigService } from '@kbn/config'; import type { Logger } from '@kbn/logging'; -import type { KibanaConfigType } from '../kibana_config'; import { KibanaConfig } from '../kibana_config'; const HTTPS = 'https:'; @@ -21,22 +20,24 @@ const GATEWAY_ROOT_ROUTE = '/'; const KIBANA_ROOT_ROUTE = '/'; interface RootRouteDependencies { - log: Logger; + logger: Logger; config: IConfigService; } type Fetch = (path: string) => Promise; -export function createRootRoute({ config, log }: RootRouteDependencies) { - const kibanaConfig = new KibanaConfig(config.atPathSync('kibana')); +export function createRootRoute({ config, logger }: RootRouteDependencies) { + const kibanaConfig = new KibanaConfig({ config, logger }); const fetch = configureFetch(kibanaConfig); return { method: 'GET', path: GATEWAY_ROOT_ROUTE, handler: async (req: Request, h: ResponseToolkit) => { - const responses = await fetchKibanaRoots({ fetch, kibanaConfig, log }); + const responses = await fetchKibanaRoots({ fetch, kibanaConfig, logger }); const { body, statusCode } = mergeResponses(responses); + logger.debug(`Returning ${statusCode} response with body: ${JSON.stringify(body)}`); + return h.response(body).type('application/json').code(statusCode); }, }; @@ -45,62 +46,71 @@ export function createRootRoute({ config, log }: RootRouteDependencies) { async function fetchKibanaRoots({ fetch, kibanaConfig, - log, + logger, }: { fetch: Fetch; kibanaConfig: KibanaConfig; - log: Logger; + logger: Logger; }) { - const requests = await Promise.allSettled( + const responses = await Promise.allSettled( kibanaConfig.hosts.map(async (host) => { - log.debug(`Fetching response from ${host}${KIBANA_ROOT_ROUTE}`); + logger.debug(`Fetching response from ${host}${KIBANA_ROOT_ROUTE}`); return fetch(`${host}${KIBANA_ROOT_ROUTE}`); }) ); - return requests.map((r, i) => { - if (r.status === 'rejected') { - log.error(`No response from ${kibanaConfig.hosts[i]}${KIBANA_ROOT_ROUTE}`); - } else { - log.info( - `Got response from ${kibanaConfig.hosts[i]}${KIBANA_ROOT_ROUTE}: ${JSON.stringify( - r.value.status - )}` - ); + responses.forEach((response, index) => { + const host = `${kibanaConfig.hosts[index]}${KIBANA_ROOT_ROUTE}`; + + if (response.status !== 'rejected') { + logger.debug(`Got response from ${host}: ${JSON.stringify(response.value.status)}`); + + return; + } + + if (response.reason instanceof Error) { + logger.error(response.reason); + } + + if (response.reason instanceof Error && response.reason.name === 'AbortError') { + logger.error(`Request timeout for ${host}`); + + return; } - return r; + + logger.error( + `No response from ${host}: ${ + response.reason instanceof Error ? response.reason.message : JSON.stringify(response.reason) + }` + ); }); + + return responses; } function mergeResponses( responses: Array | PromiseRejectedResult> ) { - let statusCode = 200; - for (const response of responses) { - if ( - response.status === 'rejected' || - !isHealthyResponse(response.value.status, response.value.headers) - ) { - statusCode = 503; - } - } + const hasUnhealthyResponse = responses.some(isUnhealthyResponse); return { body: {}, // The control plane health check ignores the body, so we do the same - statusCode, + statusCode: hasUnhealthyResponse ? 503 : 200, }; } -function isHealthyResponse(statusCode: number, headers: Headers) { - return isSuccess(statusCode) || isUnauthorized(statusCode, headers); +function isUnhealthyResponse(response: PromiseFulfilledResult | PromiseRejectedResult) { + return ( + response.status === 'rejected' || !(isSuccess(response.value) || isUnauthorized(response.value)) + ); } -function isUnauthorized(statusCode: number, headers: Headers): boolean { - return statusCode === 401 && headers.has('www-authenticate'); +function isUnauthorized({ status, headers }: Response): boolean { + return status === 401 && headers.has('www-authenticate'); } -function isSuccess(statusCode: number): boolean { - return (statusCode >= 200 && statusCode <= 299) || statusCode === 302; +function isSuccess({ status }: Response): boolean { + return (status >= 200 && status <= 299) || status === 302; } function generateAgentConfig(sslConfig: KibanaConfig['ssl']) { @@ -149,13 +159,11 @@ function configureFetch(kibanaConfig: KibanaConfig) { signal: controller.signal, redirect: 'manual', }; + try { - const response = await nodeFetch(url, fetchOptions); - clearTimeout(timeoutId); - return response; - } catch (e) { + return await nodeFetch(url, fetchOptions); + } finally { clearTimeout(timeoutId); - throw e; } }; } diff --git a/packages/kbn-health-gateway-server/src/server/server.ts b/packages/kbn-health-gateway-server/src/server/server.ts index 90123cf70380d..e75df33859981 100644 --- a/packages/kbn-health-gateway-server/src/server/server.ts +++ b/packages/kbn-health-gateway-server/src/server/server.ts @@ -47,7 +47,7 @@ export class Server { return { addRoute: (definition) => { - this.log.debug(`registering route handler for [${definition.path}]`); + this.log.debug(`Registering route handler for [${definition.path}]`); this.server!.route(definition); }, }; diff --git a/packages/kbn-import-resolver/src/import_resolver.ts b/packages/kbn-import-resolver/src/import_resolver.ts index 74e2ed52ca453..bab9a9000dd6c 100644 --- a/packages/kbn-import-resolver/src/import_resolver.ts +++ b/packages/kbn-import-resolver/src/import_resolver.ts @@ -125,14 +125,10 @@ export class ImportResolver { return true; } - // ignore requests to grammar/built_grammar.js files or bazel target dirs, these files are only - // available in the build output and will never resolve in dev. We will validate that people don't - // import these files from outside the package in another rule - if ( - req.endsWith('grammar/built_grammar.js') || - req.includes('/target_workers/') || - req.includes('/target_node/') - ) { + // ignore requests to bazel target dirs, these files are only available in the build output + // and will never resolve in dev. We will validate that people don't import these files from + // outside the package in another rule + if (req.includes('/target_workers/') || req.includes('/target_node/')) { return true; } diff --git a/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts b/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts index 1857e6ef26453..a6a3a84602cd7 100644 --- a/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts +++ b/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts @@ -77,12 +77,6 @@ describe('#resolve()', () => { }); it('returns ignore results for known unresolvable but okay import statements', () => { - expect(resolver.resolve('../../grammar/built_grammar.js', FIXTURES_DIR)).toMatchInlineSnapshot(` - Object { - "type": "ignore", - } - `); - expect(resolver.resolve('kibana-buildkite-library', FIXTURES_DIR)).toMatchInlineSnapshot(` Object { "type": "ignore", diff --git a/packages/kbn-interpreter/BUILD.bazel b/packages/kbn-interpreter/BUILD.bazel index 9613a29188bd3..26a359a89cbe6 100644 --- a/packages/kbn-interpreter/BUILD.bazel +++ b/packages/kbn-interpreter/BUILD.bazel @@ -1,5 +1,4 @@ load("@npm//@bazel/typescript:index.bzl", "ts_config") -load("@npm//peggy:index.bzl", "peggy") load("@build_bazel_rules_nodejs//:index.bzl", "js_library") load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") @@ -10,6 +9,8 @@ SOURCE_FILES = glob( [ "**/*.ts", "**/*.js", + "**/grammar.peggy.config.json", + "**/grammar.peggy", ], exclude = [ "**/*.config.js", @@ -48,12 +49,17 @@ TYPES_DEPS = [ "@npm//@types/jest", "@npm//@types/lodash", "@npm//@types/node", + "//packages/kbn-ambient-common-types:npm_module_types" ] jsts_transpiler( name = "target_node", srcs = SRCS, build_pkg_name = package_name(), + additional_args = [ + "--copy-files", + "--quiet" + ], ) jsts_transpiler( @@ -61,21 +67,9 @@ jsts_transpiler( srcs = SRCS, build_pkg_name = package_name(), web = True, -) - -peggy( - name = "grammar", - data = [ - ":grammar/grammar.config.json", - ":grammar/grammar.peggy" - ], - output_dir = True, - args = [ - "--extra-options-file", - "./%s/grammar/grammar.config.json" % package_name(), - "-o", - "$(@D)/built_grammar.js", - "./%s/grammar/grammar.peggy" % package_name() + additional_args = [ + "--copy-files", + "--quiet" ], ) @@ -102,7 +96,7 @@ ts_project( js_library( name = PKG_DIRNAME, - srcs = NPM_MODULE_EXTRA_FILES + [":grammar"], + srcs = NPM_MODULE_EXTRA_FILES, deps = RUNTIME_DEPS + [":target_node", ":target_web"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], @@ -110,7 +104,7 @@ js_library( js_library( name = "npm_module_types", - srcs = NPM_MODULE_EXTRA_FILES + [":grammar"], + srcs = NPM_MODULE_EXTRA_FILES, deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], diff --git a/packages/kbn-interpreter/grammar/grammar.peggy b/packages/kbn-interpreter/src/common/lib/grammar.peggy similarity index 100% rename from packages/kbn-interpreter/grammar/grammar.peggy rename to packages/kbn-interpreter/src/common/lib/grammar.peggy diff --git a/packages/kbn-interpreter/grammar/grammar.config.json b/packages/kbn-interpreter/src/common/lib/grammar.peggy.config.json similarity index 100% rename from packages/kbn-interpreter/grammar/grammar.config.json rename to packages/kbn-interpreter/src/common/lib/grammar.peggy.config.json diff --git a/packages/kbn-interpreter/src/common/lib/parse.ts b/packages/kbn-interpreter/src/common/lib/parse.ts index a6d9cc8285689..12a43e06a83c4 100644 --- a/packages/kbn-interpreter/src/common/lib/parse.ts +++ b/packages/kbn-interpreter/src/common/lib/parse.ts @@ -7,7 +7,7 @@ */ import type { Ast, AstWithMeta } from './ast'; -import { parse } from '../../../../grammar/built_grammar.js'; +import { parse } from './grammar.peggy'; interface Options { startRule?: string; diff --git a/packages/kbn-interpreter/tsconfig.json b/packages/kbn-interpreter/tsconfig.json index 57eff16f422bb..e3b4140d05822 100644 --- a/packages/kbn-interpreter/tsconfig.json +++ b/packages/kbn-interpreter/tsconfig.json @@ -6,7 +6,8 @@ "outDir": "target_types", "types": [ "jest", - "node" + "node", + "@kbn/ambient-common-types" ] }, "include": [ diff --git a/packages/kbn-optimizer/BUILD.bazel b/packages/kbn-optimizer/BUILD.bazel index 4906af1ad6f6c..da4b69f02a724 100644 --- a/packages/kbn-optimizer/BUILD.bazel +++ b/packages/kbn-optimizer/BUILD.bazel @@ -47,6 +47,7 @@ RUNTIME_DEPS = [ "//packages/kbn-ui-shared-deps-src", "//packages/kbn-utils", "//packages/kbn-synthetic-package-map", + "//packages/kbn-peggy", "@npm//@babel/core", "@npm//chalk", "@npm//clean-webpack-plugin", @@ -81,6 +82,7 @@ TYPES_DEPS = [ "//packages/kbn-utils:npm_module_types", "//packages/kbn-tooling-log:npm_module_types", "//packages/kbn-synthetic-package-map:npm_module_types", + "//packages/kbn-peggy:npm_module_types", "@npm//chalk", "@npm//clean-webpack-plugin", "@npm//cpy", diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index f8c4f0409eb71..5a367ce31a283 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -20,6 +20,7 @@ pageLoadAssetSize: controls: 40000 core: 435325 crossClusterReplication: 65408 + customBranding: 16693 customIntegrations: 22034 dashboard: 82025 dashboardEnhanced: 65646 diff --git a/packages/kbn-optimizer/src/node/cache.ts b/packages/kbn-optimizer/src/node/cache.ts index 1320d275022a9..a521d8e0a0f7a 100644 --- a/packages/kbn-optimizer/src/node/cache.ts +++ b/packages/kbn-optimizer/src/node/cache.ts @@ -101,28 +101,27 @@ export class Cache { } } - async update(path: string, file: { mtime: string; code: string; map: any }) { - const key = this.getKey(path); + close() { + clearTimeout(this.timer); + } + async update(path: string, file: { mtime: string; code: string; map?: any }) { + const key = this.getKey(path); await Promise.all([ this.safePut(this.atimes, key, GLOBAL_ATIME), this.safePut(this.mtimes, key, file.mtime), this.safePut(this.codes, key, file.code), - this.safePut(this.sourceMaps, key, JSON.stringify(file.map)), + file.map != null ? this.safePut(this.sourceMaps, key, JSON.stringify(file.map)) : null, ]); } - close() { - clearTimeout(this.timer); - } - private getKey(path: string) { const normalizedPath = Path.sep !== '/' ? Path.relative(this.pathRoot, path).split(Path.sep).join('/') : Path.relative(this.pathRoot, path); - return `${this.prefix}${normalizedPath}`; + return `${this.prefix}:${normalizedPath}`; } private safeGet(db: LmdbStore.Database, key: string) { diff --git a/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts b/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts index 8ce58aa74214f..393abd0dc24d0 100644 --- a/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts +++ b/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts @@ -53,7 +53,7 @@ it('returns undefined until values are set', async () => { const log = makeTestLog(); const cache = makeCache({ dir: DIR, - prefix: 'prefix:', + prefix: 'prefix', log, pathRoot: '/foo/', }); diff --git a/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts b/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts index 6aa11a3f7020f..5de38ff74cf98 100644 --- a/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts +++ b/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts @@ -37,15 +37,17 @@ import Fs from 'fs'; import Path from 'path'; import Crypto from 'crypto'; -import * as babel from '@babel/core'; +import { version as babelVersion } from '@babel/core'; +import { VERSION as peggyVersion } from '@kbn/peggy'; import { addHook } from 'pirates'; import { REPO_ROOT, UPSTREAM_BRANCH } from '@kbn/utils'; import sourceMapSupport from 'source-map-support'; import { readHashOfPackageMap } from '@kbn/synthetic-package-map'; -import { Cache } from './cache'; +import { TRANSFORMS } from './transforms'; +import { getBabelOptions } from './transforms/babel'; -const cwd = process.cwd(); +import { Cache } from './cache'; const IGNORE_PATTERNS = [ /[\/\\]kbn-pm[\/\\]dist[\/\\]/, @@ -63,70 +65,6 @@ const IGNORE_PATTERNS = [ /[\/\\]packages[\/\\](eslint-|kbn-)[^\/\\]+[\/\\](?!src[\/\\].*|(.+[\/\\])?(test|__tests__)[\/\\].+|.+\.test\.(js|ts|tsx)$)(.+$)/, ]; -function getBabelOptions(path: string) { - return babel.loadOptions({ - cwd, - sourceRoot: Path.dirname(path) + Path.sep, - filename: path, - babelrc: false, - presets: [require.resolve('@kbn/babel-preset/node_preset')], - sourceMaps: 'both', - ast: false, - })!; -} - -/** - * @babel/register uses a JSON encoded copy of the config + babel.version - * as the cache key for files, so we do something similar but we don't need - * a unique cache key for every file as our config isn't different for - * different files (by design). Instead we determine a unique prefix and - * automatically prepend all paths with the prefix to create cache keys - */ -function determineCachePrefix() { - const json = JSON.stringify({ - synthPkgMapHash: readHashOfPackageMap(), - babelVersion: babel.version, - // get a config for a fake js, ts, and tsx file to make sure we - // capture conditional config portions based on the file extension - js: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.js')), - ts: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.ts')), - tsx: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.tsx')), - }); - - const checksum = Crypto.createHash('sha256').update(json).digest('hex').slice(0, 8); - return `${checksum}:`; -} - -function compile(cache: Cache, source: string, path: string) { - try { - const mtime = `${Fs.statSync(path).mtimeMs}`; - if (cache.getMtime(path) === mtime) { - const code = cache.getCode(path); - if (code) { - // code *should* always be defined, but if it isn't for some reason rebuild it - return code; - } - } - - const options = getBabelOptions(path); - const result = babel.transform(source, options); - - if (!result || !result.code || !result.map) { - throw new Error(`babel failed to transpile [${path}]`); - } - - cache.update(path, { - mtime, - map: result.map, - code: result.code, - }); - - return result.code; - } catch (error) { - throw error; - } -} - let installed = false; export function registerNodeAutoTranspilation() { @@ -135,16 +73,45 @@ export function registerNodeAutoTranspilation() { } installed = true; + const cacheLog = process.env.DEBUG_NODE_TRANSPILER_CACHE + ? Fs.createWriteStream(Path.resolve(REPO_ROOT, 'node_auto_transpilation_cache.log')) + : undefined; + + const cacheDir = Path.resolve( + REPO_ROOT, + 'data/node_auto_transpilation_cache_v5', + UPSTREAM_BRANCH + ); + + /** + * @babel/register uses a JSON encoded copy of the config + babel.version + * as the cache key for files, so we do something similar but we don't need + * a unique cache key for every file as our config isn't different for + * different files (by design). Instead we determine a unique prefix and + * automatically prepend all paths with the prefix to create cache keys + */ + const cache = new Cache({ + dir: cacheDir, + log: cacheLog, pathRoot: REPO_ROOT, - dir: Path.resolve(REPO_ROOT, 'data/node_auto_transpilation_cache_v4', UPSTREAM_BRANCH), - prefix: determineCachePrefix(), - log: process.env.DEBUG_NODE_TRANSPILER_CACHE - ? Fs.createWriteStream(Path.resolve(REPO_ROOT, 'node_auto_transpilation_cache.log'), { - flags: 'a', + prefix: Crypto.createHash('sha256') + .update( + JSON.stringify({ + synthPkgMapHash: readHashOfPackageMap(), + babelVersion, + peggyVersion, + // get a config for a fake js, ts, and tsx file to make sure we + // capture conditional config portions based on the file extension + js: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.js')), + ts: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.ts')), + tsx: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.tsx')), }) - : undefined, + ) + .digest('hex') + .slice(0, 8), }); + cacheLog?.write(`cache initialized\n`); sourceMapSupport.install({ handleUncaughtExceptions: false, @@ -152,39 +119,36 @@ export function registerNodeAutoTranspilation() { // @ts-expect-error bad source-map-support types retrieveSourceMap(path: string) { const map = cache.getSourceMap(path); - - if (map) { - return { - url: null, - map, - }; - } else { - return null; - } + return map ? { map, url: null } : null; }, }); - let compiling = false; - + let transformInProgress = false; addHook( (code, path) => { - if (compiling) { + if (transformInProgress) { return code; } - if (IGNORE_PATTERNS.some((re) => re.test(path))) { + const ext = Path.extname(path); + + if (ext !== '.peggy' && IGNORE_PATTERNS.some((re) => re.test(path))) { return code; } try { - compiling = true; - return compile(cache, code, path); + transformInProgress = true; + const transform = Object.hasOwn(TRANSFORMS, ext) + ? TRANSFORMS[ext as keyof typeof TRANSFORMS] + : TRANSFORMS.default; + + return transform(path, code, cache); } finally { - compiling = false; + transformInProgress = false; } }, { - exts: ['.js', '.ts', '.tsx'], + exts: ['.js', '.ts', '.tsx', '.peggy'], ignoreNodeModules: false, } ); diff --git a/packages/kbn-optimizer/src/node/transforms/babel.ts b/packages/kbn-optimizer/src/node/transforms/babel.ts new file mode 100644 index 0000000000000..6bbe7ba67f76a --- /dev/null +++ b/packages/kbn-optimizer/src/node/transforms/babel.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import * as babel from '@babel/core'; + +import { Transform } from './transform'; + +export function getBabelOptions(path: string) { + return babel.loadOptions({ + cwd: process.cwd(), + sourceRoot: Path.dirname(path) + Path.sep, + filename: path, + babelrc: false, + presets: [require.resolve('@kbn/babel-preset/node_preset')], + sourceMaps: 'both', + ast: false, + })!; +} + +export const babelTransform: Transform = (path, source, cache) => { + const mtime = `${Fs.statSync(path).mtimeMs}`; + + if (cache.getMtime(path) === mtime) { + const code = cache.getCode(path); + if (code) { + return code; + } + } + + const options = getBabelOptions(path); + const result = babel.transform(source, options); + + if (!result || !result.code || !result.map) { + throw new Error(`babel failed to transpile [${path}]`); + } + + cache.update(path, { + mtime, + code: result.code, + map: result.map, + }); + + return result.code; +}; diff --git a/packages/kbn-optimizer/src/node/transforms/index.ts b/packages/kbn-optimizer/src/node/transforms/index.ts new file mode 100644 index 0000000000000..bda2dcfa19826 --- /dev/null +++ b/packages/kbn-optimizer/src/node/transforms/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { peggyTransform } from './peggy'; +import { babelTransform } from './babel'; + +export const TRANSFORMS = { + '.peggy': peggyTransform, + default: babelTransform, +}; diff --git a/packages/kbn-optimizer/src/node/transforms/peggy.ts b/packages/kbn-optimizer/src/node/transforms/peggy.ts new file mode 100644 index 0000000000000..23edb608ef560 --- /dev/null +++ b/packages/kbn-optimizer/src/node/transforms/peggy.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Fs from 'fs'; +import Crypto from 'crypto'; + +import * as Peggy from '@kbn/peggy'; + +import { Transform } from './transform'; + +export const peggyTransform: Transform = (path, source, cache) => { + const config = Peggy.findConfigFile(path); + const mtime = `${Fs.statSync(path).mtimeMs}`; + const key = !config + ? path + : `${path}.config.${Crypto.createHash('sha256') + .update(config.source) + .digest('hex') + .slice(0, 8)}`; + + if (cache.getMtime(key) === mtime) { + const code = cache.getCode(key); + if (code) { + return code; + } + } + + const code = Peggy.getJsSourceSync({ + content: source, + path, + format: 'commonjs', + optimize: 'speed', + config, + skipConfigSearch: true, + }).source; + + cache.update(key, { + code, + mtime, + }); + + return code; +}; diff --git a/packages/kbn-interpreter/src/common/lib/grammar.d.ts b/packages/kbn-optimizer/src/node/transforms/transform.ts similarity index 75% rename from packages/kbn-interpreter/src/common/lib/grammar.d.ts rename to packages/kbn-optimizer/src/node/transforms/transform.ts index a9495dfac5b58..49c76a8c14bd9 100644 --- a/packages/kbn-interpreter/src/common/lib/grammar.d.ts +++ b/packages/kbn-optimizer/src/node/transforms/transform.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -declare module '*/grammar/built_grammar.js' { - export const parse: import('./parse').Parse; -} +import { Cache } from '../cache'; + +export type Transform = (path: string, source: string, cache: Cache) => string; diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 04074fb2b10b4..888089203be4b 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -239,6 +239,10 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker: loader: 'raw-loader', }, }, + { + test: /\.peggy$/, + loader: '@kbn/peggy-loader', + }, ], }, diff --git a/packages/kbn-peggy-loader/BUILD.bazel b/packages/kbn-peggy-loader/BUILD.bazel new file mode 100644 index 0000000000000..2d8bed8dd59a4 --- /dev/null +++ b/packages/kbn-peggy-loader/BUILD.bazel @@ -0,0 +1,128 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-peggy-loader" +PKG_REQUIRE_NAME = "@kbn/peggy-loader" + +SOURCE_FILES = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ + "//packages/kbn-peggy", + "@npm//peggy", + "@npm//webpack", +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "//packages/kbn-peggy:npm_module_types", + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/webpack", + "@npm//peggy", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +js_library( + name = "npm_module_types", + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-peggy-loader/README.mdx b/packages/kbn-peggy-loader/README.mdx new file mode 100644 index 0000000000000..2d0d587eaded3 --- /dev/null +++ b/packages/kbn-peggy-loader/README.mdx @@ -0,0 +1,10 @@ +--- +id: kibDevDocsOpsPeggyLoader +slug: /kibana-dev-docs/ops/peggy-loader +title: "@kbn/peggy" +description: A package which wraps @kbn/peggy for use in Webpack +date: 2022-05-18 +tags: ['kibana', 'dev', 'contributor', 'operations', 'peggy', 'loader'] +--- + +This package wraps the package so that webpack can consume it via its loader interface. This loader, like the `@kbn/peggy` package, loads config files next to grammar files for configuring the peggy parser-generator. \ No newline at end of file diff --git a/packages/kbn-peggy-loader/index.ts b/packages/kbn-peggy-loader/index.ts new file mode 100644 index 0000000000000..4fb6e7cdd8290 --- /dev/null +++ b/packages/kbn-peggy-loader/index.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getJsSource } from '@kbn/peggy'; +import webpack from 'webpack'; + +// eslint-disable-next-line import/no-default-export +export default function (this: webpack.loader.LoaderContext) { + this.cacheable(true); + + const callback = this.async(); + if (!callback) { + throw new Error('loader requires async support'); + } + + getJsSource({ + path: this.resourcePath, + format: 'esm', + optimize: 'size', + }).then((result) => { + if (result.config) { + this.addDependency(result.config.path); + } + + callback(null, result.source); + }, callback); +} diff --git a/packages/kbn-peggy-loader/jest.config.js b/packages/kbn-peggy-loader/jest.config.js new file mode 100644 index 0000000000000..1a481aa8c088b --- /dev/null +++ b/packages/kbn-peggy-loader/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-peggy-loader'], +}; diff --git a/packages/kbn-peggy-loader/kibana.jsonc b/packages/kbn-peggy-loader/kibana.jsonc new file mode 100644 index 0000000000000..e651946dce5eb --- /dev/null +++ b/packages/kbn-peggy-loader/kibana.jsonc @@ -0,0 +1,8 @@ +{ + "type": "shared-common", + "id": "@kbn/peggy-loader", + "owner": "@elastic/kibana-operations", + "devOnly": true, + "runtimeDeps": [], + "typeDeps": [], +} diff --git a/packages/kbn-peggy-loader/package.json b/packages/kbn-peggy-loader/package.json new file mode 100644 index 0000000000000..6c2807a006f4a --- /dev/null +++ b/packages/kbn-peggy-loader/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/peggy-loader", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "types": "./target_types/index.d.ts", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/kbn-peggy-loader/tsconfig.json b/packages/kbn-peggy-loader/tsconfig.json new file mode 100644 index 0000000000000..292157c18591a --- /dev/null +++ b/packages/kbn-peggy-loader/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ] +} diff --git a/packages/kbn-peggy/BUILD.bazel b/packages/kbn-peggy/BUILD.bazel new file mode 100644 index 0000000000000..dcb225c7da403 --- /dev/null +++ b/packages/kbn-peggy/BUILD.bazel @@ -0,0 +1,124 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-peggy" +PKG_REQUIRE_NAME = "@kbn/peggy" + +SOURCE_FILES = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ + "@npm//peggy", +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//peggy", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + emit_declaration_only = True, + out_dir = "target_types", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +js_library( + name = "npm_module_types", + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-peggy/README.mdx b/packages/kbn-peggy/README.mdx new file mode 100644 index 0000000000000..5d9779976b15a --- /dev/null +++ b/packages/kbn-peggy/README.mdx @@ -0,0 +1,23 @@ +--- +id: kibDevDocsOpsPeggy +slug: /kibana-dev-docs/ops/peggy +title: "@kbn/peggy" +description: A package which wraps the peggy library for use in Kibana +date: 2022-05-18 +tags: ['kibana', 'dev', 'contributor', 'operations', 'peggy'] +--- + +This package wraps the peggy package, exposing a synchronous and async version of the generator which includes two modifications: + + 1. When a `path` is provided a `${basename}.config.json` file will be loaded if it exists and is expected to include peggy config options as defined in [the peggy docs](https://peggyjs.org/documentation.html#generating-a-parser-javascript-api). This config will be used when compiling this file + +## Plugins +These types will automatically be included for plugins. + +## Packages + +To include these types in a package: + +- add `"//packages/kbn-ambient-ui-types"` to the `RUNTIME_DEPS` portion of the `BUILD.bazel` file. +- add `"//packages/kbn-ambient-ui-types:npm_module_types"` to the `TYPES_DEPS` portion of the `BUILD.bazel` file. +- add `"@kbn/ambient-ui-types"` to the `types` portion of the `tsconfig.json` file. \ No newline at end of file diff --git a/packages/kbn-peggy/index.ts b/packages/kbn-peggy/index.ts new file mode 100644 index 0000000000000..b5b35f131d2ee --- /dev/null +++ b/packages/kbn-peggy/index.ts @@ -0,0 +1,133 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; +import Fsp from 'fs/promises'; + +import Peggy from 'peggy'; + +export interface Options { + /** + * The path to the peggy content. If this is not defined then + * config files can not be found and `content` must be passed. + */ + path?: string; + /** + * Prevent loading the content from disk by specifying it here + */ + content?: string; + /** + * Prevent loading the config from disk by specifying it here + */ + config?: Config; + /** + * What type of module format should the generated code use. Defaults to + * commonjs for broadest compatibility + */ + format?: 'esm' | 'commonjs'; + /** + * Should the parser optimize for execution speed or size of the code + */ + optimize?: 'size' | 'speed'; + /** + * Disable checking for a config file a `{basename}.config.json` in + * the same directory as the grammar file. + */ + skipConfigSearch?: boolean; +} + +export interface Config { + /** the path of the discovered config file */ + path: string; + /** the content of the config file as a string (primarily for hashing) */ + source: string; + /** the parsed content of the config file */ + parsed: any; +} + +export interface Result { + /** + * The source code of the module which parses expressions in the format + * defined by the peggy grammar file + */ + config: Config | null; + + /** + * The loaded config if it was found + */ + source: string; +} + +export function findConfigFile(grammarPath: string): Config | undefined { + const path = Path.resolve(Path.dirname(grammarPath), `${Path.basename(grammarPath)}.config.json`); + + let source; + let parsed; + try { + source = Fs.readFileSync(path, 'utf8'); + parsed = JSON.parse(source); + } catch (error) { + if (error.code === 'ENOENT') { + return undefined; + } + + throw error; + } + + return { path, source, parsed }; +} + +export async function getJsSource(options: Options): Promise { + let source; + if (options.content) { + source = options.content; + } else if (options.path) { + source = await Fsp.readFile(options.path, 'utf8'); + } else { + throw new Error('you must either specify the path of the grammar file, or the content'); + } + + return getJsSourceSync({ + content: source, + ...options, + }); +} + +export function getJsSourceSync( + options: Options & { + /** The content of the grammar file to parse */ + content: string; + } +): Result { + const config = + options.config ?? + (options.path && options.skipConfigSearch !== true ? findConfigFile(options.path) : null); + + const result = Peggy.generate(options.content, { + ...config?.parsed, + format: options.format === 'esm' ? 'es' : 'commonjs', + optimize: options.optimize, + output: 'source', + }); + + return { + /** + * The source code of the module which parses expressions in the format + * defined by the peggy grammar file + */ + source: result as unknown as string, + + /** + * The loaded config if it was found + */ + config: config ?? null, + }; +} + +export const VERSION = Peggy.VERSION; diff --git a/packages/kbn-peggy/jest.config.js b/packages/kbn-peggy/jest.config.js new file mode 100644 index 0000000000000..be8ef99a01b3d --- /dev/null +++ b/packages/kbn-peggy/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-peggy'], +}; diff --git a/packages/kbn-peggy/kibana.jsonc b/packages/kbn-peggy/kibana.jsonc new file mode 100644 index 0000000000000..8b44dc5604d19 --- /dev/null +++ b/packages/kbn-peggy/kibana.jsonc @@ -0,0 +1,8 @@ +{ + "type": "shared-common", + "id": "@kbn/peggy", + "owner": "@elastic/kibana-operations", + "devOnly": true, + "runtimeDeps": [], + "typeDeps": [], +} diff --git a/packages/kbn-peggy/package.json b/packages/kbn-peggy/package.json new file mode 100644 index 0000000000000..cd976c2e8d97b --- /dev/null +++ b/packages/kbn-peggy/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/peggy", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "types": "./target_types/index.d.ts", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/kbn-peggy/tsconfig.json b/packages/kbn-peggy/tsconfig.json new file mode 100644 index 0000000000000..292157c18591a --- /dev/null +++ b/packages/kbn-peggy/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ] +} diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts b/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts index e216a4d538bf2..d1cb6c4aca107 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts +++ b/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts @@ -24,7 +24,7 @@ export const textCss = css` margin-left: ${euiThemeVars.euiSizeXS}; `; export const descriptionContainerCss = css` - margin-top: -${euiThemeVars.euiSizeXXL}; + margin-top: -${euiThemeVars.euiSizeL}; margin-bottom: -${euiThemeVars.euiSizeL}; `; diff --git a/packages/kbn-securitysolution-exception-list-components/src/translations.ts b/packages/kbn-securitysolution-exception-list-components/src/translations.ts index 38cb15f4b742e..7dfebe523c226 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/translations.ts +++ b/packages/kbn-securitysolution-exception-list-components/src/translations.ts @@ -11,14 +11,14 @@ import { i18n } from '@kbn/i18n'; export const EMPTY_VIEWER_STATE_EMPTY_TITLE = i18n.translate( 'exceptionList-components.empty.viewer.state.empty.title', { - defaultMessage: 'Add exceptions to this rule', + defaultMessage: 'Add exceptions to this list', } ); export const EMPTY_VIEWER_STATE_EMPTY_BODY = i18n.translate( 'exceptionList-components.empty.viewer.state.empty.body', { - defaultMessage: 'There is no exception in your rule. Create your first rule exception.', + defaultMessage: 'There is no exception in your list. Create your first exception.', } ); export const EMPTY_VIEWER_STATE_EMPTY_SEARCH_TITLE = i18n.translate( diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts index 78d61436306aa..b19662bcb4600 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts +++ b/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts @@ -6,12 +6,7 @@ * Side Public License, v 1. */ -import { - ENDPOINT_BLOCKLISTS_LIST_ID, - ENDPOINT_EVENT_FILTERS_LIST_ID, - ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, - ENDPOINT_TRUSTED_APPS_LIST_ID, -} from '@kbn/securitysolution-list-constants'; +import { ENDPOINT_ARTIFACT_LIST_IDS } from '@kbn/securitysolution-list-constants'; import * as t from 'io-ts'; import { @@ -32,13 +27,13 @@ export const internalCreateExceptionListSchema = t.intersection([ ), t.exact( t.partial({ - // TODO: Move the ALL_ENDPOINT_ARTIFACT_LIST_IDS inside the package and use it here instead - list_id: t.keyof({ - [ENDPOINT_TRUSTED_APPS_LIST_ID]: null, - [ENDPOINT_EVENT_FILTERS_LIST_ID]: null, - [ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID]: null, - [ENDPOINT_BLOCKLISTS_LIST_ID]: null, - }), + list_id: t.keyof( + ENDPOINT_ARTIFACT_LIST_IDS.reduce>((mapOfListIds, listId) => { + mapOfListIds[listId] = null; + + return mapOfListIds; + }, {}) + ), }) ), createExceptionListSchema, diff --git a/packages/kbn-securitysolution-list-constants/BUILD.bazel b/packages/kbn-securitysolution-list-constants/BUILD.bazel index ba79dbeb420fb..ac40cb7889e8d 100644 --- a/packages/kbn-securitysolution-list-constants/BUILD.bazel +++ b/packages/kbn-securitysolution-list-constants/BUILD.bazel @@ -36,11 +36,14 @@ NPM_MODULE_EXTRA_FILES = [ "README.md", ] -RUNTIME_DEPS = [] +RUNTIME_DEPS = [ + "//packages/kbn-std", +] TYPES_DEPS = [ "@npm//@types/jest", "@npm//@types/node", + "//packages/kbn-std:npm_module_types", ] jsts_transpiler( diff --git a/packages/kbn-securitysolution-list-constants/index.ts b/packages/kbn-securitysolution-list-constants/index.ts index 6a1241564cf30..7bc44b534caf2 100644 --- a/packages/kbn-securitysolution-list-constants/index.ts +++ b/packages/kbn-securitysolution-list-constants/index.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import { deepFreeze } from '@kbn/std'; + /** * Value list routes */ @@ -70,30 +72,76 @@ export const MAXIMUM_SMALL_VALUE_LIST_SIZE = 65536; export const MAXIMUM_SMALL_IP_RANGE_VALUE_LIST_DASH_SIZE = 200; -/** ID of trusted apps agnostic list */ -export const ENDPOINT_TRUSTED_APPS_LIST_ID = 'endpoint_trusted_apps'; +/** + * List definitions for Endpoint Artifact + */ +export const ENDPOINT_ARTIFACT_LISTS = deepFreeze({ + trustedApps: { + id: 'endpoint_trusted_apps', + name: 'Endpoint Security Trusted Apps List', + description: 'Endpoint Security Trusted Apps List', + }, + eventFilters: { + id: 'endpoint_event_filters', + name: 'Endpoint Security Event Filters List', + description: 'Endpoint Security Event Filters List', + }, + hostIsolationExceptions: { + id: 'endpoint_host_isolation_exceptions', + name: 'Endpoint Security Host isolation exceptions List', + description: 'Endpoint Security Host isolation exceptions List', + }, + blocklists: { + id: 'endpoint_blocklists', + name: 'Endpoint Security Blocklists List', + description: 'Endpoint Security Blocklists List', + }, +}); + +/** + * The IDs of all Endpoint artifact lists + */ +export const ENDPOINT_ARTIFACT_LIST_IDS = Object.freeze( + Object.values(ENDPOINT_ARTIFACT_LISTS).map(({ id }) => id) +); -/** Name of trusted apps agnostic list */ -export const ENDPOINT_TRUSTED_APPS_LIST_NAME = 'Endpoint Security Trusted Apps List'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_TRUSTED_APPS_LIST_ID = ENDPOINT_ARTIFACT_LISTS.trustedApps.id; -/** Description of trusted apps agnostic list */ -export const ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION = 'Endpoint Security Trusted Apps List'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_TRUSTED_APPS_LIST_NAME = ENDPOINT_ARTIFACT_LISTS.trustedApps.name; -/** ID of event filters agnostic list */ -export const ENDPOINT_EVENT_FILTERS_LIST_ID = 'endpoint_event_filters'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION = + ENDPOINT_ARTIFACT_LISTS.trustedApps.description; -/** Name of event filters agnostic list */ -export const ENDPOINT_EVENT_FILTERS_LIST_NAME = 'Endpoint Security Event Filters List'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_EVENT_FILTERS_LIST_ID = ENDPOINT_ARTIFACT_LISTS.eventFilters.id; -/** Description of event filters agnostic list */ -export const ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION = 'Endpoint Security Event Filters List'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_EVENT_FILTERS_LIST_NAME = ENDPOINT_ARTIFACT_LISTS.eventFilters.name; -export const ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID = 'endpoint_host_isolation_exceptions'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION = + ENDPOINT_ARTIFACT_LISTS.eventFilters.description; + +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID = + ENDPOINT_ARTIFACT_LISTS.hostIsolationExceptions.id; + +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ export const ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_NAME = - 'Endpoint Security Host isolation exceptions List'; + ENDPOINT_ARTIFACT_LISTS.hostIsolationExceptions.name; + +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ export const ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_DESCRIPTION = - 'Endpoint Security Host isolation exceptions List'; + ENDPOINT_ARTIFACT_LISTS.hostIsolationExceptions.description; + +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_BLOCKLISTS_LIST_ID = ENDPOINT_ARTIFACT_LISTS.blocklists.id; + +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_BLOCKLISTS_LIST_NAME = ENDPOINT_ARTIFACT_LISTS.blocklists.name; -export const ENDPOINT_BLOCKLISTS_LIST_ID = 'endpoint_blocklists'; -export const ENDPOINT_BLOCKLISTS_LIST_NAME = 'Endpoint Security Blocklists List'; -export const ENDPOINT_BLOCKLISTS_LIST_DESCRIPTION = 'Endpoint Security Blocklists List'; +/** @deprecated Use `ENDPOINT_ARTIFACT_LISTS` instead */ +export const ENDPOINT_BLOCKLISTS_LIST_DESCRIPTION = ENDPOINT_ARTIFACT_LISTS.blocklists.description; diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 3d00fb88a089a..cca984fbe83b5 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -82,6 +82,12 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { loader: 'raw-loader', }, }, + { + test: /\.peggy$/, + use: { + loader: '@kbn/peggy-loader', + }, + }, { test: /\.scss$/, exclude: /\.module.(s(a|c)ss)$/, diff --git a/packages/kbn-test/BUILD.bazel b/packages/kbn-test/BUILD.bazel index 56b3829fc77a5..425ef3864406f 100644 --- a/packages/kbn-test/BUILD.bazel +++ b/packages/kbn-test/BUILD.bazel @@ -100,6 +100,7 @@ TYPES_DEPS = [ "//packages/kbn-bazel-packages:npm_module_types", "//packages/kbn-get-repo-files:npm_module_types", "//packages/kbn-ftr-screenshot-filename:npm_module_types", + "//packages/kbn-peggy:npm_module_types", "@npm//@elastic/elasticsearch", "@npm//@jest/console", "@npm//@jest/reporters", @@ -119,6 +120,7 @@ TYPES_DEPS = [ "@npm//rxjs", "@npm//playwright", "@npm//xmlbuilder", + "@npm//@jest/transform", "@npm//@types/archiver", "@npm//@types/chance", "@npm//@types/dedent", diff --git a/packages/kbn-test/jest-preset.js b/packages/kbn-test/jest-preset.js index 2c4b3a960e59c..7eb6c8377ebe2 100644 --- a/packages/kbn-test/jest-preset.js +++ b/packages/kbn-test/jest-preset.js @@ -120,9 +120,9 @@ module.exports = { // A map from regular expressions to paths to transformers transform: { - '^.+\\.(js|tsx?)$': '/node_modules/@kbn/test/target_node/src/jest/babel_transform.js', - '^.+\\.txt?$': '/node_modules/@kbn/test/target_node/src/jest/raw_transform.js', - '^.+\\.html?$': '/node_modules/@kbn/test/target_node/src/jest/raw_transform.js', + '^.+\\.(js|tsx?)$': '/node_modules/@kbn/test/target_node/src/jest/transforms/babel.js', + '^.+\\.(txt|html)?$': '/node_modules/@kbn/test/target_node/src/jest/transforms/raw.js', + '^.+\\.peggy?$': '/node_modules/@kbn/test/target_node/src/jest/transforms/peggy.js', }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation diff --git a/packages/kbn-test/src/functional_test_runner/lib/es_version.ts b/packages/kbn-test/src/functional_test_runner/lib/es_version.ts index 976a2c417c747..ccdd9cc902c5b 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/es_version.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/es_version.ts @@ -38,6 +38,10 @@ export class EsVersion { this.parsed = parsed; } + toJSON() { + return this.toString(); + } + toString() { return this.parsed.version; } diff --git a/packages/kbn-test/src/jest/babel_transform.js b/packages/kbn-test/src/jest/transforms/babel.js similarity index 100% rename from packages/kbn-test/src/jest/babel_transform.js rename to packages/kbn-test/src/jest/transforms/babel.js diff --git a/packages/kbn-test/src/jest/transforms/peggy.js b/packages/kbn-test/src/jest/transforms/peggy.js new file mode 100644 index 0000000000000..ec32d03150b53 --- /dev/null +++ b/packages/kbn-test/src/jest/transforms/peggy.js @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const Peggy = require('@kbn/peggy'); +const Crypto = require('crypto'); + +/** @type {import('@jest/transform').AsyncTransformer} */ +module.exports = { + canInstrument: false, + + getCacheKey(sourceText, sourcePath) { + const config = Peggy.findConfigFile(sourcePath); + return ( + Crypto.createHash('sha256').update(sourceText).digest('hex') + + (!config ? '' : `-${Crypto.createHash('sha256').update(config.source).digest('hex')}`) + ); + }, + + process(sourceText, sourcePath) { + return { + code: Peggy.getJsSourceSync({ + content: sourceText, + path: sourcePath, + format: 'commonjs', + optimize: 'speed', + }).source, + }; + }, +}; diff --git a/packages/kbn-test/src/jest/raw_transform.js b/packages/kbn-test/src/jest/transforms/raw.js similarity index 100% rename from packages/kbn-test/src/jest/raw_transform.js rename to packages/kbn-test/src/jest/transforms/raw.js diff --git a/packages/kbn-timelion-grammar/BUILD.bazel b/packages/kbn-timelion-grammar/BUILD.bazel index 3c7ea13cadf64..7898fef88f1fc 100644 --- a/packages/kbn-timelion-grammar/BUILD.bazel +++ b/packages/kbn-timelion-grammar/BUILD.bazel @@ -1,32 +1,18 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library") -load("@npm//peggy:index.bzl", "peggy") load("//src/dev/bazel:index.bzl", "pkg_npm") PKG_DIRNAME = "kbn-timelion-grammar" PKG_REQUIRE_NAME = "@kbn/timelion-grammar" NPM_MODULE_EXTRA_FILES = [ + "index.js", + "chain.peggy", "package.json", ] -peggy( - name = "grammar", - data = [ - ":grammar/chain.peggy" - ], - output_dir = True, - args = [ - "-o", - "$(@D)/built_grammar.js", - "./%s/grammar/chain.peggy" % package_name() - ], -) - js_library( name = PKG_DIRNAME, - srcs = NPM_MODULE_EXTRA_FILES + [ - ":grammar" - ], + srcs = NPM_MODULE_EXTRA_FILES, package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) diff --git a/packages/kbn-timelion-grammar/grammar/chain.peggy b/packages/kbn-timelion-grammar/chain.peggy similarity index 100% rename from packages/kbn-timelion-grammar/grammar/chain.peggy rename to packages/kbn-timelion-grammar/chain.peggy diff --git a/packages/kbn-es-query/src/kuery/grammar/grammar.d.ts b/packages/kbn-timelion-grammar/index.js similarity index 82% rename from packages/kbn-es-query/src/kuery/grammar/grammar.d.ts rename to packages/kbn-timelion-grammar/index.js index 245f6839d7d04..6dd2fdb6abea7 100644 --- a/packages/kbn-es-query/src/kuery/grammar/grammar.d.ts +++ b/packages/kbn-timelion-grammar/index.js @@ -6,6 +6,4 @@ * Side Public License, v 1. */ -declare module '*/grammar/built_grammar.js' { - export const parse: any; -} +module.exports = require('./chain.peggy'); diff --git a/packages/kbn-timelion-grammar/package.json b/packages/kbn-timelion-grammar/package.json index 4676d1e6b94d9..5b519870c423d 100644 --- a/packages/kbn-timelion-grammar/package.json +++ b/packages/kbn-timelion-grammar/package.json @@ -2,6 +2,5 @@ "name": "@kbn/timelion-grammar", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "private": true, - "main": "grammar/built_grammar.js" + "private": true } \ No newline at end of file diff --git a/packages/kbn-tinymath/BUILD.bazel b/packages/kbn-tinymath/BUILD.bazel index b8ee25a4973b8..b9f1fb9daf849 100644 --- a/packages/kbn-tinymath/BUILD.bazel +++ b/packages/kbn-tinymath/BUILD.bazel @@ -1,5 +1,4 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library") -load("@npm//peggy:index.bzl", "peggy") load("//src/dev/bazel:index.bzl", "pkg_npm") PKG_DIRNAME = "kbn-tinymath" @@ -31,25 +30,9 @@ RUNTIME_DEPS = [ "@npm//lodash", ] -peggy( - name = "grammar", - data = [ - ":grammar/grammar.peggy" - ], - output_dir = True, - args = [ - "-o", - "$(@D)/built_grammar.js", - "./%s/grammar/grammar.peggy" % package_name() - ], -) - js_library( name = PKG_DIRNAME, - srcs = NPM_MODULE_EXTRA_FILES + [ - ":srcs", - ":grammar" - ], + srcs = NPM_MODULE_EXTRA_FILES + [":srcs"], deps = RUNTIME_DEPS, package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], diff --git a/packages/kbn-tinymath/grammar/grammar.peggy b/packages/kbn-tinymath/src/grammar.peggy similarity index 100% rename from packages/kbn-tinymath/grammar/grammar.peggy rename to packages/kbn-tinymath/src/grammar.peggy diff --git a/packages/kbn-tinymath/src/index.js b/packages/kbn-tinymath/src/index.js index dd23b0847c999..5bc7d80faff9e 100644 --- a/packages/kbn-tinymath/src/index.js +++ b/packages/kbn-tinymath/src/index.js @@ -9,7 +9,7 @@ const { get } = require('lodash'); const memoizeOne = require('memoize-one'); const { functions: includedFunctions } = require('./functions'); -const { parse: parseFn } = require('../grammar/built_grammar.js'); +const { parse: parseFn } = require('./grammar.peggy'); function parse(input, options) { if (input == null) { diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index 97006c36eb285..91d64b9159be9 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -50,6 +50,7 @@ RUNTIME_DEPS = [ "//packages/kbn-std", "//packages/kbn-ui-shared-deps-npm", "//packages/kbn-ui-theme", + "//packages/kbn-peggy-loader", ] TYPES_DEPS = [ diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index 85d14314c5c60..bebe6eb424f06 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -56,6 +56,10 @@ module.exports = { }, ], }, + { + test: /\.peggy$/, + use: ['@kbn/peggy-loader'], + }, { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'], diff --git a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts index 9d7c1463620e7..057dd9973bb23 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts @@ -132,7 +132,7 @@ describe('checking migration metadata changes on all registered SO types', () => "siem-ui-timeline-pinned-event": "e2697b38751506c7fce6e8b7207a830483dc4283", "space": "c4a0acce1bd4b9cce85154f2a350624a53111c59", "spaces-usage-stats": "922d3235bbf519e3fb3b260e27248b1df8249b79", - "synthetics-monitor": "111811218f7e34f40980665a4eb99976f457bb23", + "synthetics-monitor": "d784b64a3def47d3f3d1f367df71ae41ef33cb3c", "synthetics-privates-locations": "dd00385f4a27ef062c3e57312eeb3799872fa4af", "tag": "39413f4578cc2128c9a0fda97d0acd1c8862c47a", "task": "ef53d0f070bd54957b8fe22fae3b1ff208913f76", diff --git a/src/dev/build/lib/integration_tests/scan_copy.test.ts b/src/dev/build/lib/integration_tests/scan_copy.test.ts index dd69ad78789a7..464821707dbab 100644 --- a/src/dev/build/lib/integration_tests/scan_copy.test.ts +++ b/src/dev/build/lib/integration_tests/scan_copy.test.ts @@ -89,7 +89,7 @@ it('applies filter function specified', async () => { await scanCopy({ source: FIXTURES, destination, - filter: (record) => !record.name.includes('bar'), + filter: (record) => !record.source.name.includes('bar'), }); expect((await getChildPaths(resolve(destination, 'foo_dir'))).sort()).toEqual([ diff --git a/src/dev/build/lib/scan_copy.ts b/src/dev/build/lib/scan_copy.ts index d8285e1853173..1c5e29f420588 100644 --- a/src/dev/build/lib/scan_copy.ts +++ b/src/dev/build/lib/scan_copy.ts @@ -9,11 +9,16 @@ import Fs from 'fs'; import Fsp from 'fs/promises'; import Path from 'path'; - -import { asyncMap, asyncForEach } from '@kbn/std'; +import * as Rx from 'rxjs'; import { assertAbsolute, mkdirp } from './fs'; +const fsReadDir$ = Rx.bindNodeCallback( + (path: string, cb: (err: Error | null, ents: Fs.Dirent[]) => void) => { + Fs.readdir(path, { withFileTypes: true }, cb); + } +); + interface Options { /** * directory to copy from @@ -26,75 +31,158 @@ interface Options { /** * function that is called with each Record */ - filter?: (record: Record) => boolean; + filter?: (record: Readonly) => boolean; /** * define permissions for reach item copied */ - permissions?: (record: Record) => number | undefined; + permissions?: (record: Readonly) => number | undefined; /** * Date to use for atime/mtime */ time?: Date; + /** + * + */ + map?: (record: Readonly) => Promise; } -class Record { +export class SomePath { + static fromAbs(path: string) { + return new SomePath(Path.dirname(path), Path.basename(path)); + } + constructor( - public isDirectory: boolean, - public name: string, - public absolute: string, - public absoluteDest: string + /** The directory of the item at this path */ + public readonly dir: string, + /** The name of the item at this path */ + public readonly name: string ) {} + + private _abs: string | null = null; + /** The absolute path of the file */ + public get abs() { + if (this._abs === null) { + this._abs = Path.resolve(this.dir, this.name); + } + + return this._abs; + } + + private _ext: string | null = null; + /** The extension of the filename, starts with a . like the Path.extname API */ + public get ext() { + if (this._ext === null) { + this._ext = Path.extname(this.name); + } + + return this._ext; + } + + /** return a file path with the file name changed to `name` */ + withName(name: string) { + return new SomePath(this.dir, name); + } + + /** return a file path with the file extension changed to `extension` */ + withExt(extension: string) { + return new SomePath(this.dir, Path.basename(this.name, this.ext) + extension); + } + + child(childName: string) { + return new SomePath(this.abs, childName); + } +} + +interface DirRecord { + type: 'dir'; + source: SomePath; + dest: SomePath; +} + +interface FileRecord { + type: 'file'; + source: SomePath; + dest: SomePath; + content?: string; } +type Record = FileRecord | DirRecord; + /** * Copy all of the files from one directory to another, optionally filtered with a * function or modifying mtime/atime for each file. */ export async function scanCopy(options: Options) { - const { source, destination, filter, time, permissions } = options; + const { source, destination, filter, time, permissions, map } = options; assertAbsolute(source); assertAbsolute(destination); - // create or copy each child of a directory - const copyChildren = async (parent: Record) => { - const names = await Fsp.readdir(parent.absolute); + /** + * recursively fetch all the file records within a directory, starting with the + * files in the passed directory, then the files in all the child directories in + * no particular order + */ + const readDir$ = (dir: DirRecord): Rx.Observable => + fsReadDir$(dir.source.abs).pipe( + Rx.mergeAll(), + Rx.mergeMap((ent) => { + const rec: Record = { + type: ent.isDirectory() ? 'dir' : 'file', + source: dir.source.child(ent.name), + dest: dir.dest.child(ent.name), + }; - const records = await asyncMap(names, async (name) => { - const absolute = Path.join(parent.absolute, name); - const stat = await Fsp.stat(absolute); - return new Record(stat.isDirectory(), name, absolute, Path.join(parent.absoluteDest, name)); - }); + if (filter && !filter(rec)) { + return Rx.EMPTY; + } + + return Rx.of(rec); + }) + ); - await asyncForEach(records, async (rec) => { - if (filter && !filter(rec)) { - return; + const handleGenericRec = async (rec: Record) => { + if (permissions) { + const perm = permissions(rec); + if (perm !== undefined) { + await Fsp.chmod(rec.dest.abs, perm); } + } + + if (time) { + await Fsp.utimes(rec.dest.abs, time, time); + } + }; - if (rec.isDirectory) { - await Fsp.mkdir(rec.absoluteDest, { - mode: permissions ? permissions(rec) : undefined, + const handleDir$ = (rec: DirRecord): Rx.Observable => + Rx.defer(async () => { + await mkdirp(rec.dest.abs); + await handleGenericRec(rec); + }).pipe( + Rx.mergeMap(() => readDir$(rec)), + Rx.mergeMap((ent) => (ent.type === 'dir' ? handleDir$(ent) : handleFile$(ent))) + ); + + const handleFile$ = (srcRec: FileRecord): Rx.Observable => + Rx.defer(async () => { + const rec = (map && (await map(srcRec))) ?? srcRec; + + if (rec.content) { + await Fsp.writeFile(rec.dest.abs, rec.content, { + flag: 'wx', }); } else { - await Fsp.copyFile(rec.absolute, rec.absoluteDest, Fs.constants.COPYFILE_EXCL); - if (permissions) { - const perm = permissions(rec); - if (perm !== undefined) { - await Fsp.chmod(rec.absoluteDest, perm); - } - } + await Fsp.copyFile(rec.source.abs, rec.dest.abs, Fs.constants.COPYFILE_EXCL); } - if (time) { - await Fsp.utimes(rec.absoluteDest, time, time); - } - - if (rec.isDirectory) { - await copyChildren(rec); - } + await handleGenericRec(rec); }); - }; - await mkdirp(destination); - await copyChildren(new Record(true, Path.basename(source), source, destination)); + await Rx.lastValueFrom( + handleDir$({ + type: 'dir', + source: SomePath.fromAbs(source), + dest: SomePath.fromAbs(destination), + }) + ); } diff --git a/src/dev/build/tasks/build_packages_task.ts b/src/dev/build/tasks/build_packages_task.ts index fdb32731fdd8e..2cb0bb585b56a 100644 --- a/src/dev/build/tasks/build_packages_task.ts +++ b/src/dev/build/tasks/build_packages_task.ts @@ -11,8 +11,9 @@ import Path from 'path'; import { REPO_ROOT } from '@kbn/utils'; import { discoverBazelPackages } from '@kbn/bazel-packages'; import { runBazel } from '@kbn/bazel-runner'; +import * as Peggy from '@kbn/peggy'; -import { Task, scanCopy, write } from '../lib'; +import { Task, scanCopy, write, deleteAll } from '../lib'; export const BuildBazelPackages: Task = { description: 'Building distributable versions of Bazel packages', @@ -26,16 +27,54 @@ export const BuildBazelPackages: Task = { log.info(`Copying build of`, pkg.manifest.id, 'into build'); const pkgDirInBuild = build.resolvePath(pkg.normalizedRepoRelativeDir); + const peggyConfigOutputPaths = new Set(); + const pkgBuildDir = config.resolveFromRepo( + 'bazel-bin', + pkg.normalizedRepoRelativeDir, + 'npm_module' + ); // copy the built npm_module target dir into the build, package.json is updated to copy // the sources we actually end up using into the node_modules directory when we run // yarn install await scanCopy({ - source: config.resolveFromRepo('bazel-bin', pkg.normalizedRepoRelativeDir, 'npm_module'), + source: pkgBuildDir, destination: pkgDirInBuild, - permissions: (rec) => (rec.isDirectory ? 0o755 : 0o644), + permissions: (rec) => (rec.type === 'file' ? 0o644 : 0o755), + filter: (rec) => !(rec.type === 'dir' && rec.source.name === 'target_web'), + async map(rec) { + const extname = Path.extname(rec.source.name); + if (extname !== '.peggy') { + return undefined; + } + + const result = await Peggy.getJsSource({ + path: rec.source.abs, + format: 'commonjs', + optimize: 'speed', + }); + + if (result.config) { + // if there was a config file for this peggy grammar, capture its output path and + // delete it after the copy is complete + peggyConfigOutputPaths.add( + Path.resolve(pkgDirInBuild, Path.relative(pkgBuildDir, result.config.path)) + ); + } + + return { + ...rec, + dest: rec.dest.withName(rec.dest.name + '.js'), + content: result.source, + }; + }, }); + // cleanup any peggy config files + if (peggyConfigOutputPaths.size) { + await deleteAll(Array.from(peggyConfigOutputPaths), log); + } + await write( Path.resolve(pkgDirInBuild, 'kibana.jsonc'), JSON.stringify(pkg.manifest, null, 2) diff --git a/src/plugins/data_view_management/public/components/__snapshots__/utils.test.ts.snap b/src/plugins/data_view_management/public/components/__snapshots__/utils.test.ts.snap index f6835dacc4d2d..59bdcb5d4360e 100644 --- a/src/plugins/data_view_management/public/components/__snapshots__/utils.test.ts.snap +++ b/src/plugins/data_view_management/public/components/__snapshots__/utils.test.ts.snap @@ -23,7 +23,7 @@ Array [ "id": "test1", "name": "Test Name 1", "namespaces": undefined, - "sort": "1test name 1", + "sort": "1Test Name 1", "tags": Array [], "title": "test name 1", }, diff --git a/src/plugins/data_view_management/public/components/utils.ts b/src/plugins/data_view_management/public/components/utils.ts index a7ae08b365ea4..5ba434048dc4d 100644 --- a/src/plugins/data_view_management/public/components/utils.ts +++ b/src/plugins/data_view_management/public/components/utils.ts @@ -38,6 +38,7 @@ export async function getIndexPatterns(defaultIndex: string, dataViewsService: D const { id, title, namespaces, name } = idxPattern; const isDefault = defaultIndex === id; const tags = getTags(idxPattern, isDefault); + const displayName = name ? name : title; return { id, @@ -48,9 +49,9 @@ export async function getIndexPatterns(defaultIndex: string, dataViewsService: D tags, // the prepending of 0 at the default pattern takes care of prioritization // so the sorting will but the default index on top - // or on bottom of a the table - sort: `${isDefault ? '0' : '1'}${title}`, - getName: () => (name ? name : title), + // or on bottom of the table + sort: `${isDefault ? '0' : '1'}${displayName}`, + getName: () => displayName, }; }); diff --git a/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx b/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx new file mode 100644 index 0000000000000..87dcbb2297c4f --- /dev/null +++ b/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_tab.tsx @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { useQuerySubscriber } from '@kbn/unified-field-list-plugin/public'; +import { FieldStatisticsTable, type FieldStatisticsTableProps } from './field_stats_table'; +import { useDiscoverServices } from '../../../../hooks/use_discover_services'; + +export const FieldStatisticsTab: React.FC> = + React.memo((props) => { + const services = useDiscoverServices(); + const querySubscriberResult = useQuerySubscriber({ + data: services.data, + }); + + return ( + + ); + }); diff --git a/src/plugins/discover/public/application/main/components/field_stats_table/index.ts b/src/plugins/discover/public/application/main/components/field_stats_table/index.ts index b418366481fa0..937155f0e09d6 100644 --- a/src/plugins/discover/public/application/main/components/field_stats_table/index.ts +++ b/src/plugins/discover/public/application/main/components/field_stats_table/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { FieldStatisticsTable } from './field_stats_table'; +export { FieldStatisticsTable, type FieldStatisticsTableProps } from './field_stats_table'; +export { FieldStatisticsTab } from './field_stats_tab'; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx index 100412c8f7930..86428fff1ed91 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx @@ -20,13 +20,11 @@ import { DocumentViewModeToggle, VIEW_MODE } from '../../../../components/view_m import { DocViewFilterFn } from '../../../../services/doc_views/doc_views_types'; import { DataRefetch$, SavedSearchData } from '../../hooks/use_saved_search'; import { AppState, GetStateReturn } from '../../services/discover_state'; -import { FieldStatisticsTable } from '../field_stats_table'; +import { FieldStatisticsTab } from '../field_stats_table'; import { DiscoverDocuments } from './discover_documents'; import { DOCUMENTS_VIEW_CLICK, FIELD_STATISTICS_VIEW_CLICK } from '../field_stats_table/constants'; import { useDiscoverHistogram } from './use_discover_histogram'; -const FieldStatisticsTableMemoized = React.memo(FieldStatisticsTable); - export interface DiscoverMainContentProps { isPlainRecord: boolean; dataView: DataView; @@ -161,12 +159,10 @@ export const DiscoverMainContent = ({ onFieldEdited={!isPlainRecord ? onFieldEdited : undefined} /> ) : ( - ({ + query: { query: '', language: 'lucene' }, + filters: [], + }), }, }, dataViews: dataViewPluginMocks.createStartContract(), diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx index 03e742da3514f..5513483b2b03c 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx @@ -16,12 +16,12 @@ import classNames from 'classnames'; import { FieldButton, FieldIcon } from '@kbn/react-field'; import type { DataViewField, DataView } from '@kbn/data-views-plugin/public'; import { - FieldStats, FieldPopover, FieldPopoverHeader, FieldPopoverHeaderProps, FieldPopoverVisualize, } from '@kbn/unified-field-list-plugin/public'; +import { DiscoverFieldStats } from './discover_field_stats'; import { getTypeForFieldIcon } from '../../../../utils/get_type_for_field_icon'; import { DiscoverFieldDetails } from './discover_field_details'; import { FieldDetails } from './types'; @@ -29,7 +29,6 @@ import { getFieldTypeName } from '../../../../utils/get_field_type_name'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; import { SHOW_LEGACY_FIELD_TOP_VALUES, PLUGIN_ID } from '../../../../../common'; import { getUiActions } from '../../../../kibana_services'; -import { useAppStateSelector } from '../../services/discover_app_state_container'; function wrapOnDot(str?: string) { // u200B is a non-width white-space character, which allows @@ -284,11 +283,8 @@ function DiscoverFieldComponent({ contextualFields, }: DiscoverFieldProps) { const services = useDiscoverServices(); - const { data } = services; const [infoIsOpen, setOpen] = useState(false); const isDocumentRecord = !!onAddFilter; - const query = useAppStateSelector((state) => state.query); - const filters = useAppStateSelector((state) => state.filters); const addFilterAndClosePopover: typeof onAddFilter | undefined = useMemo( () => @@ -389,12 +385,6 @@ function DiscoverFieldComponent({ } const renderPopover = () => { - const dateRange = data?.query?.timefilter.timefilter.getAbsoluteTime(); - // prioritize an aggregatable multi field if available or take the parent field - const fieldForStats = - (multiFields?.length && - multiFields.find((multiField) => multiField.field.aggregatable)?.field) || - field; const showLegacyFieldStats = services.uiSettings.get(SHOW_LEGACY_FIELD_TOP_VALUES); return ( @@ -420,21 +410,12 @@ function DiscoverFieldComponent({ )} ) : ( - <> - {Boolean(dateRange) && ( - - )} - + )} {multiFields && ( diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_field_stats.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_field_stats.tsx new file mode 100644 index 0000000000000..6ba6807cf9370 --- /dev/null +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_field_stats.tsx @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useMemo } from 'react'; +import { + FieldStats, + FieldStatsProps, + useQuerySubscriber, +} from '@kbn/unified-field-list-plugin/public'; +import type { DataViewField, DataView } from '@kbn/data-views-plugin/public'; +import { useDiscoverServices } from '../../../../hooks/use_discover_services'; + +export interface DiscoverFieldStatsProps { + field: DataViewField; + dataView: DataView; + multiFields?: Array<{ field: DataViewField; isSelected: boolean }>; + onAddFilter: FieldStatsProps['onAddFilter']; +} + +export const DiscoverFieldStats: React.FC = React.memo( + ({ field, dataView, multiFields, onAddFilter }) => { + const services = useDiscoverServices(); + const dateRange = services.data?.query?.timefilter.timefilter.getAbsoluteTime(); + const querySubscriberResult = useQuerySubscriber({ + data: services.data, + }); + // prioritize an aggregatable multi field if available or take the parent field + const fieldForStats = useMemo( + () => + (multiFields?.length && + multiFields.find((multiField) => multiField.field.aggregatable)?.field) || + field, + [field, multiFields] + ); + + if (!dateRange || !querySubscriberResult.query || !querySubscriberResult.filters) { + return null; + } + + return ( + + ); + } +); diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx index 40cab06039f6e..7f2134a758018 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx @@ -110,6 +110,10 @@ const mockServices = { }), }, }, + getState: () => ({ + query: { query: '', language: 'lucene' }, + filters: [], + }), }, }, dataViews: dataViewPluginMocks.createStartContract(), diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.scss b/src/plugins/discover/public/components/discover_grid/discover_grid.scss index 09aa45f76d9f4..a80f2cd6b5534 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.scss +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.scss @@ -39,6 +39,14 @@ font-family: $euiCodeFontFamily; } +.dscDiscoverGrid__cellPopover { + // Fixes https://github.com/elastic/kibana/issues/145216 in Chrome + .lines-content.monaco-editor-background { + overflow: unset !important; + contain: unset !important; + } +} + .dscDiscoverGrid__cellPopoverValue { font-family: $euiCodeFontFamily; font-size: $euiFontSizeS; diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx index c732f06a05dd7..b7a0d308b7b93 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -45,7 +45,7 @@ import { SHOW_MULTIFIELDS, } from '../../../common'; import { DiscoverGridDocumentToolbarBtn } from './discover_grid_document_selection'; -import { getFieldsToShow } from '../../utils/get_fields_to_show'; +import { getShouldShowFieldHandler } from '../../utils/get_should_show_field_handler'; import type { DataTableRecord, ValueToStringConverter } from '../../types'; import { useRowHeightsOptions } from '../../hooks/use_row_heights_options'; import { useDiscoverServices } from '../../hooks/use_discover_services'; @@ -341,9 +341,9 @@ export const DiscoverGrid = ({ const showMultiFields = services.uiSettings.get(SHOW_MULTIFIELDS); - const fieldsToShow = useMemo(() => { + const shouldShowFieldHandler = useMemo(() => { const dataViewFields = dataView.fields.getAll().map((fld) => fld.name); - return getFieldsToShow(dataViewFields, dataView, showMultiFields); + return getShouldShowFieldHandler(dataViewFields, dataView, showMultiFields); }, [dataView, showMultiFields]); /** @@ -355,11 +355,11 @@ export const DiscoverGrid = ({ dataView, displayedRows, useNewFieldsApi, - fieldsToShow, + shouldShowFieldHandler, services.uiSettings.get(MAX_DOC_FIELDS_DISPLAYED), () => dataGridRef.current?.closeCellPopover() ), - [dataView, displayedRows, useNewFieldsApi, fieldsToShow, services.uiSettings] + [dataView, displayedRows, useNewFieldsApi, shouldShowFieldHandler, services.uiSettings] ); /** diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx index dda86fb0ebdc2..961a78be3d869 100644 --- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx +++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx @@ -79,7 +79,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - [], + () => false, 100, jest.fn() ); @@ -104,7 +104,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - [], + () => false, 100, jest.fn() ); @@ -130,7 +130,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFields.map(build), false, - [], + () => false, 100, closePopoverMockFn ); @@ -157,7 +157,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - ['extension', 'bytes'], + (fieldName) => ['extension', 'bytes'].includes(fieldName), 100, jest.fn() ); @@ -231,7 +231,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - [], + () => false, 100, jest.fn() ); @@ -248,6 +248,7 @@ describe('Discover grid cell rendering', function () { ); expect(component).toMatchInlineSnapshot(` ['extension', 'bytes'].includes(fieldName), 100, jest.fn() ); @@ -382,7 +383,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFields.map(build), true, - ['extension', 'bytes'], + (fieldName) => ['extension', 'bytes'].includes(fieldName), // this is the number of rendered items 1, jest.fn() @@ -461,7 +462,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFields.map(build), true, - [], + (fieldName) => false, 100, jest.fn() ); @@ -478,6 +479,7 @@ describe('Discover grid cell rendering', function () { ); expect(component).toMatchInlineSnapshot(` ['object.value', 'extension', 'bytes'].includes(fieldName), 100, jest.fn() ); @@ -581,7 +583,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFieldsWithTopLevelObject.map(build), true, - ['extension', 'bytes', 'object.value'], + (fieldName) => ['extension', 'bytes', 'object.value'].includes(fieldName), 100, jest.fn() ); @@ -623,7 +625,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFieldsWithTopLevelObject.map(build), true, - [], + () => false, 100, closePopoverMockFn ); @@ -640,6 +642,7 @@ describe('Discover grid cell rendering', function () { ); expect(component).toMatchInlineSnapshot(` false, 100, closePopoverMockFn ); @@ -716,7 +719,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFieldsWithTopLevelObject.map(build), true, - [], + () => false, 100, jest.fn() ); @@ -750,7 +753,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - [], + () => false, 100, jest.fn() ); @@ -775,7 +778,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsSource.map(build), false, - [], + () => false, 100, jest.fn() ); @@ -813,7 +816,7 @@ describe('Discover grid cell rendering', function () { dataViewMock, rowsFieldsUnmapped.map(build), true, - ['unmapped'], + (fieldName) => ['unmapped'].includes(fieldName), 100, jest.fn() ); diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx index 5636e31efff5c..ca9dd61134e46 100644 --- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx +++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx @@ -29,6 +29,7 @@ import { formatHit } from '../../utils/format_hit'; import { DataTableRecord, EsHitRecord } from '../../types'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { MAX_DOC_FIELDS_DISPLAYED } from '../../../common'; +import { type ShouldShowFieldInTableHandler } from '../../utils/get_should_show_field_handler'; const CELL_CLASS = 'dscDiscoverGrid__cellValue'; @@ -37,7 +38,7 @@ export const getRenderCellValueFn = dataView: DataView, rows: DataTableRecord[] | undefined, useNewFieldsApi: boolean, - fieldsToShow: string[], + shouldShowFieldHandler: ShouldShowFieldInTableHandler, maxDocFieldsDisplayed: number, closePopover: () => void ) => @@ -98,11 +99,11 @@ export const getRenderCellValueFn = if (field?.type === '_source' || useTopLevelObjectColumns) { const pairs = useTopLevelObjectColumns - ? getTopLevelObjectPairs(row.raw, columnId, dataView, fieldsToShow).slice( + ? getTopLevelObjectPairs(row.raw, columnId, dataView, shouldShowFieldHandler).slice( 0, maxDocFieldsDisplayed ) - : formatHit(row, dataView, fieldsToShow, maxEntries, fieldFormats); + : formatHit(row, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); return ( + {closeButton} @@ -235,7 +241,7 @@ function getTopLevelObjectPairs( row: EsHitRecord, columnId: string, dataView: DataView, - fieldsToShow: string[] + shouldShowFieldHandler: ShouldShowFieldInTableHandler ) { const innerColumns = getInnerColumns(row.fields as Record, columnId); // Put the most important fields first @@ -260,7 +266,7 @@ function getTopLevelObjectPairs( .join(', '); const pairs = highlights[key] ? highlightPairs : sourcePairs; if (displayKey) { - if (fieldsToShow.includes(displayKey)) { + if (shouldShowFieldHandler(displayKey)) { pairs.push([displayKey, formatted]); } } else { diff --git a/src/plugins/discover/public/components/doc_table/components/table_row.tsx b/src/plugins/discover/public/components/doc_table/components/table_row.tsx index c08154f1ce5db..c86d7eef57294 100644 --- a/src/plugins/discover/public/components/doc_table/components/table_row.tsx +++ b/src/plugins/discover/public/components/doc_table/components/table_row.tsx @@ -21,6 +21,7 @@ import { DataTableRecord, EsHitRecord } from '../../../types'; import { TableRowDetails } from './table_row_details'; import { useDiscoverServices } from '../../../hooks/use_discover_services'; import { DOC_HIDE_TIME_COLUMN_SETTING, MAX_DOC_FIELDS_DISPLAYED } from '../../../../common'; +import { type ShouldShowFieldInTableHandler } from '../../../utils/get_should_show_field_handler'; export type DocTableRow = EsHitRecord & { isAnchor?: boolean; @@ -34,7 +35,7 @@ export interface TableRowProps { row: DataTableRecord; dataView: DataView; useNewFieldsApi: boolean; - fieldsToShow: string[]; + shouldShowFieldHandler: ShouldShowFieldInTableHandler; onAddColumn?: (column: string) => void; onRemoveColumn?: (column: string) => void; } @@ -47,7 +48,7 @@ export const TableRow = ({ row, dataView, useNewFieldsApi, - fieldsToShow, + shouldShowFieldHandler, onAddColumn, onRemoveColumn, }: TableRowProps) => { @@ -77,7 +78,7 @@ export const TableRow = ({ // If we're formatting the _source column, don't use the regular field formatter, // but our Discover mechanism to format a hit in a better human-readable way. if (fieldName === '_source') { - return formatRow(row, dataView, fieldsToShow, maxEntries, fieldFormats); + return formatRow(row, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); } const formattedField = formatFieldValue( @@ -136,7 +137,7 @@ export const TableRow = ({ } if (columns.length === 0 && useNewFieldsApi) { - const formatted = formatRow(row, dataView, fieldsToShow, maxEntries, fieldFormats); + const formatted = formatRow(row, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); rowCells.push( - getFieldsToShow( + getShouldShowFieldHandler( dataView.fields.map((field: DataViewField) => field.name), dataView, showMultiFields @@ -178,7 +178,7 @@ export const DocTableWrapper = forwardRef( dataView={dataView} row={current} useNewFieldsApi={useNewFieldsApi} - fieldsToShow={fieldsToShow} + shouldShowFieldHandler={shouldShowFieldHandler} onAddColumn={onAddColumn} onRemoveColumn={onRemoveColumn} /> @@ -191,7 +191,7 @@ export const DocTableWrapper = forwardRef( onFilter, dataView, useNewFieldsApi, - fieldsToShow, + shouldShowFieldHandler, onAddColumn, onRemoveColumn, ] diff --git a/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts b/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts index d21e92ac04543..51698ebb03f32 100644 --- a/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts +++ b/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts @@ -47,7 +47,8 @@ describe('Row formatter', () => { }; const hit = buildDataTableRecord(rawHit, dataView); - const fieldsToShow = dataView.fields.getAll().map((fld) => fld.name); + const shouldShowField = (fieldName: string) => + dataView.fields.getAll().some((fld) => fld.name === fieldName); beforeEach(() => { services = { @@ -59,7 +60,7 @@ describe('Row formatter', () => { }); it('formats document properly', () => { - expect(formatRow(hit, dataView, fieldsToShow, 100, services.fieldFormats)) + expect(formatRow(hit, dataView, shouldShowField, 100, services.fieldFormats)) .toMatchInlineSnapshot(` { getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), }, } as unknown as DiscoverServices; - expect(formatRow(hit, dataView, [], 1, services.fieldFormats)).toMatchInlineSnapshot(` + expect(formatRow(hit, dataView, () => false, 1, services.fieldFormats)).toMatchInlineSnapshot(` { dataView ); - expect(formatRow(highLightHit, dataView, fieldsToShow, 100, services.fieldFormats)) + expect(formatRow(highLightHit, dataView, shouldShowField, 100, services.fieldFormats)) .toMatchInlineSnapshot(` ; @@ -40,11 +41,11 @@ const TemplateComponent = ({ defPairs }: Props) => { export const formatRow = ( hit: DataTableRecord, dataView: DataView, - fieldsToShow: string[], + shouldShowFieldHandler: ShouldShowFieldInTableHandler, maxEntries: number, fieldFormats: FieldFormatsStart ) => { - const pairs = formatHit(hit, dataView, fieldsToShow, maxEntries, fieldFormats); + const pairs = formatHit(hit, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); return ; }; diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table.tsx index ffbe9046b4334..91e3bbc73fdf1 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table.tsx @@ -14,7 +14,7 @@ import { useDiscoverServices } from '../../../../../hooks/use_discover_services' import { SHOW_MULTIFIELDS } from '../../../../../../common'; import { DocViewRenderProps, FieldRecordLegacy } from '../../../doc_views_types'; import { ACTIONS_COLUMN, MAIN_COLUMNS } from './table_columns'; -import { getFieldsToShow } from '../../../../../utils/get_fields_to_show'; +import { getShouldShowFieldHandler } from '../../../../../utils/get_should_show_field_handler'; import { getIgnoredReason } from '../../../../../utils/get_ignored_reason'; import { formatFieldValue } from '../../../../../utils/format_value'; import { isNestedFieldParent } from '../../../../../application/main/utils/nested_fields'; @@ -56,12 +56,13 @@ export const DocViewerLegacyTable = ({ }; }, []); - const fieldsToShow = getFieldsToShow(Object.keys(hit.flattened), dataView, showMultiFields); + const shouldShowFieldHandler = useMemo( + () => getShouldShowFieldHandler(Object.keys(hit.flattened), dataView, showMultiFields), + [hit.flattened, dataView, showMultiFields] + ); const items: FieldRecordLegacy[] = Object.keys(hit.flattened) - .filter((fieldName) => { - return fieldsToShow.includes(fieldName); - }) + .filter(shouldShowFieldHandler) .sort((fieldA, fieldB) => { const mappingA = mapping(fieldA); const mappingB = mapping(fieldB); diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx index bbb00b574076a..2a7b90a9feb52 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx @@ -7,7 +7,7 @@ */ import './table.scss'; -import React, { useCallback, useState } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, @@ -35,7 +35,7 @@ import { usePager } from '../../../../hooks/use_pager'; import { FieldName } from '../../../../components/field_name/field_name'; import { SHOW_MULTIFIELDS } from '../../../../../common'; import { DocViewRenderProps, FieldRecordLegacy } from '../../doc_views_types'; -import { getFieldsToShow } from '../../../../utils/get_fields_to_show'; +import { getShouldShowFieldHandler } from '../../../../utils/get_should_show_field_handler'; import { getIgnoredReason } from '../../../../utils/get_ignored_reason'; import { formatFieldValue } from '../../../../utils/format_value'; import { isNestedFieldParent } from '../../../../application/main/utils/nested_fields'; @@ -122,7 +122,10 @@ export const DocViewerTable = ({ ); const flattened = hit.flattened; - const fieldsToShow = getFieldsToShow(Object.keys(flattened), dataView, showMultiFields); + const shouldShowFieldHandler = useMemo( + () => getShouldShowFieldHandler(Object.keys(flattened), dataView, showMultiFields), + [flattened, dataView, showMultiFields] + ); const searchPlaceholder = i18n.translate('discover.docView.table.searchPlaceHolder', { defaultMessage: 'Search field names', @@ -229,7 +232,7 @@ export const DocViewerTable = ({ }) .reduce( (acc, curFieldName) => { - if (!fieldsToShow.includes(curFieldName)) { + if (!shouldShowFieldHandler(curFieldName)) { return acc; } diff --git a/src/plugins/discover/public/utils/format_hit.test.ts b/src/plugins/discover/public/utils/format_hit.test.ts index f4050517f015b..244c312903e21 100644 --- a/src/plugins/discover/public/utils/format_hit.test.ts +++ b/src/plugins/discover/public/utils/format_hit.test.ts @@ -40,7 +40,7 @@ describe('formatHit', () => { const formatted = formatHit( row, dataViewMock, - ['message', 'extension', 'object.value'], + (fieldName) => ['message', 'extension', 'object.value'].includes(fieldName), 220, discoverServiceMock.fieldFormats ); @@ -65,7 +65,7 @@ describe('formatHit', () => { const formatted = formatHit( highlightHit, dataViewMock, - ['message', 'extension', 'object.value'], + (fieldName) => ['message', 'extension', 'object.value'].includes(fieldName), 220, discoverServiceMock.fieldFormats ); @@ -82,7 +82,7 @@ describe('formatHit', () => { const formatted = formatHit( row, dataViewMock, - ['message', 'extension', 'object.value'], + (fieldName) => ['message', 'extension', 'object.value'].includes(fieldName), 2, discoverServiceMock.fieldFormats ); @@ -97,7 +97,7 @@ describe('formatHit', () => { const formatted = formatHit( row, dataViewMock, - ['message', 'object.value'], + (fieldName) => ['message', 'object.value'].includes(fieldName), 220, discoverServiceMock.fieldFormats ); @@ -113,7 +113,7 @@ describe('formatHit', () => { const formatted = formatHit( row, dataViewMock, - ['bytes'], + (fieldName) => ['bytes'].includes(fieldName), 220, discoverServiceMock.fieldFormats ); diff --git a/src/plugins/discover/public/utils/format_hit.ts b/src/plugins/discover/public/utils/format_hit.ts index 4e3c6160109c6..4b4537d5cfc98 100644 --- a/src/plugins/discover/public/utils/format_hit.ts +++ b/src/plugins/discover/public/utils/format_hit.ts @@ -12,6 +12,7 @@ import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { DataView } from '@kbn/data-views-plugin/public'; import { DataTableRecord } from '../types'; import { formatFieldValue } from './format_value'; +import { type ShouldShowFieldInTableHandler } from './get_should_show_field_handler'; const formattedHitCache = new WeakMap(); @@ -23,12 +24,12 @@ type FormattedHit = Array; * it's formatted using field formatters. * @param hit The hit to format * @param dataView The corresponding data view - * @param fieldsToShow A list of fields that should be included in the document summary. + * @param shouldShowFieldHandler A function to check a field. */ export function formatHit( hit: DataTableRecord, dataView: DataView, - fieldsToShow: string[], + shouldShowFieldHandler: ShouldShowFieldInTableHandler, maxEntries: number, fieldFormats: FieldFormatsStart ): FormattedHit { @@ -62,7 +63,7 @@ export function formatHit( // If the field was a mapped field, we validate it against the fieldsToShow list, if not // we always include it into the result. if (displayKey) { - if (fieldsToShow.includes(key)) { + if (shouldShowFieldHandler(key)) { pairs.push([displayKey, formattedValue]); } } else { diff --git a/src/plugins/discover/public/utils/get_fields_to_show.ts b/src/plugins/discover/public/utils/get_fields_to_show.ts deleted file mode 100644 index be6bcc2ea5ce9..0000000000000 --- a/src/plugins/discover/public/utils/get_fields_to_show.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -import { getFieldSubtypeMulti } from '@kbn/data-views-plugin/public'; -import type { DataView } from '@kbn/data-views-plugin/public'; - -/** - * Returns am array of fields to display in the Documents column of the data table - * If showMultiFields is set to false, it filters out multifields that have a parent, to prevent entries for multifields - * like this: field, field.keyword, field.whatever - * @param fields - * @param dataView - * @param showMultiFields - */ -export const getFieldsToShow = (fields: string[], dataView: DataView, showMultiFields: boolean) => { - if (showMultiFields) { - return fields; - } - const fieldSet = new Set(); - const childParentFieldsMap = new Map(); - const parentFieldSet = new Set(); - fields.forEach((key) => { - const mapped = dataView.fields.getByName(key); - const subTypeMulti = mapped && getFieldSubtypeMulti(mapped.spec); - const isMultiField = Boolean(subTypeMulti?.multi); - if (mapped && subTypeMulti?.multi?.parent) { - childParentFieldsMap.set(key, subTypeMulti.multi.parent); - } - if (mapped && isMultiField) { - parentFieldSet.add(key); - } - fieldSet.add(key); - }); - return fields.filter((key: string) => { - if (!parentFieldSet.has(key)) { - return true; - } - const parent = childParentFieldsMap.get(key); - return parent && !fieldSet.has(parent); - }); -}; diff --git a/src/plugins/discover/public/utils/get_fields_to_show.test.ts b/src/plugins/discover/public/utils/get_should_show_field_handler.test.ts similarity index 65% rename from src/plugins/discover/public/utils/get_fields_to_show.test.ts rename to src/plugins/discover/public/utils/get_should_show_field_handler.test.ts index 79de152e8b494..8047aed7eb1de 100644 --- a/src/plugins/discover/public/utils/get_fields_to_show.test.ts +++ b/src/plugins/discover/public/utils/get_should_show_field_handler.test.ts @@ -7,7 +7,7 @@ */ import { DataView, DataViewField } from '@kbn/data-views-plugin/public'; -import { getFieldsToShow } from './get_fields_to_show'; +import { getShouldShowFieldHandler } from './get_should_show_field_handler'; describe('get fields to show', () => { let dataView: DataView; @@ -74,20 +74,37 @@ describe('get fields to show', () => { }); it('shows multifields when showMultiFields is true', () => { - const fieldsToShow = getFieldsToShow( + const shouldShowFieldHandler = getShouldShowFieldHandler( ['machine.os', 'machine.os.raw', 'clientip'], dataView, true ); - expect(fieldsToShow).toEqual(['machine.os', 'machine.os.raw', 'clientip']); + expect(shouldShowFieldHandler('machine.os')).toBe(true); + expect(shouldShowFieldHandler('machine.os.raw')).toBe(true); + expect(shouldShowFieldHandler('clientip')).toBe(true); }); it('do not show multifields when showMultiFields is false', () => { - const fieldsToShow = getFieldsToShow( + const shouldShowFieldHandler = getShouldShowFieldHandler( ['machine.os', 'machine.os.raw', 'acknowledged', 'clientip'], dataView, false ); - expect(fieldsToShow).toEqual(['machine.os', 'acknowledged', 'clientip']); + expect(shouldShowFieldHandler('acknowledged')).toBe(true); + expect(shouldShowFieldHandler('clientip')).toBe(true); + expect(shouldShowFieldHandler('machine.os')).toBe(true); + expect(shouldShowFieldHandler('machine.os.raw')).toBe(false); + }); + + it('show multifields when showMultiFields is false but parent is not present', () => { + const shouldShowFieldHandler = getShouldShowFieldHandler(['machine.os.raw'], dataView, false); + expect(shouldShowFieldHandler('machine.os.raw')).toBe(true); + }); + + it('show unmapped fields', () => { + let shouldShowFieldHandler = getShouldShowFieldHandler(['unmapped'], dataView, false); + expect(shouldShowFieldHandler('unmapped')).toBe(true); + shouldShowFieldHandler = getShouldShowFieldHandler(['unmapped'], dataView, true); + expect(shouldShowFieldHandler('unmapped')).toBe(true); }); }); diff --git a/src/plugins/discover/public/utils/get_should_show_field_handler.ts b/src/plugins/discover/public/utils/get_should_show_field_handler.ts new file mode 100644 index 0000000000000..798d367a1c72b --- /dev/null +++ b/src/plugins/discover/public/utils/get_should_show_field_handler.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { getFieldSubtypeMulti } from '@kbn/data-views-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; + +export type ShouldShowFieldInTableHandler = (fieldName: string) => boolean; + +/** + * Returns a function for checking whether we should display a field in the Documents column of the data table + * If showMultiFields is set to false, it filters out multifields that have a parent, to prevent entries for multifields + * like this: field, field.keyword, field.whatever + * @param fields + * @param dataView + * @param showMultiFields + */ +export const getShouldShowFieldHandler = ( + fields: string[], + dataView: DataView, + showMultiFields: boolean +): ShouldShowFieldInTableHandler => { + if (showMultiFields) { + return () => true; + } + + const fieldsToShowMap = new Map(); + + fields.forEach((fieldName) => { + fieldsToShowMap.set(fieldName, canShowFieldInTable(fieldName, dataView)); + }); + + return (fieldName: string) => { + const result = fieldsToShowMap.get(fieldName); + if (!result) { + return true; // for unmapped + } + // if the parent of the multi field was not in `fields` array then show the multi field too + return result.show || (!!result.parentName && !fieldsToShowMap.has(result.parentName)); + }; +}; + +const canShowFieldInTable = ( + fieldName: string, + dataView: DataView +): { parentName?: string; show: boolean } => { + const mapped = dataView.fields.getByName(fieldName); + + if (!mapped) { + return { show: true }; + } + + const subTypeMulti = getFieldSubtypeMulti(mapped.spec); + const isMultiField = Boolean(subTypeMulti?.multi); + + return { show: !isMultiField, parentName: subTypeMulti?.multi?.parent }; +}; diff --git a/src/plugins/event_annotation/common/event_annotation_group/index.ts b/src/plugins/event_annotation/common/event_annotation_group/index.ts index e088d6878de7c..1eae918657185 100644 --- a/src/plugins/event_annotation/common/event_annotation_group/index.ts +++ b/src/plugins/event_annotation/common/event_annotation_group/index.ts @@ -14,12 +14,14 @@ import type { EventAnnotationOutput } from '../types'; export interface EventAnnotationGroupOutput { type: 'event_annotation_group'; annotations: EventAnnotationOutput[]; + ignoreGlobalFilters: boolean; dataView: IndexPatternExpressionType; } export interface EventAnnotationGroupArgs { annotations: EventAnnotationOutput[]; dataView: IndexPatternExpressionType; + ignoreGlobalFilters: boolean; } export function eventAnnotationGroup(): ExpressionFunctionDefinition< @@ -44,6 +46,16 @@ export function eventAnnotationGroup(): ExpressionFunctionDefinition< defaultMessage: 'Data view retrieved with indexPatternLoad', }), }, + ignoreGlobalFilters: { + types: ['boolean'], + default: true, + help: i18n.translate( + 'eventAnnotation.group.args.annotationConfigs.ignoreGlobalFilters.help', + { + defaultMessage: `Switch to ignore global filters for the annotation`, + } + ), + }, annotations: { types: [ 'manual_point_event_annotation', @@ -62,6 +74,7 @@ export function eventAnnotationGroup(): ExpressionFunctionDefinition< type: 'event_annotation_group', annotations: args.annotations.filter((annotation) => !annotation.isHidden), dataView: args.dataView, + ignoreGlobalFilters: args.ignoreGlobalFilters, }; }, }; diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts b/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts index f6eaf0b0e4bbd..dbf653ea72f3a 100644 --- a/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts +++ b/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts @@ -314,7 +314,7 @@ function regroupForRequestOptimization( (dataView.timeFieldName || dataView.fields.find((field) => field.type === 'date' && field.displayName)?.name); - const key = `${g.dataView.value.id}-${timeField}-${Boolean(current.ignoreGlobalFilters)}`; + const key = `${g.dataView.value.id}-${timeField}-${Boolean(g.ignoreGlobalFilters)}`; const subGroup = acc[key] as QueryGroup; if (subGroup) { let allFields = [...(subGroup.allFields || []), ...(current.extraFields || [])]; @@ -342,7 +342,7 @@ function regroupForRequestOptimization( timeField: timeField!, allFields, annotations: [current], - ignoreGlobalFilters: Boolean(current.ignoreGlobalFilters), + ignoreGlobalFilters: Boolean(g.ignoreGlobalFilters), }, }; } diff --git a/src/plugins/event_annotation/common/query_point_event_annotation/index.ts b/src/plugins/event_annotation/common/query_point_event_annotation/index.ts index c30ab9c4a8919..cb9ba882a9f89 100644 --- a/src/plugins/event_annotation/common/query_point_event_annotation/index.ts +++ b/src/plugins/event_annotation/common/query_point_event_annotation/index.ts @@ -103,13 +103,6 @@ export const queryPointEventAnnotation: ExpressionFunctionDefinition< defaultMessage: `Switch to hide annotation`, }), }, - ignoreGlobalFilters: { - types: ['boolean'], - help: i18n.translate('eventAnnotation.queryAnnotation.args.ignoreGlobalFilters', { - defaultMessage: `Switch to ignore global filters for the annotation`, - }), - default: true, - }, }, fn: function fn(input: unknown, args: QueryPointEventAnnotationArgs) { return { diff --git a/src/plugins/event_annotation/common/query_point_event_annotation/types.ts b/src/plugins/event_annotation/common/query_point_event_annotation/types.ts index defefa11d7443..592c50a0621ce 100644 --- a/src/plugins/event_annotation/common/query_point_event_annotation/types.ts +++ b/src/plugins/event_annotation/common/query_point_event_annotation/types.ts @@ -15,7 +15,6 @@ export type QueryPointEventAnnotationArgs = { timeField?: string; extraFields?: string[]; textField?: string; - ignoreGlobalFilters?: boolean; } & PointStyleProps; export type QueryPointEventAnnotationOutput = QueryPointEventAnnotationArgs & { diff --git a/src/plugins/event_annotation/common/types.ts b/src/plugins/event_annotation/common/types.ts index 4868e861ff348..5f869cbee5520 100644 --- a/src/plugins/event_annotation/common/types.ts +++ b/src/plugins/event_annotation/common/types.ts @@ -72,7 +72,6 @@ export type QueryPointEventAnnotationConfig = { timeField?: string; textField?: string; extraFields?: string[]; - ignoreGlobalFilters?: boolean; key: { type: 'point_in_time'; }; @@ -86,6 +85,7 @@ export type EventAnnotationConfig = export interface EventAnnotationGroupConfig { annotations: EventAnnotationConfig[]; indexPatternId: string; + ignoreGlobalFilters?: boolean; } export type EventAnnotationArgs = diff --git a/src/plugins/event_annotation/public/event_annotation_service/service.test.ts b/src/plugins/event_annotation/public/event_annotation_service/service.test.ts index c5df7045fc4dc..5df25bc69d308 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/service.test.ts +++ b/src/plugins/event_annotation/public/event_annotation_service/service.test.ts @@ -122,7 +122,6 @@ describe('Event Annotation Service', () => { icon: ['triangle'], textVisibility: [false], textField: [], - ignoreGlobalFilters: [false], filter: [ { chain: [ @@ -233,7 +232,6 @@ describe('Event Annotation Service', () => { icon: ['triangle'], textVisibility: [false], textField: [], - ignoreGlobalFilters: [false], filter: [ { chain: [ @@ -297,7 +295,6 @@ describe('Event Annotation Service', () => { icon: ['triangle'], textVisibility: [textVisibility], textField: expected ? [expected] : [], - ignoreGlobalFilters: [false], filter: [ { chain: [ diff --git a/src/plugins/event_annotation/public/event_annotation_service/service.tsx b/src/plugins/event_annotation/public/event_annotation_service/service.tsx index 3722c4d3557bb..1b2bdbc9611cc 100644 --- a/src/plugins/event_annotation/public/event_annotation_service/service.tsx +++ b/src/plugins/event_annotation/public/event_annotation_service/service.tsx @@ -92,7 +92,6 @@ export function getEventAnnotationService(): EventAnnotationServiceType { textField, filter, extraFields, - ignoreGlobalFilters, } = annotation; expressions.push({ type: 'expression' as const, @@ -112,7 +111,6 @@ export function getEventAnnotationService(): EventAnnotationServiceType { textField: textVisibility && textField ? [textField] : [], filter: filter ? [queryToAst(filter)] : [], extraFields: extraFields || [], - ignoreGlobalFilters: [Boolean(ignoreGlobalFilters)], isHidden: [Boolean(annotation.isHidden)], }, }, @@ -130,7 +128,7 @@ export function getEventAnnotationService(): EventAnnotationServiceType { const groupsExpressions = groups .filter((g) => g.annotations.some((a) => !a.isHidden)) - .map(({ annotations, indexPatternId }): ExpressionAstExpression => { + .map(({ annotations, indexPatternId, ignoreGlobalFilters }): ExpressionAstExpression => { const indexPatternExpression: ExpressionAstExpression = { type: 'expression', chain: [ @@ -153,6 +151,7 @@ export function getEventAnnotationService(): EventAnnotationServiceType { arguments: { dataView: [indexPatternExpression], annotations: [...annotationExpressions], + ignoreGlobalFilters: [Boolean(ignoreGlobalFilters)], }, }, ], diff --git a/src/plugins/expressions/common/expression_functions/series_calculation_helpers.test.ts b/src/plugins/expressions/common/expression_functions/series_calculation_helpers.test.ts new file mode 100644 index 0000000000000..2a717ee1c7414 --- /dev/null +++ b/src/plugins/expressions/common/expression_functions/series_calculation_helpers.test.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { buildResultColumns, Datatable } from '..'; + +describe('buildResultColumns', () => { + function getDatatable(columns: Datatable['columns']): Datatable { + const row: Datatable['rows'][number] = {}; + for (const { id, meta } of columns) { + row[id] = meta.type === 'number' ? 5 : 'a'; + } + return { + type: 'datatable', + columns, + rows: Array(5).fill(row), + }; + } + it('should append the new output column', () => { + const newColumns = buildResultColumns( + getDatatable([{ id: 'inputId', name: 'value', meta: { type: 'number' } }]), + 'outputId', + 'inputId', + undefined + ); + expect(newColumns).not.toBeUndefined(); + expect(newColumns).toHaveLength(2); + expect(newColumns![1]).toEqual({ id: 'outputId', name: 'outputId', meta: { type: 'number' } }); + }); + + it('should create a new column with the passed name', () => { + const newColumns = buildResultColumns( + getDatatable([{ id: 'inputId', name: 'value', meta: { type: 'number' } }]), + 'outputId', + 'inputId', + 'newName' + ); + expect(newColumns![1]).toEqual({ id: 'outputId', name: 'newName', meta: { type: 'number' } }); + }); + + it('should throw if same id is passed for input and output', () => { + expect(() => + buildResultColumns( + getDatatable([{ id: 'inputId', name: 'value', meta: { type: 'number' } }]), + 'inputId', + 'inputId', + undefined + ) + ).toThrow(); + }); + + it('should overwrite column with the correct flag', () => { + const newColumns = buildResultColumns( + getDatatable([{ id: 'inputId', name: 'value', meta: { type: 'number' } }]), + 'inputId', + 'inputId', + undefined, + { allowColumnOverwrite: true } + ); + expect(newColumns).toHaveLength(1); + }); +}); diff --git a/src/plugins/expressions/common/expression_functions/series_calculation_helpers.ts b/src/plugins/expressions/common/expression_functions/series_calculation_helpers.ts index 11f844920a0df..db98a57a850e3 100644 --- a/src/plugins/expressions/common/expression_functions/series_calculation_helpers.ts +++ b/src/plugins/expressions/common/expression_functions/series_calculation_helpers.ts @@ -65,7 +65,17 @@ export function buildResultColumns( }; const resultColumns = [...input.columns]; - // add output column after input column in the table - resultColumns.splice(resultColumns.indexOf(inputColumnDefinition) + 1, 0, outputColumnDefinition); + + // If input and output are the same, replace the input column with the output one + // otherwise add output column after input column in the table + const offset = inputColumnId === outputColumnId ? 0 : 1; + // replace 1 item in case of same column, otherwise just append + const replacingItems = inputColumnId === outputColumnId ? 1 : 0; + resultColumns.splice( + resultColumns.indexOf(inputColumnDefinition) + offset, + replacingItems, + outputColumnDefinition + ); + return resultColumns; } diff --git a/src/plugins/files/common/default_image_file_kind.ts b/src/plugins/files/common/default_image_file_kind.ts new file mode 100644 index 0000000000000..2fd2812e6f17b --- /dev/null +++ b/src/plugins/files/common/default_image_file_kind.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FileKind } from './types'; + +const id = 'defaultImage' as const; +const tag = 'files:defaultImage' as const; +const tags = [`access:${tag}`]; +const tenMebiBytes = 1024 * 1024 * 10; + +/** + * A file kind that is available to all plugins to use for uploading images + * intended to be reused across Kibana. + */ +export const defaultImageFileKind: FileKind = { + id, + maxSizeBytes: tenMebiBytes, + blobStoreSettings: {}, + // tried using "image/*" but it did not work with the HTTP endpoint (got 415 Unsupported Media Type) + allowedMimeTypes: ['image/png', 'image/jpeg', 'image/webp', 'image/avif'], + http: { + create: { tags }, + delete: { tags }, + download: { tags }, + getById: { tags }, + list: { tags }, + share: { tags }, + update: { tags }, + }, +}; diff --git a/src/plugins/files/common/index.ts b/src/plugins/files/common/index.ts index ece05d00a8bd3..16a7d03775e86 100755 --- a/src/plugins/files/common/index.ts +++ b/src/plugins/files/common/index.ts @@ -7,6 +7,7 @@ */ export { FILE_SO_TYPE, PLUGIN_ID, PLUGIN_NAME, ES_FIXED_SIZE_INDEX_BLOB_STORE } from './constants'; +export { defaultImageFileKind } from './default_image_file_kind'; export type { File, diff --git a/src/plugins/files/common/register_default_file_kinds.ts b/src/plugins/files/common/register_default_file_kinds.ts new file mode 100644 index 0000000000000..37982c445cd16 --- /dev/null +++ b/src/plugins/files/common/register_default_file_kinds.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getFileKindsRegistry } from './file_kinds_registry'; +import { defaultImageFileKind } from '.'; + +export function registerDefaultFileKinds() { + const registry = getFileKindsRegistry(); + registry.register(defaultImageFileKind); +} diff --git a/src/plugins/files/public/components/file_picker/components/file_card.tsx b/src/plugins/files/public/components/file_picker/components/file_card.tsx index a50e031c1c25b..8e5730a9745ac 100644 --- a/src/plugins/files/public/components/file_picker/components/file_card.tsx +++ b/src/plugins/files/public/components/file_picker/components/file_card.tsx @@ -36,6 +36,10 @@ export const FileCard: FunctionComponent = ({ file }) => { title="" css={css` place-self: stretch; + > * { + // TODO: Once content no longer overflows card remove, i.e. once on @elastic/eui ^70.3.0 + width: 100%; + } `} paddingSize="s" selectable={{ diff --git a/src/plugins/files/public/components/file_picker/file_picker.scss b/src/plugins/files/public/components/file_picker/file_picker.scss deleted file mode 100644 index a7ec792564500..0000000000000 --- a/src/plugins/files/public/components/file_picker/file_picker.scss +++ /dev/null @@ -1,8 +0,0 @@ -.filesFilePicker--fixed { - @include euiBreakpoint('m', 'l', 'xl', 'xxl') { - width: 75vw; - .euiModal__flex { - height: 75vw; - } - } -} \ No newline at end of file diff --git a/src/plugins/files/public/components/file_picker/file_picker.tsx b/src/plugins/files/public/components/file_picker/file_picker.tsx index 9c9ae47811a11..434a0da9967a4 100644 --- a/src/plugins/files/public/components/file_picker/file_picker.tsx +++ b/src/plugins/files/public/components/file_picker/file_picker.tsx @@ -16,8 +16,10 @@ import { EuiLoadingSpinner, EuiSpacer, EuiFlexGroup, + useEuiTheme, } from '@elastic/eui'; +import { css } from '@emotion/react'; import type { DoneNotification } from '../upload_file'; import { useBehaviorSubject } from '../use_behavior_subject'; import { useFilePickerContext, FilePickerContext } from './context'; @@ -29,7 +31,6 @@ import { FileGrid } from './components/file_grid'; import { SearchField } from './components/search_field'; import { ModalFooter } from './components/modal_footer'; -import './file_picker.scss'; import { ClearFilterButton } from './components/clear_filter_button'; import type { FileJSON } from '../../../common'; @@ -66,6 +67,7 @@ type InnerProps = Required = ({ onClose, onDone, onUpload, multiple }) => { const { state, kind } = useFilePickerContext(); + const { euiTheme } = useEuiTheme(); const hasFiles = useBehaviorSubject(state.hasFiles$); const hasQuery = useBehaviorSubject(state.hasQuery$); @@ -84,6 +86,12 @@ const Component: FunctionComponent = ({ onClose, onDone, onUpload, m className="filesFilePicker filesFilePicker--fixed" maxWidth="75vw" onClose={onClose} + css={css` + @media screen and (min-width: ${euiTheme.breakpoint.l}px) { + width: 75vw; + height: 75vh; + } + `} > @@ -92,7 +100,14 @@ const Component: FunctionComponent<InnerProps> = ({ onClose, onDone, onUpload, m {isLoading ? ( <> <EuiModalBody> - <EuiFlexGroup justifyContent="center" alignItems="center" gutterSize="none"> + <EuiFlexGroup + css={css` + height: 100%; + `} + justifyContent="center" + alignItems="center" + gutterSize="none" + > <EuiLoadingSpinner data-test-subj="loadingSpinner" size="xl" /> </EuiFlexGroup> </EuiModalBody> diff --git a/src/plugins/files/public/index.ts b/src/plugins/files/public/index.ts index 5822efb655735..2d07fa06b8a4e 100644 --- a/src/plugins/files/public/index.ts +++ b/src/plugins/files/public/index.ts @@ -7,6 +7,7 @@ */ import { FilesPlugin } from './plugin'; +export { defaultImageFileKind } from '../common/default_image_file_kind'; export type { FilesSetup, FilesStart } from './plugin'; export type { FilesClient, diff --git a/src/plugins/files/public/plugin.ts b/src/plugins/files/public/plugin.ts index a91b565d2a540..57f17fd6a3753 100644 --- a/src/plugins/files/public/plugin.ts +++ b/src/plugins/files/public/plugin.ts @@ -15,6 +15,7 @@ import { import type { FilesClient, FilesClientFactory } from './types'; import { createFilesClient } from './files_client'; import { FileKind } from '../common'; +import { registerDefaultFileKinds } from '../common/register_default_file_kinds'; import { ScopedFilesClient } from '.'; /** @@ -59,6 +60,7 @@ export class FilesPlugin implements Plugin<FilesSetup, FilesStart> { return createFilesClient({ http: core.http }) as FilesClient<M>; }, }; + registerDefaultFileKinds(); return { filesClientFactory: this.filesClientFactory, registerFileKind: (fileKind: FileKind) => { diff --git a/src/plugins/files/server/plugin.ts b/src/plugins/files/server/plugin.ts index b7cef3173302f..1680512ded3d2 100755 --- a/src/plugins/files/server/plugin.ts +++ b/src/plugins/files/server/plugin.ts @@ -21,6 +21,7 @@ import { getFileKindsRegistry, FileKindsRegistryImpl, } from '../common/file_kinds_registry'; +import { registerDefaultFileKinds } from '../common/register_default_file_kinds'; import { BlobStorageService } from './blob_storage_service'; import { FileServiceFactory } from './file_service'; @@ -91,6 +92,9 @@ export class FilesPlugin implements Plugin<FilesSetup, FilesStart, FilesPluginSe getFileService: () => this.fileServiceFactory?.asInternal(), }); + // Now that everything is set up: + registerDefaultFileKinds(); + return { registerFileKind(fileKind) { getFileKindsRegistry().register(fileKind); diff --git a/src/plugins/guided_onboarding/public/components/guide_panel.tsx b/src/plugins/guided_onboarding/public/components/guide_panel.tsx index a31083a384a26..e8c60786c9870 100644 --- a/src/plugins/guided_onboarding/public/components/guide_panel.tsx +++ b/src/plugins/guided_onboarding/public/components/guide_panel.tsx @@ -112,7 +112,7 @@ export const GuidePanel = ({ api, application, notifications }: GuidePanelProps) } catch (error) { notifications.toasts.addDanger({ title: i18n.translate('guidedOnboarding.dropdownPanel.stepHandlerError', { - defaultMessage: 'Unable to update the guide. Please try again later.', + defaultMessage: 'Unable to update the guide. Wait a moment and try again.', }), text: error.message, }); @@ -138,7 +138,7 @@ export const GuidePanel = ({ api, application, notifications }: GuidePanelProps) } catch (error) { notifications.toasts.addDanger({ title: i18n.translate('guidedOnboarding.dropdownPanel.completeGuideError', { - defaultMessage: 'Unable to update the guide. Please try again later.', + defaultMessage: 'Unable to update the guide. Wait a moment and try again.', }), text: error.message, }); diff --git a/src/plugins/guided_onboarding/public/components/quit_guide_modal.tsx b/src/plugins/guided_onboarding/public/components/quit_guide_modal.tsx index a50dd28c677b0..6765e7a4ecbf9 100644 --- a/src/plugins/guided_onboarding/public/components/quit_guide_modal.tsx +++ b/src/plugins/guided_onboarding/public/components/quit_guide_modal.tsx @@ -46,7 +46,7 @@ export const QuitGuideModal = ({ setIsLoading(false); notifications.toasts.addDanger({ title: i18n.translate('guidedOnboarding.quitGuideModal.deactivateGuideError', { - defaultMessage: 'Unable to update the guide. Please try again later.', + defaultMessage: 'Unable to update the guide. Wait a moment and try again.', }), text: error.message, }); diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts index a192f98537fa9..1fdb34ff0ca0e 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts @@ -53,6 +53,9 @@ export const securityConfig: GuideConfig = { i18n.translate('guidedOnboarding.securityGuide.rulesStep.description2', { defaultMessage: 'Select the rules that you want.', }), + i18n.translate('guidedOnboarding.securityGuide.rulesStep.description3', { + defaultMessage: 'Enable rules to generate alerts.', + }), ], manualCompletion: { title: i18n.translate('guidedOnboarding.securityGuide.rulesStep.manualCompletion.title', { diff --git a/src/plugins/home/public/application/components/guided_onboarding/__snapshots__/getting_started.test.tsx.snap b/src/plugins/home/public/application/components/guided_onboarding/__snapshots__/getting_started.test.tsx.snap index ace1c2e32c21f..9d3641ddf816e 100644 --- a/src/plugins/home/public/application/components/guided_onboarding/__snapshots__/getting_started.test.tsx.snap +++ b/src/plugins/home/public/application/components/guided_onboarding/__snapshots__/getting_started.test.tsx.snap @@ -21,6 +21,7 @@ exports[`getting started should render getting started component 1`] = ` "toString": [Function], } } + data-test-subj="onboarding--landing-page" hasShadow={true} > <EuiTitle diff --git a/src/plugins/home/public/application/components/guided_onboarding/getting_started.tsx b/src/plugins/home/public/application/components/guided_onboarding/getting_started.tsx index 6e4d605cc30b3..03faa651d8d0d 100644 --- a/src/plugins/home/public/application/components/guided_onboarding/getting_started.tsx +++ b/src/plugins/home/public/application/components/guided_onboarding/getting_started.tsx @@ -120,7 +120,7 @@ export const GettingStarted = () => { } catch (err) { getServices().toastNotifications.addDanger({ title: i18n.translate('home.guidedOnboarding.gettingStarted.activateGuide.errorMessage', { - defaultMessage: 'Unable to start the guide. Please try again later.', + defaultMessage: 'Unable to start the guide. Wait a moment and try again.', }), text: err.message, }); @@ -134,7 +134,7 @@ export const GettingStarted = () => { body={ <EuiText color="subdued"> {i18n.translate('home.guidedOnboarding.gettingStarted.loadingIndicator', { - defaultMessage: 'Loading setup guide state...', + defaultMessage: 'Loading the guide state...', })} </EuiText> } @@ -151,7 +151,7 @@ export const GettingStarted = () => { title={ <h2> {i18n.translate('home.guidedOnboarding.gettingStarted.errorSectionTitle', { - defaultMessage: 'Unable to load guide state', + defaultMessage: 'Unable to load the guide state', })} </h2> } @@ -159,7 +159,7 @@ export const GettingStarted = () => { <> <EuiText color="subdued"> {i18n.translate('home.guidedOnboarding.gettingStarted.errorSectionDescription', { - defaultMessage: 'There was an error loading the guide state. Try again later.', + defaultMessage: `The guide couldn't be loaded. Wait a moment and try again.`, })} </EuiText> <EuiSpacer /> @@ -183,7 +183,12 @@ export const GettingStarted = () => { return ( <KibanaPageTemplate panelled={false} grow> <EuiPageTemplate.Section alignment="center"> - <EuiPanel color="plain" hasShadow css={paddingCss}> + <EuiPanel + color="plain" + hasShadow + css={paddingCss} + data-test-subj="onboarding--landing-page" + > <EuiTitle size="l" className="eui-textCenter"> <h1>{title}</h1> </EuiTitle> diff --git a/src/plugins/home/public/application/components/home.tsx b/src/plugins/home/public/application/components/home.tsx index 707ea99ad8af4..7a65c48807a33 100644 --- a/src/plugins/home/public/application/components/home.tsx +++ b/src/plugins/home/public/application/components/home.tsx @@ -198,7 +198,7 @@ export class Home extends Component<HomeProps, State> { if (isNewKibanaInstance) { if (isCloudEnabled) { application.navigateToUrl('./home#/getting_started'); - return; + return null; } return this.renderWelcome(); } diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx index f6f8063df8334..eafdcc0dab69a 100755 --- a/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx +++ b/src/plugins/unified_field_list/public/components/field_stats/field_stats.tsx @@ -186,7 +186,7 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({ toDate, dslQuery: dslQuery ?? - buildEsQuery(loadedDataView, query ?? [], filters, getEsQueryConfig(uiSettings)), + buildEsQuery(loadedDataView, query ?? [], filters ?? [], getEsQueryConfig(uiSettings)), abortController: abortControllerRef.current, }); diff --git a/src/plugins/unified_field_list/public/hooks/use_query_subscriber.ts b/src/plugins/unified_field_list/public/hooks/use_query_subscriber.ts new file mode 100644 index 0000000000000..9b42db6301f8f --- /dev/null +++ b/src/plugins/unified_field_list/public/hooks/use_query_subscriber.ts @@ -0,0 +1,54 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { useEffect, useState } from 'react'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { AggregateQuery, Query, Filter } from '@kbn/es-query'; + +/** + * Hook params + */ +export interface QuerySubscriberParams { + data: DataPublicPluginStart; +} + +/** + * Result from the hook + */ +export interface QuerySubscriberResult { + query: Query | AggregateQuery | undefined; + filters: Filter[] | undefined; +} + +/** + * Memorizes current query and filters + * @param data + */ +export const useQuerySubscriber = ({ data }: QuerySubscriberParams) => { + const [result, setResult] = useState<QuerySubscriberResult>(() => { + const state = data.query.getState(); + return { + query: state?.query, + filters: state?.filters, + }; + }); + + useEffect(() => { + const subscription = data.query.state$.subscribe(({ state }) => { + setResult((prevState) => ({ + ...prevState, + query: state.query, + filters: state.filters, + })); + }); + + return () => subscription.unsubscribe(); + }, [setResult, data.query.state$]); + + return result; +}; diff --git a/src/plugins/unified_field_list/public/index.ts b/src/plugins/unified_field_list/public/index.ts index d90a5092576e6..e1a315401e0bc 100755 --- a/src/plugins/unified_field_list/public/index.ts +++ b/src/plugins/unified_field_list/public/index.ts @@ -73,3 +73,9 @@ export { type GroupedFieldsParams, type GroupedFieldsResult, } from './hooks/use_grouped_fields'; + +export { + useQuerySubscriber, + type QuerySubscriberResult, + type QuerySubscriberParams, +} from './hooks/use_query_subscriber'; diff --git a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx index cf21995668e43..5e7d429833af7 100644 --- a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx +++ b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx @@ -123,7 +123,7 @@ export function SavedQueryManagementList({ }: SavedQueryManagementListProps) { const kibana = useKibana<IUnifiedSearchPluginServices>(); const [savedQueries, setSavedQueries] = useState([] as SavedQuery[]); - const [selectedSavedQuery, setSelectedSavedQuery] = useState(null as SavedQuery | null); + const [selectedSavedQuery, setSelectedSavedQuery] = useState(loadedSavedQuery); const [toBeDeletedSavedQuery, setToBeDeletedSavedQuery] = useState(null as SavedQuery | null); const [showDeletionConfirmationModal, setShowDeletionConfirmationModal] = useState(false); const cancelPendingListingRequest = useRef<() => void>(() => {}); @@ -215,11 +215,7 @@ export function SavedQueryManagementList({ title: itemTitle(savedQuery.attributes, format), 'data-test-subj': `load-saved-query-${savedQuery.attributes.title}-button`, value: savedQuery.id, - checked: - (loadedSavedQuery && savedQuery.id === loadedSavedQuery.id) || - (selectedSavedQuery && savedQuery.id === selectedSavedQuery.id) - ? 'on' - : undefined, + checked: selectedSavedQuery && savedQuery.id === selectedSavedQuery.id ? 'on' : undefined, data: { attributes: savedQuery.attributes, }, diff --git a/test/functional/apps/discover/group1/_sidebar.ts b/test/functional/apps/discover/group1/_sidebar.ts index 23705444a085c..585aae36196e6 100644 --- a/test/functional/apps/discover/group1/_sidebar.ts +++ b/test/functional/apps/discover/group1/_sidebar.ts @@ -6,13 +6,22 @@ * Side Public License, v 1. */ +import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const PageObjects = getPageObjects(['common', 'discover', 'timePicker']); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'header', + 'unifiedSearch', + ]); const testSubjects = getService('testSubjects'); + const browser = getService('browser'); + const filterBar = getService('filterBar'); describe('discover sidebar', function describeIndexTests() { before(async function () { @@ -36,6 +45,53 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); + describe('field stats', function () { + it('should work for regular and pinned filters', async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + + const allTermsResult = 'jpg\n65.0%\ncss\n15.4%\npng\n9.8%\ngif\n6.6%\nphp\n3.2%'; + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be(allTermsResult); + + await filterBar.addFilter('extension', 'is', 'jpg'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const onlyJpgResult = 'jpg\n100%'; + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be(onlyJpgResult); + + await filterBar.toggleFilterNegated('extension'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const jpgExcludedResult = 'css\n44.1%\npng\n28.0%\ngif\n18.8%\nphp\n9.1%'; + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be( + jpgExcludedResult + ); + + await filterBar.toggleFilterPinned('extension'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be( + jpgExcludedResult + ); + + await browser.refresh(); + + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be( + jpgExcludedResult + ); + + await filterBar.toggleFilterEnabled('extension'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await PageObjects.discover.clickFieldListItem('extension'); + expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be(allTermsResult); + }); + }); + describe('collapse expand', function () { it('should initially be expanded', async function () { await testSubjects.existOrFail('discover-sidebar'); diff --git a/test/functional/apps/home/_welcome.ts b/test/functional/apps/home/_welcome.ts index e0fd1b5619dc1..d61afd879090e 100644 --- a/test/functional/apps/home/_welcome.ts +++ b/test/functional/apps/home/_welcome.ts @@ -13,9 +13,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const esArchiver = getService('esArchiver'); const PageObjects = getPageObjects(['common', 'home']); + const deployment = getService('deployment'); describe('Welcome interstitial', () => { - before(async () => { + beforeEach(async () => { // Need to navigate to page first to clear storage before test can be run await PageObjects.common.navigateToUrl('home', undefined); await browser.clearLocalStorage(); @@ -32,5 +33,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true); await PageObjects.common.clickAndValidate('skipWelcomeScreen', 'homeApp'); }); + + it('redirects to guided onboarding landing page when on Cloud', async () => { + const isCloud = await deployment.isCloud(); + if (isCloud) { + await PageObjects.common.navigateToUrl('home', '', { disableWelcomePrompt: false }); + expect(await PageObjects.home.isGuidedOnboardingLandingDisplayed()).to.be(true); + } + }); }); } diff --git a/test/functional/apps/visualize/group5/_tsvb_time_series.ts b/test/functional/apps/visualize/group5/_tsvb_time_series.ts index 83342d5042ee7..fb59d947b6790 100644 --- a/test/functional/apps/visualize/group5/_tsvb_time_series.ts +++ b/test/functional/apps/visualize/group5/_tsvb_time_series.ts @@ -28,10 +28,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const browser = getService('browser'); const kibanaServer = getService('kibanaServer'); - // Failing: See https://github.com/elastic/kibana/issues/145563 - // Failing: See https://github.com/elastic/kibana/issues/145560 - // Failing: See https://github.com/elastic/kibana/issues/139096 - describe.skip('visual builder', function describeIndexTests() { + describe('visual builder', function describeIndexTests() { before(async () => { await security.testUser.setRoles([ 'kibana_admin', diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 3c143fa29a7e5..f85c106b9986c 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -45,6 +45,10 @@ export class HomePageObject extends FtrService { return await this.testSubjects.isDisplayed('homeWelcomeInterstitial'); } + async isGuidedOnboardingLandingDisplayed() { + return await this.testSubjects.isDisplayed('onboarding--landing-page'); + } + async getVisibileSolutions() { const solutionPanels = await this.testSubjects.findAll('~homSolutionPanel', 2000); const panelAttributes = await Promise.all( diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index 1aacde4127f37..a9971f27c968f 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -824,7 +824,8 @@ export class VisualBuilderPageObject extends FtrService { public async setMetricsGroupBy(option: string) { const groupBy = await this.testSubjects.find('groupBySelect'); - await this.comboBox.setElement(groupBy, option, { clickWithMouse: true }); + await this.comboBox.setElement(groupBy, option); + return await this.header.waitUntilLoadingHasFinished(); } public async setMetricsGroupByTerms( diff --git a/test/functional/services/common/browser.ts b/test/functional/services/common/browser.ts index 6046aee567da8..cfca7391202e5 100644 --- a/test/functional/services/common/browser.ts +++ b/test/functional/services/common/browser.ts @@ -504,6 +504,16 @@ class BrowserService extends FtrService { await this.driver.executeScript('return window.sessionStorage.clear();'); } + /** + * Get from the "local storage" by key + * + * @param {string} key + * @return {Promise<string>} + */ + public async getLocalStorageItem(key: string): Promise<string | null> { + return await this.driver.executeScript<string>(`return window.localStorage.getItem("${key}");`); + } + /** * Closes the currently focused window. In most environments, after the window has been * closed, it is necessary to explicitly switch to whatever window is now focused. diff --git a/test/functional/services/common/test_subjects.ts b/test/functional/services/common/test_subjects.ts index 8b3697e9c0e5a..994d4549c4fbb 100644 --- a/test/functional/services/common/test_subjects.ts +++ b/test/functional/services/common/test_subjects.ts @@ -72,6 +72,20 @@ export class TestSubjects extends FtrService { } } + /** + * Get a promise that resolves when an element no longer exists, if the element does exist + * it will wait until the element does not exist. If we wait until the timeout and the element + * still exists the promise will reject. + * + * This method is intended to quickly assert that an element does not exist. Its + * 2.5 second timeout responds quickly. + * + * When `options.timeout` is not passed the `timeouts.waitForExists` config is used as + * the timeout. The default value for that config is currently 2.5 seconds. + * + * If the element is hidden but still in the DOM it is treated as "existing", unless `options.allowHidden` + * is set to `true`. + */ public async missingOrFail(selector: string, options: ExistsOptions = {}): Promise<void | never> { const { timeout = this.WAIT_FOR_EXISTS_TIME, allowHidden = false } = options; diff --git a/test/functional/services/index.ts b/test/functional/services/index.ts index e2186ddefa5fa..b4f59d121bb21 100644 --- a/test/functional/services/index.ts +++ b/test/functional/services/index.ts @@ -50,6 +50,7 @@ import { SavedQueryManagementComponentService } from './saved_query_management_c import { KibanaSupertestProvider } from './supertest'; import { MenuToggleService } from './menu_toggle'; import { MonacoEditorService } from './monaco_editor'; +import { UsageCollectionService } from './usage_collection'; export const services = { ...commonServiceProviders, @@ -90,4 +91,5 @@ export const services = { monacoEditor: MonacoEditorService, menuToggle: MenuToggleService, retryOnStale: RetryOnStaleProvider, + usageCollection: UsageCollectionService, }; diff --git a/test/functional/services/renderable.ts b/test/functional/services/renderable.ts index da298b6ec0343..583ec5aad3ce3 100644 --- a/test/functional/services/renderable.ts +++ b/test/functional/services/renderable.ts @@ -47,4 +47,23 @@ export class RenderableService extends FtrService { } }); } + + public async getRenderCount(count: number = 1): Promise<Record<string, number>> { + const map: Record<string, number> = {}; + await this.waitForRender(count); + + const renderedElements = await this.find.allByCssSelector(RENDER_COMPLETE_SELECTOR); + + for (let i = 0; i < renderedElements.length; i++) { + const renderedElement = renderedElements[i]; + const title = (await renderedElement.getAttribute('data-title')) || i.toString(); + const renderingCount = Number( + (await renderedElement.getAttribute('data-rendering-count')) || '0' + ); + + map[title] = renderingCount; + } + + return map; + } } diff --git a/test/functional/services/usage_collection.ts b/test/functional/services/usage_collection.ts new file mode 100644 index 0000000000000..6075798df2af4 --- /dev/null +++ b/test/functional/services/usage_collection.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrService } from '../ftr_provider_context'; + +const ANALYTICS_LOCAL_STORAGE_KEY = 'analytics'; + +export class UsageCollectionService extends FtrService { + private readonly browser = this.ctx.getService('browser'); + + public async getUICounterEvents(): Promise< + Array<{ + key: string; + appName: string; + eventName: string; + type: string; + total: number; + }> + > { + try { + const rawValue = await this.browser.getLocalStorageItem(ANALYTICS_LOCAL_STORAGE_KEY); + + if (rawValue) { + const { uiCounter } = JSON.parse(rawValue) ?? {}; + + return Object.values(uiCounter); + } + } catch (e) { + // nothing to be here + } + return []; + } +} diff --git a/tsconfig.base.json b/tsconfig.base.json index d3591343954d8..7b0a8e6781baf 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -376,6 +376,8 @@ "@kbn/ace/*": ["packages/kbn-ace/*"], "@kbn/alerts": ["packages/kbn-alerts"], "@kbn/alerts/*": ["packages/kbn-alerts/*"], + "@kbn/ambient-common-types": ["packages/kbn-ambient-common-types"], + "@kbn/ambient-common-types/*": ["packages/kbn-ambient-common-types/*"], "@kbn/ambient-storybook-types": ["packages/kbn-ambient-storybook-types"], "@kbn/ambient-storybook-types/*": ["packages/kbn-ambient-storybook-types/*"], "@kbn/ambient-ui-types": ["packages/kbn-ambient-ui-types"], @@ -518,6 +520,10 @@ "@kbn/optimizer-webpack-helpers/*": ["packages/kbn-optimizer-webpack-helpers/*"], "@kbn/osquery-io-ts-types": ["packages/kbn-osquery-io-ts-types"], "@kbn/osquery-io-ts-types/*": ["packages/kbn-osquery-io-ts-types/*"], + "@kbn/peggy": ["packages/kbn-peggy"], + "@kbn/peggy/*": ["packages/kbn-peggy/*"], + "@kbn/peggy-loader": ["packages/kbn-peggy-loader"], + "@kbn/peggy-loader/*": ["packages/kbn-peggy-loader/*"], "@kbn/performance-testing-dataset-extractor": ["packages/kbn-performance-testing-dataset-extractor"], "@kbn/performance-testing-dataset-extractor/*": ["packages/kbn-performance-testing-dataset-extractor/*"], "@kbn/plugin-discovery": ["packages/kbn-plugin-discovery"], @@ -1050,6 +1056,8 @@ "@kbn/cloud-plugin/*": ["x-pack/plugins/cloud/*"], "@kbn/cross-cluster-replication-plugin": ["x-pack/plugins/cross_cluster_replication"], "@kbn/cross-cluster-replication-plugin/*": ["x-pack/plugins/cross_cluster_replication/*"], + "@kbn/custom-branding-plugin": ["x-pack/plugins/custom_branding"], + "@kbn/custom-branding-plugin/*": ["x-pack/plugins/custom_branding/*"], "@kbn/dashboard-enhanced-plugin": ["x-pack/plugins/dashboard_enhanced"], "@kbn/dashboard-enhanced-plugin/*": ["x-pack/plugins/dashboard_enhanced/*"], "@kbn/data-visualizer-plugin": ["x-pack/plugins/data_visualizer"], @@ -1274,6 +1282,7 @@ "@testing-library/jest-dom", "@emotion/react/types/css-prop", "@kbn/ambient-ui-types", + "@kbn/ambient-common-types", "@kbn/ambient-storybook-types" ] }, diff --git a/versions.json b/versions.json index 3fb78cfffe957..8905b450dc6a3 100644 --- a/versions.json +++ b/versions.json @@ -14,7 +14,7 @@ "previousMinor": true }, { - "version": "8.5.2", + "version": "8.5.3", "branch": "8.5", "currentMajor": true }, diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index c67fbd2cdabf0..eef141c18c310 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -13,6 +13,7 @@ "xpack.cloudChat": "plugins/cloud_integrations/cloud_chat", "xpack.cloudLinks": "plugins/cloud_integrations/cloud_links", "xpack.csp": "plugins/cloud_security_posture", + "xpack.customBranding": "plugins/custom_branding", "xpack.dashboard": "plugins/dashboard_enhanced", "xpack.discover": "plugins/discover_enhanced", "xpack.crossClusterReplication": "plugins/cross_cluster_replication", diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx index 5671c0c057b04..76dd42cf10790 100644 --- a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx @@ -42,6 +42,7 @@ const NARROW_COLUMN_WIDTH = '120px'; const EXPAND_COLUMN_WIDTH = '40px'; const ACTIONS_COLUMN_WIDTH = '60px'; const NOT_AVAILABLE = '--'; +const MAX_GROUP_BADGES = 10; const PAGINATION_SIZE_OPTIONS = [5, 10, 20, 50]; const DEFAULT_SORT_FIELD = 'pValue'; @@ -252,8 +253,11 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({ ), render: (_, { group, repeatedValues }) => { const valuesBadges = []; + const hasExtraBadges = Object.keys(group).length > MAX_GROUP_BADGES; + for (const fieldName in group) { if (group.hasOwnProperty(fieldName)) { + if (valuesBadges.length === MAX_GROUP_BADGES) break; valuesBadges.push( <> <EuiBadge @@ -269,7 +273,7 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({ ); } } - if (Object.keys(repeatedValues).length > 0) { + if (Object.keys(repeatedValues).length > 0 || hasExtraBadges) { valuesBadges.push( <> <EuiBadge @@ -277,11 +281,23 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({ data-test-subj="aiopsSpikeAnalysisGroupsTableColumnGroupBadge" color="hollow" > - +{Object.keys(repeatedValues).length}{' '} - <FormattedMessage - id="xpack.aiops.explainLogRateSpikes.spikeAnalysisTableGroups.moreLabel" - defaultMessage="more field/value pairs also appearing in other groups" - /> + {hasExtraBadges ? ( + <> + <FormattedMessage + id="xpack.aiops.explainLogRateSpikes.spikeAnalysisTableGroups.moreLabel" + defaultMessage="+{count, plural, one {# more field/value pair} other {# more field/value pairs}}" + values={{ count: Object.keys(group).length - MAX_GROUP_BADGES }} + /> + <br /> + </> + ) : null} + {Object.keys(repeatedValues).length > 0 ? ( + <FormattedMessage + id="xpack.aiops.explainLogRateSpikes.spikeAnalysisTableGroups.moreRepeatedLabel" + defaultMessage="+{count, plural, one {# more field/value pair} other {# more field/value pairs}} also appearing in other groups" + values={{ count: Object.keys(repeatedValues).length }} + /> + ) : null} </EuiBadge> <EuiSpacer size="xs" /> </> diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts index 6ad38fb7ca197..1b102fa1a8f39 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts @@ -550,55 +550,6 @@ describe('AlertingAuthorization', () => { }); }); - test('ensures the user has privileges to execute alerts when all features are disabled', async () => { - features.getKibanaFeatures.mockReturnValue([]); - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType<typeof authorization.checkPrivilegesDynamicallyWithRequest> - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - const alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); - - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'alerts', - operation: WriteOperations.Update, - entity: AlertingAuthorizationEntity.Alert, - }); - - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); - - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(2); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'alerts', - 'alert', - 'update' - ); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'alert', - 'update' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'alert', 'update')], - }); - }); - test('throws if user lacks the required rule privileges for the consumer', async () => { const { authorization } = mockSecurity(); const checkPrivileges: jest.MockedFunction< diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts index c85824fd3d2de..5f634b168763a 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts @@ -53,6 +53,7 @@ export enum WriteOperations { BulkEdit = 'bulkEdit', BulkDelete = 'bulkDelete', BulkEnable = 'bulkEnable', + BulkDisable = 'bulkDisable', Unsnooze = 'unsnooze', } @@ -128,10 +129,12 @@ export class AlertingAuthorization { }); this.allPossibleConsumers = this.featuresIds.then((featuresIds) => { - return asAuthorizedConsumers([ALERTS_FEATURE_ID, ...featuresIds], { - read: true, - all: true, - }); + return featuresIds.size + ? asAuthorizedConsumers([ALERTS_FEATURE_ID, ...featuresIds], { + read: true, + all: true, + }) + : {}; }); } diff --git a/x-pack/plugins/alerting/server/routes/bulk_disable_rules.test.ts b/x-pack/plugins/alerting/server/routes/bulk_disable_rules.test.ts new file mode 100644 index 0000000000000..e310ec92d779d --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/bulk_disable_rules.test.ts @@ -0,0 +1,126 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { httpServiceMock } from '@kbn/core/server/mocks'; + +import { bulkDisableRulesRoute } from './bulk_disable_rules'; +import { licenseStateMock } from '../lib/license_state.mock'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { rulesClientMock } from '../rules_client.mock'; +import { RuleTypeDisabledError } from '../lib/errors/rule_type_disabled'; +import { verifyApiAccess } from '../lib/license_api_access'; + +const rulesClient = rulesClientMock.create(); + +jest.mock('../lib/license_api_access', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('bulkDisableRulesRoute', () => { + const bulkDisableRequest = { filter: '' }; + const bulkDisableResult = { errors: [], rules: [], total: 1 }; + + it('should disable rules with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + bulkDisableRulesRoute({ router, licenseState }); + + const [config, handler] = router.patch.mock.calls[0]; + + expect(config.path).toBe('/internal/alerting/rules/_bulk_disable'); + + rulesClient.bulkDisableRules.mockResolvedValueOnce(bulkDisableResult); + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + body: bulkDisableRequest, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toEqual({ + body: bulkDisableResult, + }); + + expect(rulesClient.bulkDisableRules).toHaveBeenCalledTimes(1); + expect(rulesClient.bulkDisableRules.mock.calls[0]).toEqual([bulkDisableRequest]); + + expect(res.ok).toHaveBeenCalled(); + }); + + it('ensures the license allows bulk disabling rules', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + rulesClient.bulkDisableRules.mockResolvedValueOnce(bulkDisableResult); + + bulkDisableRulesRoute({ router, licenseState }); + + const [, handler] = router.patch.mock.calls[0]; + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + body: bulkDisableRequest, + } + ); + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents bulk disabling rules', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('Failure'); + }); + + bulkDisableRulesRoute({ router, licenseState }); + + const [, handler] = router.patch.mock.calls[0]; + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + body: bulkDisableRequest, + } + ); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: Failure]`); + }); + + it('ensures the rule type gets validated for the license', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + bulkDisableRulesRoute({ router, licenseState }); + + const [, handler] = router.patch.mock.calls[0]; + + rulesClient.bulkDisableRules.mockRejectedValue( + new RuleTypeDisabledError('Fail', 'license_invalid') + ); + + const [context, req, res] = mockHandlerArguments({ rulesClient }, { params: {}, body: {} }, [ + 'ok', + 'forbidden', + ]); + + await handler(context, req, res); + + expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + }); +}); diff --git a/x-pack/plugins/alerting/server/routes/bulk_disable_rules.ts b/x-pack/plugins/alerting/server/routes/bulk_disable_rules.ts new file mode 100644 index 0000000000000..baacd73c90efd --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/bulk_disable_rules.ts @@ -0,0 +1,50 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter } from '@kbn/core/server'; +import { verifyAccessAndContext, handleDisabledApiKeysError } from './lib'; +import { ILicenseState, RuleTypeDisabledError } from '../lib'; +import { AlertingRequestHandlerContext, INTERNAL_BASE_ALERTING_API_PATH } from '../types'; + +export const bulkDisableRulesRoute = ({ + router, + licenseState, +}: { + router: IRouter<AlertingRequestHandlerContext>; + licenseState: ILicenseState; +}) => { + router.patch( + { + path: `${INTERNAL_BASE_ALERTING_API_PATH}/rules/_bulk_disable`, + validate: { + body: schema.object({ + filter: schema.maybe(schema.string()), + ids: schema.maybe(schema.arrayOf(schema.string(), { minSize: 1, maxSize: 1000 })), + }), + }, + }, + handleDisabledApiKeysError( + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async (context, req, res) => { + const rulesClient = (await context.alerting).getRulesClient(); + const { filter, ids } = req.body; + + try { + const result = await rulesClient.bulkDisableRules({ filter, ids }); + return res.ok({ body: result }); + } catch (e) { + if (e instanceof RuleTypeDisabledError) { + return e.sendResponse(res); + } + throw e; + } + }) + ) + ) + ); +}; diff --git a/x-pack/plugins/alerting/server/routes/index.ts b/x-pack/plugins/alerting/server/routes/index.ts index f5f79ef7cd573..c4c62a92cbede 100644 --- a/x-pack/plugins/alerting/server/routes/index.ts +++ b/x-pack/plugins/alerting/server/routes/index.ts @@ -40,6 +40,7 @@ import { unsnoozeRuleRoute } from './unsnooze_rule'; import { runSoonRoute } from './run_soon'; import { bulkDeleteRulesRoute } from './bulk_delete_rules'; import { bulkEnableRulesRoute } from './bulk_enable_rules'; +import { bulkDisableRulesRoute } from './bulk_disable_rules'; import { cloneRuleRoute } from './clone_rule'; export interface RouteOptions { @@ -81,6 +82,7 @@ export function defineRoutes(opts: RouteOptions) { bulkEditInternalRulesRoute(router, licenseState); bulkDeleteRulesRoute({ router, licenseState }); bulkEnableRulesRoute({ router, licenseState }); + bulkDisableRulesRoute({ router, licenseState }); snoozeRuleRoute(router, licenseState); unsnoozeRuleRoute(router, licenseState); runSoonRoute(router, licenseState); diff --git a/x-pack/plugins/alerting/server/rules_client.mock.ts b/x-pack/plugins/alerting/server/rules_client.mock.ts index b3844ddd5f74b..ba7654694da26 100644 --- a/x-pack/plugins/alerting/server/rules_client.mock.ts +++ b/x-pack/plugins/alerting/server/rules_client.mock.ts @@ -39,6 +39,7 @@ const createRulesClientMock = () => { bulkEdit: jest.fn(), bulkDeleteRules: jest.fn(), bulkEnableRules: jest.fn(), + bulkDisableRules: jest.fn(), snooze: jest.fn(), unsnooze: jest.fn(), calculateIsSnoozedUntil: jest.fn(), diff --git a/x-pack/plugins/alerting/server/rules_client/lib/index.ts b/x-pack/plugins/alerting/server/rules_client/lib/index.ts index 0f91b6793dd90..f7e0620222ec6 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/index.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/index.ts @@ -9,6 +9,7 @@ export { mapSortField } from './map_sort_field'; export { validateOperationOnAttributes } from './validate_attributes'; export { retryIfBulkEditConflicts } from './retry_if_bulk_edit_conflicts'; export { retryIfBulkDeleteConflicts } from './retry_if_bulk_delete_conflicts'; -export { retryIfBulkEnableConflicts } from './retry_if_bulk_enable_conflicts'; +export { retryIfBulkDisableConflicts } from './retry_if_bulk_disable_conflicts'; +export { retryIfBulkOperationConflicts } from './retry_if_bulk_operation_conflicts'; export { applyBulkEditOperation } from './apply_bulk_edit_operation'; export { buildKueryNodeFilter } from './build_kuery_node_filter'; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_enable_conflicts.ts b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_disable_conflicts.ts similarity index 67% rename from x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_enable_conflicts.ts rename to x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_disable_conflicts.ts index fe9c7084642cb..90ecf57c029a0 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_enable_conflicts.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_disable_conflicts.ts @@ -16,50 +16,56 @@ import { RawRule } from '../../types'; const MAX_RULES_IDS_IN_RETRY = 1000; -export type BulkEnableOperation = (filter: KueryNode | null) => Promise<{ +export type BulkDisableOperation = (filter: KueryNode | null) => Promise<{ errors: BulkOperationError[]; rules: Array<SavedObjectsBulkUpdateObject<RawRule>>; - taskIdsToEnable: string[]; + taskIdsToDisable: string[]; + taskIdsToDelete: string[]; }>; interface ReturnRetry { errors: BulkOperationError[]; rules: Array<SavedObjectsBulkUpdateObject<RawRule>>; - taskIdsToEnable: string[]; + taskIdsToDisable: string[]; + taskIdsToDelete: string[]; } /** - * Retries BulkEnable requests - * If in response are presents conflicted savedObjects(409 statusCode), this util constructs filter with failed SO ids and retries bulkEnable operation until + * Retries BulkDisable requests + * If in response are presents conflicted savedObjects(409 statusCode), this util constructs filter with failed SO ids and retries bulkDisable operation until * all SO updated or number of retries exceeded * @param logger - * @param bulkEnableOperation + * @param bulkDisableOperation * @param filter - KueryNode filter * @param retries - number of retries left * @param accErrors - accumulated conflict errors - * @param accRules - accumulated enabled rules - * @param accTaskIdsToEnable - accumulated task ids + * @param accRules - accumulated disabled rules + * @param accTaskIdsToDisable - accumulated task ids to disable + * @param accTaskIdsToDelete - accumulated task ids to delete * @returns Promise<ReturnRetry> */ -export const retryIfBulkEnableConflicts = async ( +export const retryIfBulkDisableConflicts = async ( logger: Logger, - bulkEnableOperation: BulkEnableOperation, + bulkDisableOperation: BulkDisableOperation, filter: KueryNode | null, retries: number = RETRY_IF_CONFLICTS_ATTEMPTS, accErrors: BulkOperationError[] = [], accRules: Array<SavedObjectsBulkUpdateObject<RawRule>> = [], - accTaskIdsToEnable: string[] = [] + accTaskIdsToDisable: string[] = [], + accTaskIdsToDelete: string[] = [] ): Promise<ReturnRetry> => { try { const { errors: currentErrors, rules: currentRules, - taskIdsToEnable: currentTaskIdsToEnable, - } = await bulkEnableOperation(filter); + taskIdsToDisable: currentTaskIdsToDisable, + taskIdsToDelete: currentTaskIdsToDelete, + } = await bulkDisableOperation(filter); const rules = [...accRules, ...currentRules]; - const taskIdsToEnable = [...accTaskIdsToEnable, ...currentTaskIdsToEnable]; + const taskIdsToDisable = [...accTaskIdsToDisable, ...currentTaskIdsToDisable]; + const taskIdsToDelete = [...accTaskIdsToDelete, ...currentTaskIdsToDelete]; const errors = retries <= 0 ? [...accErrors, ...currentErrors] @@ -76,22 +82,24 @@ export const retryIfBulkEnableConflicts = async ( return { errors, rules, - taskIdsToEnable, + taskIdsToDisable, + taskIdsToDelete, }; } if (retries <= 0) { - logger.warn('Bulk enable rules conflicts, exceeded retries'); + logger.warn('Bulk disable rules conflicts, exceeded retries'); return { errors, rules, - taskIdsToEnable, + taskIdsToDisable, + taskIdsToDelete, }; } logger.debug( - `Bulk enable rules conflicts, retrying ..., ${ruleIdsWithConflictError.length} saved objects conflicted` + `Bulk disable rules conflicts, retrying ..., ${ruleIdsWithConflictError.length} saved objects conflicted` ); await waitBeforeNextRetry(retries); @@ -103,14 +111,14 @@ export const retryIfBulkEnableConflicts = async ( await pMap( chunk(ruleIdsWithConflictError, MAX_RULES_IDS_IN_RETRY), async (queryIds) => - retryIfBulkEnableConflicts( + retryIfBulkDisableConflicts( logger, - bulkEnableOperation, + bulkDisableOperation, convertRuleIdsToKueryNode(queryIds), retries - 1, errors, rules, - taskIdsToEnable + taskIdsToDisable ), { concurrency: 1, @@ -121,10 +129,11 @@ export const retryIfBulkEnableConflicts = async ( return { errors: [...acc.errors, ...item.errors], rules: [...acc.rules, ...item.rules], - taskIdsToEnable: [...acc.taskIdsToEnable, ...item.taskIdsToEnable], + taskIdsToDisable: [...acc.taskIdsToDisable, ...item.taskIdsToDisable], + taskIdsToDelete: [...acc.taskIdsToDelete, ...item.taskIdsToDelete], }; }, - { errors: [], rules: [], taskIdsToEnable: [] } + { errors: [], rules: [], taskIdsToDisable: [], taskIdsToDelete: [] } ); } catch (err) { throw err; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.test.ts b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.test.ts new file mode 100644 index 0000000000000..554363e23e40f --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.test.ts @@ -0,0 +1,108 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { KueryNode } from '@kbn/es-query'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; + +import { retryIfBulkOperationConflicts } from './retry_if_bulk_operation_conflicts'; +import { RETRY_IF_CONFLICTS_ATTEMPTS } from './wait_before_next_retry'; + +const mockFilter: KueryNode = { + type: 'function', + value: 'mock', +}; + +const mockLogger = loggingSystemMock.create().get(); + +const mockSuccessfulResult = { + accListSpecificForBulkOperation: [['apiKey1'], ['taskId1']], + errors: [], + rules: [], +}; + +const error409 = { + message: 'some fake message', + status: 409, + rule: { + id: 'fake_rule_id', + name: 'fake rule name', + }, +}; + +const getOperationConflictsTimes = (times: number) => { + return async () => { + conflictOperationMock(); + times--; + if (times >= 0) { + return { + accListSpecificForBulkOperation: [[], []], + errors: [error409], + rules: [], + }; + } + return mockSuccessfulResult; + }; +}; + +const OperationSuccessful = async () => mockSuccessfulResult; +const conflictOperationMock = jest.fn(); + +describe('retryIfBulkOperationConflicts', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + + test('should work when operation is successful', async () => { + const result = await retryIfBulkOperationConflicts({ + action: 'ENABLE', + logger: mockLogger, + bulkOperation: OperationSuccessful, + filter: mockFilter, + }); + + expect(result).toEqual(mockSuccessfulResult); + }); + + test('should throw error when operation fails', async () => { + await expect( + retryIfBulkOperationConflicts({ + action: 'ENABLE', + logger: mockLogger, + bulkOperation: async () => { + throw Error('Test failure'); + }, + filter: mockFilter, + }) + ).rejects.toThrowError('Test failure'); + }); + + test(`should return conflict errors when number of retries exceeds ${RETRY_IF_CONFLICTS_ATTEMPTS}`, async () => { + const result = await retryIfBulkOperationConflicts({ + action: 'ENABLE', + logger: mockLogger, + bulkOperation: getOperationConflictsTimes(RETRY_IF_CONFLICTS_ATTEMPTS + 1), + filter: mockFilter, + }); + + expect(result.errors).toEqual([error409]); + expect(mockLogger.warn).toBeCalledWith('Bulk enable rules conflicts, exceeded retries'); + }); + + for (let i = 1; i <= RETRY_IF_CONFLICTS_ATTEMPTS; i++) { + test(`should work when operation conflicts ${i} times`, async () => { + const result = await retryIfBulkOperationConflicts({ + action: 'ENABLE', + logger: mockLogger, + bulkOperation: getOperationConflictsTimes(i), + filter: mockFilter, + }); + + expect(conflictOperationMock.mock.calls.length).toBe(i + 1); + expect(result).toStrictEqual(mockSuccessfulResult); + }); + } +}); diff --git a/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.ts b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.ts new file mode 100644 index 0000000000000..9b95335f3994c --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/lib/retry_if_bulk_operation_conflicts.ts @@ -0,0 +1,169 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import pMap from 'p-map'; +import { chunk } from 'lodash'; +import { KueryNode } from '@kbn/es-query'; +import { Logger, SavedObjectsBulkUpdateObject } from '@kbn/core/server'; +import { convertRuleIdsToKueryNode } from '../../lib'; +import { BulkOperationError } from '../rules_client'; +import { waitBeforeNextRetry, RETRY_IF_CONFLICTS_ATTEMPTS } from './wait_before_next_retry'; +import { RawRule } from '../../types'; + +const MAX_RULES_IDS_IN_RETRY = 1000; + +interface BulkOperationResult { + errors: BulkOperationError[]; + rules: Array<SavedObjectsBulkUpdateObject<RawRule>>; + accListSpecificForBulkOperation: string[][]; +} + +export const retryIfBulkOperationConflicts = async ({ + action, + logger, + bulkOperation, + filter, + retries = RETRY_IF_CONFLICTS_ATTEMPTS, +}: { + action: 'DELETE' | 'ENABLE' | 'DISABLE'; + logger: Logger; + bulkOperation: (filter: KueryNode | null) => Promise<BulkOperationResult>; + filter: KueryNode | null; + retries?: number; +}): Promise<BulkOperationResult> => { + return handler({ + action, + logger, + bulkOperation, + filter, + retries, + }); +}; + +const handler = async ({ + action, + logger, + bulkOperation, + filter, + accListSpecificForBulkOperation, // this list can include several accumulators, depends on the type of bulk operation + accErrors = [], + accRules = [], + retries = RETRY_IF_CONFLICTS_ATTEMPTS, +}: { + action: 'DELETE' | 'ENABLE' | 'DISABLE'; + logger: Logger; + bulkOperation: (filter: KueryNode | null) => Promise<BulkOperationResult>; + filter: KueryNode | null; + accListSpecificForBulkOperation?: string[][]; + accErrors?: BulkOperationError[]; + accRules?: Array<SavedObjectsBulkUpdateObject<RawRule>>; + retries?: number; +}): Promise<BulkOperationResult> => { + try { + const { + errors: currentErrors, + rules: currentRules, + accListSpecificForBulkOperation: currentAccListSpecificForBulkOperation, + } = await bulkOperation(filter); + + // it a way to assign default value for a accListSpecificForBulkOperation + if (!accListSpecificForBulkOperation) { + accListSpecificForBulkOperation = Array.from( + Array(currentAccListSpecificForBulkOperation.length), + () => [] + ); + } + + const rules = [...accRules, ...currentRules]; + + const errors = + retries <= 0 + ? [...accErrors, ...currentErrors] + : [...accErrors, ...currentErrors.filter((error) => error.status !== 409)]; + + const ruleIdsWithConflictError = currentErrors.reduce<string[]>((acc, error) => { + if (error.status === 409) { + return [...acc, error.rule.id]; + } + return acc; + }, []); + + const newAccListSpecificForBulkOperation = accListSpecificForBulkOperation.map((acc, index) => [ + ...acc, + ...currentAccListSpecificForBulkOperation[index], + ]); + + if (ruleIdsWithConflictError.length === 0) { + return { + errors, + rules, + accListSpecificForBulkOperation: newAccListSpecificForBulkOperation, + }; + } + + if (retries <= 0) { + logger.warn(`Bulk ${action.toLowerCase()} rules conflicts, exceeded retries`); + + return { + errors, + rules, + accListSpecificForBulkOperation: newAccListSpecificForBulkOperation, + }; + } + + logger.debug( + `Bulk ${action.toLowerCase()} rules conflicts, retrying ..., ${ + ruleIdsWithConflictError.length + } saved objects conflicted` + ); + + await waitBeforeNextRetry(retries); + + // here, we construct filter query with ids. But, due to a fact that number of conflicted saved objects can exceed few thousands we can encounter following error: + // "all shards failed: search_phase_execution_exception: [query_shard_exception] Reason: failed to create query: maxClauseCount is set to 2621" + // That's why we chunk processing ids into pieces by size equals to MAX_RULES_IDS_IN_RETRY + return ( + await pMap( + chunk(ruleIdsWithConflictError, MAX_RULES_IDS_IN_RETRY), + async (queryIds) => + handler({ + action, + logger, + bulkOperation, + filter: convertRuleIdsToKueryNode(queryIds), + accListSpecificForBulkOperation: newAccListSpecificForBulkOperation, + accErrors: errors, + accRules: rules, + retries: retries - 1, + }), + { + concurrency: 1, + } + ) + ).reduce( + (acc, item) => { + return { + errors: [...acc.errors, ...item.errors], + rules: [...acc.rules, ...item.rules], + accListSpecificForBulkOperation: acc.accListSpecificForBulkOperation.map( + (element, index) => [...element, ...item.accListSpecificForBulkOperation[index]] + ), + }; + }, + { + errors: [], + rules: [], + accListSpecificForBulkOperation: Array.from( + Array(accListSpecificForBulkOperation.length), + () => [] + ), + } + ); + } catch (err) { + throw err; + } +}; diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.ts index 93754d5e1cd9b..aea0db037eff2 100644 --- a/x-pack/plugins/alerting/server/rules_client/rules_client.ts +++ b/x-pack/plugins/alerting/server/rules_client/rules_client.ts @@ -111,7 +111,8 @@ import { validateOperationOnAttributes, retryIfBulkEditConflicts, retryIfBulkDeleteConflicts, - retryIfBulkEnableConflicts, + retryIfBulkDisableConflicts, + retryIfBulkOperationConflicts, applyBulkEditOperation, buildKueryNodeFilter, } from './lib'; @@ -460,7 +461,7 @@ interface ScheduleTaskOptions { throwOnConflict: boolean; // whether to throw conflict errors or swallow them } -type BulkAction = 'DELETE' | 'ENABLE'; +type BulkAction = 'DELETE' | 'ENABLE' | 'DISABLE'; // NOTE: Changing this prefix will require a migration to update the prefix in all existing `rule` saved objects const extractedSavedObjectParamReferenceNamePrefix = 'param:'; @@ -2019,6 +2020,10 @@ export class RulesClient { WriteOperation: WriteOperations.BulkEnable, RuleAuditAction: RuleAuditAction.ENABLE, }, + DISABLE: { + WriteOperation: WriteOperations.BulkDisable, + RuleAuditAction: RuleAuditAction.DISABLE, + }, }; const { aggregations, total } = await this.unsecuredSavedObjectsClient.find< RawRule, @@ -2652,12 +2657,15 @@ export class RulesClient { action: 'ENABLE', }); - const { errors, rules, taskIdsToEnable } = await retryIfBulkEnableConflicts( - this.logger, - (filterKueryNode: KueryNode | null) => + const { errors, rules, accListSpecificForBulkOperation } = await retryIfBulkOperationConflicts({ + action: 'ENABLE', + logger: this.logger, + bulkOperation: (filterKueryNode: KueryNode | null) => this.bulkEnableRulesWithOCC({ filter: filterKueryNode }), - kueryNodeFilterWithAuth - ); + filter: kueryNodeFilterWithAuth, + }); + + const [taskIdsToEnable] = accListSpecificForBulkOperation; const taskIdsFailedToBeEnabled: string[] = []; if (taskIdsToEnable.length > 0) { @@ -2666,11 +2674,20 @@ export class RulesClient { resultFromEnablingTasks?.errors?.forEach((error) => { taskIdsFailedToBeEnabled.push(error.task.id); }); - this.logger.debug( - `Successfully enabled schedules for underlying tasks: ${taskIdsToEnable - .filter((id) => !taskIdsFailedToBeEnabled.includes(id)) - .join(', ')}` - ); + if (resultFromEnablingTasks.tasks.length) { + this.logger.debug( + `Successfully enabled schedules for underlying tasks: ${resultFromEnablingTasks.tasks + .map((task) => task.id) + .join(', ')}` + ); + } + if (resultFromEnablingTasks.errors.length) { + this.logger.error( + `Failure to enable schedules for underlying tasks: ${resultFromEnablingTasks.errors + .map((error) => error.task.id) + .join(', ')}` + ); + } } catch (error) { taskIdsFailedToBeEnabled.push(...taskIdsToEnable); this.logger.error( @@ -2708,7 +2725,6 @@ export class RulesClient { const rulesToEnable: Array<SavedObjectsBulkUpdateObject<RawRule>> = []; const taskIdsToEnable: string[] = []; const errors: BulkOperationError[] = []; - const taskIdToRuleIdMapping: Record<string, string> = {}; const ruleNameToRuleIdMapping: Record<string, string> = {}; for await (const response of rulesFinder.find()) { @@ -2725,9 +2741,6 @@ export class RulesClient { if (rule.attributes.name) { ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; } - if (rule.attributes.scheduledTaskId) { - taskIdToRuleIdMapping[rule.id] = rule.attributes.scheduledTaskId; - } const username = await this.getUserName(); @@ -2804,8 +2817,8 @@ export class RulesClient { result.saved_objects.forEach((rule) => { if (rule.error === undefined) { - if (taskIdToRuleIdMapping[rule.id]) { - taskIdsToEnable.push(taskIdToRuleIdMapping[rule.id]); + if (rule.attributes.scheduledTaskId) { + taskIdsToEnable.push(rule.attributes.scheduledTaskId); } rules.push(rule); } else { @@ -2819,7 +2832,256 @@ export class RulesClient { }); } }); - return { errors, rules, taskIdsToEnable }; + return { errors, rules, accListSpecificForBulkOperation: [taskIdsToEnable] }; + }; + + private recoverRuleAlerts = async (id: string, attributes: RawRule) => { + if (!this.eventLogger || !attributes.scheduledTaskId) return; + try { + const { state } = taskInstanceToAlertTaskInstance( + await this.taskManager.get(attributes.scheduledTaskId), + attributes as unknown as SanitizedRule + ); + + const recoveredAlerts = mapValues<Record<string, RawAlert>, Alert>( + state.alertInstances ?? {}, + (rawAlertInstance, alertId) => new Alert(alertId, rawAlertInstance) + ); + const recoveredAlertIds = Object.keys(recoveredAlerts); + + for (const alertId of recoveredAlertIds) { + const { group: actionGroup } = recoveredAlerts[alertId].getLastScheduledActions() ?? {}; + const instanceState = recoveredAlerts[alertId].getState(); + const message = `instance '${alertId}' has recovered due to the rule was disabled`; + + const event = createAlertEventLogRecordObject({ + ruleId: id, + ruleName: attributes.name, + ruleType: this.ruleTypeRegistry.get(attributes.alertTypeId), + consumer: attributes.consumer, + instanceId: alertId, + action: EVENT_LOG_ACTIONS.recoveredInstance, + message, + state: instanceState, + group: actionGroup, + namespace: this.namespace, + spaceId: this.spaceId, + savedObjects: [ + { + id, + type: 'alert', + typeId: attributes.alertTypeId, + relation: SAVED_OBJECT_REL_PRIMARY, + }, + ], + }); + this.eventLogger.logEvent(event); + } + } catch (error) { + // this should not block the rest of the disable process + this.logger.warn( + `rulesClient.disable('${id}') - Could not write recovery events - ${error.message}` + ); + } + }; + + public bulkDisableRules = async (options: BulkOptions) => { + const { ids, filter } = this.getAndValidateCommonBulkOptions(options); + + const kueryNodeFilter = ids ? convertRuleIdsToKueryNode(ids) : buildKueryNodeFilter(filter); + const authorizationFilter = await this.getAuthorizationFilter({ action: 'DISABLE' }); + + const kueryNodeFilterWithAuth = + authorizationFilter && kueryNodeFilter + ? nodeBuilder.and([kueryNodeFilter, authorizationFilter as KueryNode]) + : kueryNodeFilter; + + const { total } = await this.checkAuthorizationAndGetTotal({ + filter: kueryNodeFilterWithAuth, + action: 'DISABLE', + }); + + const { errors, rules, taskIdsToDisable, taskIdsToDelete } = await retryIfBulkDisableConflicts( + this.logger, + (filterKueryNode: KueryNode | null) => + this.bulkDisableRulesWithOCC({ filter: filterKueryNode }), + kueryNodeFilterWithAuth + ); + + if (taskIdsToDisable.length > 0) { + try { + const resultFromDisablingTasks = await this.taskManager.bulkDisable(taskIdsToDisable); + if (resultFromDisablingTasks.tasks.length) { + this.logger.debug( + `Successfully disabled schedules for underlying tasks: ${resultFromDisablingTasks.tasks + .map((task) => task.id) + .join(', ')}` + ); + } + if (resultFromDisablingTasks.errors.length) { + this.logger.error( + `Failure to disable schedules for underlying tasks: ${resultFromDisablingTasks.errors + .map((error) => error.task.id) + .join(', ')}` + ); + } + } catch (error) { + this.logger.error( + `Failure to disable schedules for underlying tasks: ${taskIdsToDisable.join( + ', ' + )}. TaskManager bulkDisable failed with Error: ${error.message}` + ); + } + } + + const taskIdsFailedToBeDeleted: string[] = []; + const taskIdsSuccessfullyDeleted: string[] = []; + + if (taskIdsToDelete.length > 0) { + try { + const resultFromDeletingTasks = await this.taskManager.bulkRemoveIfExist(taskIdsToDelete); + resultFromDeletingTasks?.statuses.forEach((status) => { + if (status.success) { + taskIdsSuccessfullyDeleted.push(status.id); + } else { + taskIdsFailedToBeDeleted.push(status.id); + } + }); + if (taskIdsSuccessfullyDeleted.length) { + this.logger.debug( + `Successfully deleted schedules for underlying tasks: ${taskIdsSuccessfullyDeleted.join( + ', ' + )}` + ); + } + if (taskIdsFailedToBeDeleted.length) { + this.logger.error( + `Failure to delete schedules for underlying tasks: ${taskIdsFailedToBeDeleted.join( + ', ' + )}` + ); + } + } catch (error) { + this.logger.error( + `Failure to delete schedules for underlying tasks: ${taskIdsToDelete.join( + ', ' + )}. TaskManager bulkRemoveIfExist failed with Error: ${error.message}` + ); + } + } + + const updatedRules = rules.map(({ id, attributes, references }) => { + return this.getAlertFromRaw( + id, + attributes.alertTypeId as string, + attributes as RawRule, + references, + false + ); + }); + + return { errors, rules: updatedRules, total }; + }; + + private bulkDisableRulesWithOCC = async ({ filter }: { filter: KueryNode | null }) => { + const rulesFinder = + await this.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser<RawRule>( + { + filter, + type: 'alert', + perPage: 100, + ...(this.namespace ? { namespaces: [this.namespace] } : undefined), + } + ); + + const rulesToDisable: Array<SavedObjectsBulkUpdateObject<RawRule>> = []; + const errors: BulkOperationError[] = []; + const ruleNameToRuleIdMapping: Record<string, string> = {}; + + for await (const response of rulesFinder.find()) { + await pMap(response.saved_objects, async (rule) => { + try { + if (rule.attributes.enabled === false) return; + + this.recoverRuleAlerts(rule.id, rule.attributes); + + if (rule.attributes.name) { + ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; + } + + const username = await this.getUserName(); + const updatedAttributes = this.updateMeta({ + ...rule.attributes, + enabled: false, + scheduledTaskId: + rule.attributes.scheduledTaskId === rule.id ? rule.attributes.scheduledTaskId : null, + updatedBy: username, + updatedAt: new Date().toISOString(), + }); + + rulesToDisable.push({ + ...rule, + attributes: { + ...updatedAttributes, + }, + }); + + this.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.DISABLE, + outcome: 'unknown', + savedObject: { type: 'alert', id: rule.id }, + }) + ); + } catch (error) { + errors.push({ + message: error.message, + rule: { + id: rule.id, + name: rule.attributes?.name, + }, + }); + this.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.DISABLE, + error, + }) + ); + } + }); + } + + const result = await this.unsecuredSavedObjectsClient.bulkCreate(rulesToDisable, { + overwrite: true, + }); + + const taskIdsToDisable: string[] = []; + const taskIdsToDelete: string[] = []; + const disabledRules: Array<SavedObjectsBulkUpdateObject<RawRule>> = []; + + result.saved_objects.forEach((rule) => { + if (rule.error === undefined) { + if (rule.attributes.scheduledTaskId) { + if (rule.attributes.scheduledTaskId !== rule.id) { + taskIdsToDelete.push(rule.attributes.scheduledTaskId); + } else { + taskIdsToDisable.push(rule.attributes.scheduledTaskId); + } + } + disabledRules.push(rule); + } else { + errors.push({ + message: rule.error.message ?? 'n/a', + status: rule.error.statusCode, + rule: { + id: rule.id, + name: ruleNameToRuleIdMapping[rule.id] ?? 'n/a', + }, + }); + } + }); + + return { errors, rules: disabledRules, taskIdsToDisable, taskIdsToDelete }; }; private apiKeyAsAlertAttributes( @@ -3115,55 +3377,8 @@ export class RulesClient { version = alert.version; } - if (this.eventLogger && attributes.scheduledTaskId) { - try { - const { state } = taskInstanceToAlertTaskInstance( - await this.taskManager.get(attributes.scheduledTaskId), - attributes as unknown as SanitizedRule - ); + this.recoverRuleAlerts(id, attributes); - const recoveredAlertInstances = mapValues<Record<string, RawAlert>, Alert>( - state.alertInstances ?? {}, - (rawAlertInstance, alertId) => new Alert(alertId, rawAlertInstance) - ); - const recoveredAlertInstanceIds = Object.keys(recoveredAlertInstances); - - for (const instanceId of recoveredAlertInstanceIds) { - const { group: actionGroup } = - recoveredAlertInstances[instanceId].getLastScheduledActions() ?? {}; - const instanceState = recoveredAlertInstances[instanceId].getState(); - const message = `instance '${instanceId}' has recovered due to the rule was disabled`; - - const event = createAlertEventLogRecordObject({ - ruleId: id, - ruleName: attributes.name, - ruleType: this.ruleTypeRegistry.get(attributes.alertTypeId), - consumer: attributes.consumer, - instanceId, - action: EVENT_LOG_ACTIONS.recoveredInstance, - message, - state: instanceState, - group: actionGroup, - namespace: this.namespace, - spaceId: this.spaceId, - savedObjects: [ - { - id, - type: 'alert', - typeId: attributes.alertTypeId, - relation: SAVED_OBJECT_REL_PRIMARY, - }, - ], - }); - this.eventLogger.logEvent(event); - } - } catch (error) { - // this should not block the rest of the disable process - this.logger.warn( - `rulesClient.disable('${id}') - Could not write recovery events - ${error.message}` - ); - } - } try { await this.authorization.ensureAuthorized({ ruleTypeId: attributes.alertTypeId, diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts new file mode 100644 index 0000000000000..7024844c22879 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts @@ -0,0 +1,588 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { RulesClient, ConstructorOptions } from '../rules_client'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; +import type { SavedObject } from '@kbn/core-saved-objects-common'; +import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; +import { alertingAuthorizationMock } from '../../authorization/alerting_authorization.mock'; +import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; +import { actionsAuthorizationMock } from '@kbn/actions-plugin/server/mocks'; +import { AlertingAuthorization } from '../../authorization/alerting_authorization'; +import { ActionsAuthorization } from '@kbn/actions-plugin/server'; +import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; +import { getBeforeSetup, setGlobalDate } from './lib'; +import { loggerMock } from '@kbn/logging-mocks'; +import { BulkUpdateTaskResult } from '@kbn/task-manager-plugin/server/task_scheduling'; +import { eventLoggerMock } from '@kbn/event-log-plugin/server/mocks'; +import { + disabledRule2, + enabledRule1, + enabledRule2, + savedObjectWith409Error, + savedObjectWith500Error, + successfulSavedObject1, + successfulSavedObject2, + successfulSavedObjects, + updatedRule1, + updatedRule2, +} from './test_helpers'; + +jest.mock('../../invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation', () => ({ + bulkMarkApiKeysForInvalidation: jest.fn(), +})); + +jest.mock('../../task_runner/alert_task_instance', () => ({ + taskInstanceToAlertTaskInstance: jest.fn(), +})); + +const { taskInstanceToAlertTaskInstance } = jest.requireMock( + '../../task_runner/alert_task_instance' +); + +const taskManager = taskManagerMock.createStart(); +const ruleTypeRegistry = ruleTypeRegistryMock.create(); +const unsecuredSavedObjectsClient = savedObjectsClientMock.create(); +const encryptedSavedObjects = encryptedSavedObjectsMock.createClient(); +const authorization = alertingAuthorizationMock.create(); +const actionsAuthorization = actionsAuthorizationMock.create(); +const auditLogger = auditLoggerMock.create(); +const logger = loggerMock.create(); +const eventLogger = eventLoggerMock.create(); + +const kibanaVersion = 'v8.2.0'; +const createAPIKeyMock = jest.fn(); +const rulesClientParams: jest.Mocked<ConstructorOptions> = { + taskManager, + ruleTypeRegistry, + unsecuredSavedObjectsClient, + authorization: authorization as unknown as AlertingAuthorization, + actionsAuthorization: actionsAuthorization as unknown as ActionsAuthorization, + spaceId: 'default', + namespace: 'default', + getUserName: jest.fn(), + createAPIKey: createAPIKeyMock, + logger, + encryptedSavedObjectsClient: encryptedSavedObjects, + getActionsClient: jest.fn(), + getEventLogClient: jest.fn(), + kibanaVersion, + auditLogger, + eventLogger, + minimumScheduleInterval: { value: '1m', enforce: false }, +}; + +beforeEach(() => { + getBeforeSetup(rulesClientParams, taskManager, ruleTypeRegistry); + (auditLogger.log as jest.Mock).mockClear(); +}); + +setGlobalDate(); + +describe('bulkDisableRules', () => { + let rulesClient: RulesClient; + const mockCreatePointInTimeFinderAsInternalUser = ( + response = { saved_objects: [enabledRule1, enabledRule2] } + ) => { + encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest + .fn() + .mockResolvedValue({ + close: jest.fn(), + find: function* asyncGenerator() { + yield response; + }, + }); + }; + + const mockUnsecuredSavedObjectFind = (total: number) => { + unsecuredSavedObjectsClient.find.mockResolvedValue({ + aggregations: { + alertTypeId: { + buckets: [ + { + key: ['fakeType', 'fakeConsumer'], + key_as_string: 'fakeType|fakeConsumer', + doc_count: total, + }, + ], + }, + }, + saved_objects: [], + per_page: 0, + page: 0, + total, + }); + }; + + beforeEach(async () => { + rulesClient = new RulesClient(rulesClientParams); + authorization.getFindAuthorizationFilter.mockResolvedValue({ + ensureRuleTypeIsAuthorized() {}, + }); + mockCreatePointInTimeFinderAsInternalUser(); + mockUnsecuredSavedObjectFind(2); + }); + + test('should disable two rule', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + + const result = await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1); + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + expect.arrayContaining([ + expect.objectContaining({ + id: 'id1', + attributes: expect.objectContaining({ + enabled: false, + }), + }), + expect.objectContaining({ + id: 'id2', + attributes: expect.objectContaining({ + enabled: false, + }), + }), + ]), + { overwrite: true } + ); + + expect(result).toStrictEqual({ + errors: [], + rules: [updatedRule1, updatedRule2], + total: 2, + }); + }); + + test('should try to disable rules, one successful and one with 500 error', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1, savedObjectWith500Error], + }); + + const result = await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1); + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + expect.arrayContaining([ + expect.objectContaining({ + id: 'id1', + attributes: expect.objectContaining({ + enabled: false, + }), + }), + ]), + { overwrite: true } + ); + + expect(result).toStrictEqual({ + errors: [{ message: 'UPS', rule: { id: 'id2', name: 'fakeName' }, status: 500 }], + rules: [updatedRule1], + total: 2, + }); + }); + + test('should try to disable rules, one successful and one with 409 error, which will not be deleted with retry', async () => { + unsecuredSavedObjectsClient.bulkCreate + .mockResolvedValueOnce({ + saved_objects: [successfulSavedObject1, savedObjectWith409Error], + }) + .mockResolvedValueOnce({ + saved_objects: [savedObjectWith409Error], + }) + .mockResolvedValueOnce({ + saved_objects: [savedObjectWith409Error], + }); + + encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest + .fn() + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule1, enabledRule2] }; + }, + }) + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule2] }; + }, + }) + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule2] }; + }, + }); + + const result = await rulesClient.bulkDisableRules({ ids: ['id1', 'id2'] }); + + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(3); + expect(taskManager.bulkDisable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkDisable).toHaveBeenCalledWith(['id1']); + expect(result).toStrictEqual({ + errors: [{ message: 'UPS', rule: { id: 'id2', name: 'fakeName' }, status: 409 }], + rules: [updatedRule1], + total: 2, + }); + }); + + test('should try to disable rules, one successful and one with 409 error, which successfully will be disabled with retry', async () => { + unsecuredSavedObjectsClient.bulkCreate + .mockResolvedValueOnce({ + saved_objects: [successfulSavedObject1, savedObjectWith409Error], + }) + .mockResolvedValueOnce({ + saved_objects: [successfulSavedObject2], + }); + + encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest + .fn() + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule1, enabledRule2] }; + }, + }) + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule1] }; + }, + }) + .mockResolvedValueOnce({ + close: jest.fn(), + find: function* asyncGenerator() { + yield { saved_objects: [enabledRule1] }; + }, + }); + + const result = await rulesClient.bulkDisableRules({ ids: ['id1', 'id2'] }); + + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(2); + + expect(result).toStrictEqual({ + errors: [], + rules: [updatedRule1, updatedRule2], + total: 2, + }); + }); + + test('should thow an error if number of matched rules greater than 10,000', async () => { + unsecuredSavedObjectsClient.find.mockResolvedValue({ + aggregations: { + alertTypeId: { + buckets: [{ key: ['myType', 'myApp'], key_as_string: 'myType|myApp', doc_count: 2 }], + }, + }, + saved_objects: [], + per_page: 0, + page: 0, + total: 10001, + }); + + await expect(rulesClient.bulkDisableRules({ filter: 'fake_filter' })).rejects.toThrow( + 'More than 10000 rules matched for bulk disable' + ); + }); + + test('should throw an error if we do not get buckets', async () => { + unsecuredSavedObjectsClient.find.mockResolvedValue({ + aggregations: { + alertTypeId: {}, + }, + saved_objects: [], + per_page: 0, + page: 0, + total: 2, + }); + + await expect(rulesClient.bulkDisableRules({ filter: 'fake_filter' })).rejects.toThrow( + 'No rules found for bulk disable' + ); + }); + + test('should skip rule if it is already disabled', async () => { + mockCreatePointInTimeFinderAsInternalUser({ + saved_objects: [enabledRule1, disabledRule2], + }); + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1], + }); + + const result = await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(1); + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + expect.arrayContaining([ + expect.objectContaining({ + id: 'id1', + attributes: expect.objectContaining({ + enabled: false, + }), + }), + ]), + { overwrite: true } + ); + + expect(result).toStrictEqual({ + errors: [], + rules: [updatedRule1], + total: 2, + }); + }); + + describe('taskManager', () => { + test('should call task manager bulkDisable', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + + taskManager.bulkDisable.mockResolvedValue({ + tasks: [{ id: 'id1' }], + errors: [ + { + task: { id: 'id2' }, + error: { + error: '', + message: 'UPS', + statusCode: 500, + }, + }, + ], + } as unknown as BulkUpdateTaskResult); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkDisable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkDisable).toHaveBeenCalledWith(['id1', 'id2']); + + expect(logger.debug).toBeCalledTimes(1); + expect(logger.debug).toBeCalledWith( + 'Successfully disabled schedules for underlying tasks: id1' + ); + expect(logger.error).toBeCalledTimes(1); + expect(logger.error).toBeCalledWith('Failure to disable schedules for underlying tasks: id2'); + }); + + test('should call task manager bulkDeleteIfExist', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [ + { + ...successfulSavedObject1, + attributes: { + scheduledTaskId: 'taskId1', + }, + } as SavedObject, + { + ...successfulSavedObject2, + attributes: { + scheduledTaskId: 'taskId2', + }, + } as SavedObject, + ], + }); + + taskManager.bulkRemoveIfExist.mockResolvedValue({ + statuses: [ + { id: 'id1', type: 'alert', success: true }, + { id: 'id2', type: 'alert', success: false }, + ], + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkRemoveIfExist).toHaveBeenCalledTimes(1); + expect(taskManager.bulkRemoveIfExist).toHaveBeenCalledWith(['taskId1', 'taskId2']); + + expect(logger.debug).toBeCalledTimes(1); + expect(logger.debug).toBeCalledWith( + 'Successfully deleted schedules for underlying tasks: id1' + ); + expect(logger.error).toBeCalledTimes(1); + expect(logger.error).toBeCalledWith('Failure to delete schedules for underlying tasks: id2'); + }); + + test('should disable one task if one rule was successfully disabled and one has 500 error', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1, savedObjectWith500Error], + }); + + taskManager.bulkDisable.mockResolvedValue({ + tasks: [{ id: 'id1' }], + errors: [], + } as unknown as BulkUpdateTaskResult); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkDisable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkDisable).toHaveBeenCalledWith(['id1']); + + expect(logger.debug).toBeCalledTimes(1); + expect(logger.debug).toBeCalledWith( + 'Successfully disabled schedules for underlying tasks: id1' + ); + expect(logger.error).toBeCalledTimes(0); + }); + + test('should disable one task if one rule was successfully disabled and one was disabled from beginning', async () => { + mockCreatePointInTimeFinderAsInternalUser({ + saved_objects: [ + enabledRule1, + { + ...enabledRule2, + attributes: { ...enabledRule2.attributes, enabled: false }, + }, + ], + }); + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1], + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkDisable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkDisable).toHaveBeenCalledWith(['id1']); + }); + + test('should not throw an error if taskManager.bulkDisable throw an error', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + taskManager.bulkDisable.mockImplementation(() => { + throw new Error('Something happend during bulkDisable'); + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(logger.error).toBeCalledTimes(1); + expect(logger.error).toHaveBeenCalledWith( + 'Failure to disable schedules for underlying tasks: id1, id2. TaskManager bulkDisable failed with Error: Something happend during bulkDisable' + ); + }); + + test('should not throw an error if taskManager.bulkRemoveIfExist throw an error', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [ + { + ...successfulSavedObject1, + attributes: { + scheduledTaskId: 'taskId1', + }, + } as SavedObject, + ], + }); + + taskManager.bulkRemoveIfExist.mockImplementation(() => { + throw new Error('Something happend during bulkRemoveIfExist'); + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(logger.error).toBeCalledTimes(1); + expect(logger.error).toHaveBeenCalledWith( + 'Failure to delete schedules for underlying tasks: taskId1. TaskManager bulkRemoveIfExist failed with Error: Something happend during bulkRemoveIfExist' + ); + }); + }); + + describe('auditLogger', () => { + jest.spyOn(auditLogger, 'log').mockImplementation(); + + test('logs audit event when disabling rules', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1], + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(auditLogger.log.mock.calls[0][0]?.event?.action).toEqual('rule_disable'); + expect(auditLogger.log.mock.calls[0][0]?.event?.outcome).toEqual('unknown'); + expect(auditLogger.log.mock.calls[0][0]?.kibana).toEqual({ + saved_object: { id: 'id1', type: 'alert' }, + }); + expect(auditLogger.log.mock.calls[1][0]?.event?.action).toEqual('rule_disable'); + expect(auditLogger.log.mock.calls[1][0]?.event?.outcome).toEqual('unknown'); + expect(auditLogger.log.mock.calls[1][0]?.kibana).toEqual({ + saved_object: { id: 'id2', type: 'alert' }, + }); + }); + + test('logs audit event when authentication failed', async () => { + authorization.ensureAuthorized.mockImplementation(() => { + throw new Error('Unauthorized'); + }); + + await expect(rulesClient.bulkDisableRules({ filter: 'fake_filter' })).rejects.toThrowError( + 'Unauthorized' + ); + + expect(auditLogger.log.mock.calls[0][0]?.event?.action).toEqual('rule_disable'); + expect(auditLogger.log.mock.calls[0][0]?.event?.outcome).toEqual('failure'); + }); + + test('logs audit event when getting an authorization filter failed', async () => { + authorization.getFindAuthorizationFilter.mockImplementation(() => { + throw new Error('Error'); + }); + + await expect(rulesClient.bulkDisableRules({ filter: 'fake_filter' })).rejects.toThrowError( + 'Error' + ); + + expect(auditLogger.log.mock.calls[0][0]?.event?.action).toEqual('rule_disable'); + expect(auditLogger.log.mock.calls[0][0]?.event?.outcome).toEqual('failure'); + }); + }); + + describe('recoverRuleAlerts', () => { + beforeEach(() => { + taskInstanceToAlertTaskInstance.mockImplementation(() => ({ + state: { + alertInstances: { + '1': { + meta: { + lastScheduledActions: { + group: 'default', + date: new Date().toISOString(), + }, + }, + state: { bar: false }, + }, + }, + }, + })); + }); + test('should call logEvent', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + }); + + test('should call logger.warn', async () => { + eventLogger.logEvent.mockImplementation(() => { + throw new Error('UPS'); + }); + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + + await rulesClient.bulkDisableRules({ filter: 'fake_filter' }); + + expect(logger.warn).toHaveBeenCalledTimes(2); + expect(logger.warn).toHaveBeenLastCalledWith( + "rulesClient.disable('id2') - Could not write recovery events - UPS" + ); + }); + }); +}); diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts index 8aa30c0d41a30..2d2901c6a06c2 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts @@ -8,7 +8,6 @@ import { RulesClient, ConstructorOptions } from '../rules_client'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; import { alertingAuthorizationMock } from '../../authorization/alerting_authorization.mock'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; @@ -19,6 +18,18 @@ import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { getBeforeSetup, setGlobalDate } from './lib'; import { loggerMock } from '@kbn/logging-mocks'; import { BulkUpdateTaskResult } from '@kbn/task-manager-plugin/server/task_scheduling'; +import { + disabledRule1, + disabledRule2, + enabledRule2, + savedObjectWith409Error, + savedObjectWith500Error, + successfulSavedObject1, + successfulSavedObject2, + successfulSavedObjects, + updatedRule1, + updatedRule2, +} from './test_helpers'; jest.mock('../../invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation', () => ({ bulkMarkApiKeysForInvalidation: jest.fn(), @@ -56,6 +67,13 @@ const rulesClientParams: jest.Mocked<ConstructorOptions> = { beforeEach(() => { getBeforeSetup(rulesClientParams, taskManager, ruleTypeRegistry); + taskManager.bulkEnable.mockImplementation( + async () => + ({ + tasks: [], + errors: [], + } as unknown as BulkUpdateTaskResult) + ); (auditLogger.log as jest.Mock).mockClear(); }); @@ -63,50 +81,9 @@ setGlobalDate(); describe('bulkEnableRules', () => { let rulesClient: RulesClient; - const defaultRule = { - id: 'id1', - type: 'alert', - attributes: { - name: 'fakeName', - consumer: 'fakeConsumer', - alertTypeId: 'fakeType', - schedule: { interval: '5m' }, - actions: [ - { - group: 'default', - actionTypeId: '1', - actionRef: '1', - params: { - foo: true, - }, - }, - ], - }, - references: [], - version: '1', - }; - const existingDecryptedRule1 = { - ...defaultRule, - attributes: { - ...defaultRule.attributes, - enabled: false, - scheduledTaskId: 'taskId1', - apiKey: Buffer.from('123:abc').toString('base64'), - }, - }; - const existingDecryptedRule2 = { - ...defaultRule, - id: 'id2', - attributes: { - ...defaultRule.attributes, - enabled: false, - scheduledTaskId: 'taskId2', - apiKey: Buffer.from('321:abc').toString('base64'), - }, - }; const mockCreatePointInTimeFinderAsInternalUser = ( - response = { saved_objects: [existingDecryptedRule1, existingDecryptedRule2] } + response = { saved_objects: [disabledRule1, disabledRule2] } ) => { encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest .fn() @@ -149,22 +126,7 @@ describe('bulkEnableRules', () => { test('should enable two rule', async () => { unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: successfulSavedObjects, }); const result = await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); @@ -188,30 +150,9 @@ describe('bulkEnableRules', () => { { overwrite: true } ); - expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); - expect(taskManager.bulkEnable).toHaveBeenCalledWith(['taskId1', 'taskId2']); expect(result).toStrictEqual({ errors: [], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id2', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1, updatedRule2], total: 2, taskIdsFailedToBeEnabled: [], }); @@ -219,24 +160,7 @@ describe('bulkEnableRules', () => { test('should try to enable rules, one successful and one with 500 error', async () => { unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - error: { - error: '', - message: 'UPS', - statusCode: 500, - }, - version: '1', - } as SavedObject, - ], + saved_objects: [successfulSavedObject1, savedObjectWith500Error], }); const result = await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); @@ -254,21 +178,9 @@ describe('bulkEnableRules', () => { { overwrite: true } ); - expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); - expect(taskManager.bulkEnable).toHaveBeenCalledWith(['taskId1']); expect(result).toStrictEqual({ errors: [{ message: 'UPS', rule: { id: 'id2', name: 'fakeName' }, status: 500 }], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1], total: 2, taskIdsFailedToBeEnabled: [], }); @@ -277,50 +189,13 @@ describe('bulkEnableRules', () => { test('should try to enable rules, one successful and one with 409 error, which will not be deleted with retry', async () => { unsecuredSavedObjectsClient.bulkCreate .mockResolvedValueOnce({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - error: { - error: '', - message: 'UPS', - statusCode: 409, - }, - version: '1', - } as SavedObject, - ], + saved_objects: [successfulSavedObject1, savedObjectWith409Error], }) .mockResolvedValueOnce({ - saved_objects: [ - { - id: 'id2', - error: { - error: '', - message: 'UPS', - statusCode: 409, - }, - version: '1', - } as SavedObject, - ], + saved_objects: [savedObjectWith409Error], }) .mockResolvedValueOnce({ - saved_objects: [ - { - id: 'id2', - error: { - error: '', - message: 'UPS', - statusCode: 409, - }, - version: '1', - } as SavedObject, - ], + saved_objects: [savedObjectWith409Error], }); encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest @@ -328,40 +203,28 @@ describe('bulkEnableRules', () => { .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule1, existingDecryptedRule2] }; + yield { saved_objects: [disabledRule1, disabledRule2] }; }, }) .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule2] }; + yield { saved_objects: [disabledRule2] }; }, }) .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule2] }; + yield { saved_objects: [disabledRule2] }; }, }); const result = await rulesClient.bulkEnableRules({ ids: ['id1', 'id2'] }); expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(3); - expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); - expect(taskManager.bulkEnable).toHaveBeenCalledWith(['taskId1']); expect(result).toStrictEqual({ errors: [{ message: 'UPS', rule: { id: 'id2', name: 'fakeName' }, status: 409 }], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1], total: 2, taskIdsFailedToBeEnabled: [], }); @@ -370,35 +233,10 @@ describe('bulkEnableRules', () => { test('should try to enable rules, one successful and one with 409 error, which successfully will be deleted with retry', async () => { unsecuredSavedObjectsClient.bulkCreate .mockResolvedValueOnce({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - error: { - error: '', - message: 'UPS', - statusCode: 409, - }, - version: '1', - } as SavedObject, - ], + saved_objects: [successfulSavedObject1, savedObjectWith409Error], }) .mockResolvedValueOnce({ - saved_objects: [ - { - id: 'id2', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: [successfulSavedObject2], }); encryptedSavedObjects.createPointInTimeFinderDecryptedAsInternalUser = jest @@ -406,49 +244,28 @@ describe('bulkEnableRules', () => { .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule1, existingDecryptedRule2] }; + yield { saved_objects: [disabledRule1, disabledRule2] }; }, }) .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule2] }; + yield { saved_objects: [disabledRule2] }; }, }) .mockResolvedValueOnce({ close: jest.fn(), find: function* asyncGenerator() { - yield { saved_objects: [existingDecryptedRule2] }; + yield { saved_objects: [disabledRule2] }; }, }); const result = await rulesClient.bulkEnableRules({ ids: ['id1', 'id2'] }); expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledTimes(2); - expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); - expect(taskManager.bulkEnable).toHaveBeenCalledWith(['taskId1', 'taskId2']); expect(result).toStrictEqual({ errors: [], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id2', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1, updatedRule2], total: 2, taskIdsFailedToBeEnabled: [], }); @@ -517,33 +334,12 @@ describe('bulkEnableRules', () => { }); }); - test('should if rule is already enabled', async () => { + test('should skip rule if it is already enabled', async () => { mockCreatePointInTimeFinderAsInternalUser({ - saved_objects: [ - existingDecryptedRule1, - { - ...existingDecryptedRule2, - attributes: { ...existingDecryptedRule2.attributes, enabled: true }, - }, - ], + saved_objects: [disabledRule1, enabledRule2], }); unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: [successfulSavedObject1], }); const result = await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); @@ -561,30 +357,9 @@ describe('bulkEnableRules', () => { { overwrite: true } ); - expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); - expect(taskManager.bulkEnable).toHaveBeenCalledWith(['taskId1']); expect(result).toStrictEqual({ errors: [], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id2', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1], total: 2, taskIdsFailedToBeEnabled: [], }); @@ -593,31 +368,16 @@ describe('bulkEnableRules', () => { describe('taskManager', () => { test('should return task id if deleting task failed', async () => { unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: successfulSavedObjects, }); taskManager.bulkEnable.mockImplementation( async () => ({ - tasks: [{ id: 'taskId1' }, { id: 'taskId2' }], + tasks: [{ id: 'id1' }], errors: [ { task: { - id: 'taskId2', + id: 'id2', }, error: { error: '', @@ -633,53 +393,22 @@ describe('bulkEnableRules', () => { expect(logger.debug).toBeCalledTimes(1); expect(logger.debug).toBeCalledWith( - 'Successfully enabled schedules for underlying tasks: taskId1' + 'Successfully enabled schedules for underlying tasks: id1' ); + expect(logger.error).toBeCalledTimes(1); + expect(logger.error).toBeCalledWith('Failure to enable schedules for underlying tasks: id2'); + expect(result).toStrictEqual({ errors: [], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id2', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], + rules: [updatedRule1, updatedRule2], total: 2, - taskIdsFailedToBeEnabled: ['taskId2'], + taskIdsFailedToBeEnabled: ['id2'], }); }); test('should not throw an error if taskManager throw an error', async () => { unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - { - id: 'id2', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: successfulSavedObjects, }); taskManager.bulkEnable.mockImplementation(() => { throw new Error('UPS'); @@ -689,34 +418,66 @@ describe('bulkEnableRules', () => { expect(logger.error).toBeCalledTimes(1); expect(logger.error).toBeCalledWith( - 'Failure to enable schedules for underlying tasks: taskId1, taskId2. TaskManager bulkEnable failed with Error: UPS' + 'Failure to enable schedules for underlying tasks: id1, id2. TaskManager bulkEnable failed with Error: UPS' ); + expect(result).toStrictEqual({ errors: [], - rules: [ - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id1', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - { - actions: [], - alertTypeId: '.index-threshold', - id: 'id2', - notifyWhen: undefined, - params: undefined, - schedule: undefined, - snoozeSchedule: [], - }, - ], - taskIdsFailedToBeEnabled: ['taskId1', 'taskId2'], + rules: [updatedRule1, updatedRule2], + taskIdsFailedToBeEnabled: ['id1', 'id2'], total: 2, }); }); + + test('should call task manager bulkEnable for two tasks', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: successfulSavedObjects, + }); + + await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkEnable).toHaveBeenCalledWith(['id1', 'id2']); + }); + + test('should should call task manager bulkEnable only for one task, if one rule have an error', async () => { + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1, savedObjectWith500Error], + }); + + await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkEnable).toHaveBeenCalledWith(['id1']); + }); + + test('should skip task if rule is already enabled', async () => { + mockCreatePointInTimeFinderAsInternalUser({ + saved_objects: [disabledRule1, enabledRule2], + }); + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [successfulSavedObject1], + }); + + taskManager.bulkEnable.mockImplementation( + async () => + ({ + tasks: [{ id: 'id1' }], + errors: [], + } as unknown as BulkUpdateTaskResult) + ); + + await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); + + expect(taskManager.bulkEnable).toHaveBeenCalledTimes(1); + expect(taskManager.bulkEnable).toHaveBeenCalledWith(['id1']); + + expect(logger.debug).toBeCalledTimes(1); + expect(logger.debug).toBeCalledWith( + 'Successfully enabled schedules for underlying tasks: id1' + ); + expect(logger.error).toBeCalledTimes(0); + }); }); describe('auditLogger', () => { @@ -724,15 +485,7 @@ describe('bulkEnableRules', () => { test('logs audit event when enabling rules', async () => { unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ - saved_objects: [ - { - id: 'id1', - version: '1', - attributes: { - alertTypeId: '.index-threshold', - }, - } as SavedObject, - ], + saved_objects: [successfulSavedObject1], }); await rulesClient.bulkEnableRules({ filter: 'fake_filter' }); diff --git a/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts b/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts new file mode 100644 index 0000000000000..10c93aa1e88b4 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts @@ -0,0 +1,142 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObject } from '@kbn/core-saved-objects-common'; + +export const successfulSavedObject1 = { + id: 'id1', + version: '1', + attributes: { + scheduledTaskId: 'id1', + }, +} as SavedObject; + +export const successfulSavedObject2 = { + id: 'id2', + version: '1', + attributes: { + scheduledTaskId: 'id2', + }, +} as SavedObject; + +export const successfulSavedObjects = [successfulSavedObject1, successfulSavedObject2]; + +export const savedObjectWith500Error = { + id: 'id2', + error: { + error: '', + message: 'UPS', + statusCode: 500, + }, + version: '1', +} as SavedObject; + +export const savedObjectWith409Error = { + id: 'id2', + error: { + error: '', + message: 'UPS', + statusCode: 409, + }, + version: '1', +} as SavedObject; + +export const defaultRule = { + id: 'id1', + type: 'alert', + attributes: { + name: 'fakeName', + consumer: 'fakeConsumer', + alertTypeId: 'fakeType', + schedule: { interval: '5m' }, + actions: [ + { + group: 'default', + actionTypeId: '1', + actionRef: '1', + params: { + foo: true, + }, + }, + ], + }, + references: [], + version: '1', +}; + +export const enabledRule1 = { + ...defaultRule, + attributes: { + ...defaultRule.attributes, + enabled: true, + scheduledTaskId: 'id1', + apiKey: Buffer.from('123:abc').toString('base64'), + }, +}; + +export const enabledRule2 = { + ...defaultRule, + id: 'id2', + attributes: { + ...defaultRule.attributes, + enabled: true, + scheduledTaskId: 'id2', + apiKey: Buffer.from('123:abc').toString('base64'), + }, +}; + +export const disabledRule1 = { + ...defaultRule, + attributes: { + ...defaultRule.attributes, + enabled: false, + scheduledTaskId: 'id2', + apiKey: Buffer.from('123:abc').toString('base64'), + }, +}; + +export const disabledRule2 = { + ...defaultRule, + id: 'id2', + attributes: { + ...defaultRule.attributes, + enabled: false, + scheduledTaskId: 'id2', + apiKey: Buffer.from('321:abc').toString('base64'), + }, +}; + +export const rule2 = { + ...defaultRule, + id: 'id2', + attributes: { + ...defaultRule.attributes, + enabled: true, + scheduledTaskId: 'id2', + apiKey: Buffer.from('321:abc').toString('base64'), + }, +}; + +export const updatedRule1 = { + actions: [], + id: 'id1', + notifyWhen: undefined, + params: undefined, + schedule: undefined, + snoozeSchedule: [], + scheduledTaskId: 'id1', +}; + +export const updatedRule2 = { + actions: [], + id: 'id2', + notifyWhen: undefined, + params: undefined, + schedule: undefined, + snoozeSchedule: [], + scheduledTaskId: 'id2', +}; diff --git a/x-pack/plugins/apm/common/custom_link/custom_link_filter_options.ts b/x-pack/plugins/apm/common/custom_link/custom_link_filter_options.ts index b22eda64e06f6..dbf7adf182e7e 100644 --- a/x-pack/plugins/apm/common/custom_link/custom_link_filter_options.ts +++ b/x-pack/plugins/apm/common/custom_link/custom_link_filter_options.ts @@ -10,7 +10,7 @@ import { SERVICE_ENVIRONMENT, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../elasticsearch_fieldnames'; +} from '../es_fields/apm'; export const FILTER_OPTIONS = [ SERVICE_NAME, diff --git a/x-pack/plugins/apm/common/custom_link/custom_link_types.d.ts b/x-pack/plugins/apm/common/custom_link/custom_link_types.d.ts index f55af6aa558df..87c9df89ff176 100644 --- a/x-pack/plugins/apm/common/custom_link/custom_link_types.d.ts +++ b/x-pack/plugins/apm/common/custom_link/custom_link_types.d.ts @@ -10,7 +10,7 @@ import { SERVICE_ENVIRONMENT, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../elasticsearch_fieldnames'; +} from '../es_fields/apm'; import { FILTER_OPTIONS } from './custom_link_filter_options'; export interface CustomLinkES { diff --git a/x-pack/plugins/apm/common/dependencies.ts b/x-pack/plugins/apm/common/dependencies.ts index de7dc69639b6d..6228d4b9d279d 100644 --- a/x-pack/plugins/apm/common/dependencies.ts +++ b/x-pack/plugins/apm/common/dependencies.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { PROCESSOR_EVENT, SPAN_DESTINATION_SERVICE_RESOURCE, -} from './elasticsearch_fieldnames'; +} from './es_fields/apm'; import { environmentQuery } from './utils/environment_query'; export const kueryBarPlaceholder = i18n.translate( diff --git a/x-pack/plugins/apm/common/environment_filter_values.ts b/x-pack/plugins/apm/common/environment_filter_values.ts index df53b08fcf56f..e4779ee9547f0 100644 --- a/x-pack/plugins/apm/common/environment_filter_values.ts +++ b/x-pack/plugins/apm/common/environment_filter_values.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { SERVICE_ENVIRONMENT } from './elasticsearch_fieldnames'; +import { SERVICE_ENVIRONMENT } from './es_fields/apm'; import { Environment } from './environment_rt'; const ENVIRONMENT_ALL_VALUE = 'ENVIRONMENT_ALL' as const; diff --git a/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap b/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap similarity index 97% rename from x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap rename to x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap index ab7a6d4139d4a..efe6189109b49 100644 --- a/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap +++ b/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap @@ -251,18 +251,12 @@ exports[`Error TRANSACTION_SUCCESS_COUNT 1`] = `undefined`; exports[`Error TRANSACTION_TYPE 1`] = `"request"`; -exports[`Error TRANSACTION_URL 1`] = `undefined`; - exports[`Error URL_FULL 1`] = `undefined`; -exports[`Error USER_AGENT_DEVICE 1`] = `undefined`; - exports[`Error USER_AGENT_NAME 1`] = `undefined`; exports[`Error USER_AGENT_ORIGINAL 1`] = `undefined`; -exports[`Error USER_AGENT_OS 1`] = `undefined`; - exports[`Error USER_ID 1`] = `undefined`; exports[`Span AGENT 1`] = ` @@ -508,18 +502,12 @@ exports[`Span TRANSACTION_SUCCESS_COUNT 1`] = `undefined`; exports[`Span TRANSACTION_TYPE 1`] = `undefined`; -exports[`Span TRANSACTION_URL 1`] = `undefined`; - exports[`Span URL_FULL 1`] = `undefined`; -exports[`Span USER_AGENT_DEVICE 1`] = `undefined`; - exports[`Span USER_AGENT_NAME 1`] = `undefined`; exports[`Span USER_AGENT_ORIGINAL 1`] = `undefined`; -exports[`Span USER_AGENT_OS 1`] = `undefined`; - exports[`Span USER_ID 1`] = `undefined`; exports[`Transaction AGENT 1`] = ` @@ -783,16 +771,10 @@ exports[`Transaction TRANSACTION_SUCCESS_COUNT 1`] = `undefined`; exports[`Transaction TRANSACTION_TYPE 1`] = `"transaction type"`; -exports[`Transaction TRANSACTION_URL 1`] = `"http://www.elastic.co"`; - exports[`Transaction URL_FULL 1`] = `"http://www.elastic.co"`; -exports[`Transaction USER_AGENT_DEVICE 1`] = `undefined`; - exports[`Transaction USER_AGENT_NAME 1`] = `"Other"`; exports[`Transaction USER_AGENT_ORIGINAL 1`] = `"test original"`; -exports[`Transaction USER_AGENT_OS 1`] = `undefined`; - exports[`Transaction USER_ID 1`] = `"1337"`; diff --git a/x-pack/plugins/apm/common/elasticsearch_fieldnames.ts b/x-pack/plugins/apm/common/es_fields/apm.ts similarity index 91% rename from x-pack/plugins/apm/common/elasticsearch_fieldnames.ts rename to x-pack/plugins/apm/common/es_fields/apm.ts index 1734742c31d86..8d1bf4dd9d44e 100644 --- a/x-pack/plugins/apm/common/elasticsearch_fieldnames.ts +++ b/x-pack/plugins/apm/common/es_fields/apm.ts @@ -5,6 +5,12 @@ * 2.0. */ +export const AGENT = 'agent'; +export const AGENT_NAME = 'agent.name'; +export const AGENT_VERSION = 'agent.version'; + +export const DESTINATION_ADDRESS = 'destination.address'; + export const CLOUD = 'cloud'; export const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'; export const CLOUD_PROVIDER = 'cloud.provider'; @@ -27,10 +33,6 @@ export const SERVICE_RUNTIME_VERSION = 'service.runtime.version'; export const SERVICE_NODE_NAME = 'service.node.name'; export const SERVICE_VERSION = 'service.version'; -export const AGENT = 'agent'; -export const AGENT_NAME = 'agent.name'; -export const AGENT_VERSION = 'agent.version'; - export const URL_FULL = 'url.full'; export const HTTP_REQUEST_METHOD = 'http.request.method'; export const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code'; @@ -38,8 +40,6 @@ export const USER_ID = 'user.id'; export const USER_AGENT_ORIGINAL = 'user_agent.original'; export const USER_AGENT_NAME = 'user_agent.name'; -export const DESTINATION_ADDRESS = 'destination.address'; - export const OBSERVER_HOSTNAME = 'observer.hostname'; export const OBSERVER_LISTENING = 'observer.listening'; export const PROCESSOR_EVENT = 'processor.event'; @@ -125,29 +125,17 @@ export const HOST_NAME = 'host.name'; export const HOST_OS_PLATFORM = 'host.os.platform'; export const HOST_ARCHITECTURE = 'host.architecture'; export const HOST_OS_VERSION = 'host.os.version'; + export const CONTAINER_ID = 'container.id'; export const CONTAINER = 'container'; export const CONTAINER_IMAGE = 'container.image.name'; -// Kubernetes export const KUBERNETES = 'kubernetes'; -export const KUBERNETES_CONTAINER_NAME = 'kubernetes.container.name'; -export const KUBERNETES_DEPLOYMENT = 'kubernetes.deployment'; -export const KUBERNETES_DEPLOYMENT_NAME = 'kubernetes.deployment.name'; -export const KUBERNETES_NAMESPACE_NAME = 'kubernetes.namespace.name'; -export const KUBERNETES_NAMESPACE = 'kubernetes.namespace'; export const KUBERNETES_POD_NAME = 'kubernetes.pod.name'; export const KUBERNETES_POD_UID = 'kubernetes.pod.uid'; -export const KUBERNETES_REPLICASET = 'kubernetes.replicaset'; -export const KUBERNETES_REPLICASET_NAME = 'kubernetes.replicaset.name'; export const CLIENT_GEO_COUNTRY_ISO_CODE = 'client.geo.country_iso_code'; -// RUM Labels -export const TRANSACTION_URL = 'url.full'; -export const USER_AGENT_DEVICE = 'user_agent.device.name'; -export const USER_AGENT_OS = 'user_agent.os.name'; - export const FAAS_ID = 'faas.id'; export const FAAS_NAME = 'faas.name'; export const FAAS_COLDSTART = 'faas.coldstart'; diff --git a/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts b/x-pack/plugins/apm/common/es_fields/es_fields.test.ts similarity index 90% rename from x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts rename to x-pack/plugins/apm/common/es_fields/es_fields.test.ts index debf75f79ec7e..416a7f6fc39e8 100644 --- a/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts +++ b/x-pack/plugins/apm/common/es_fields/es_fields.test.ts @@ -6,11 +6,17 @@ */ import { get } from 'lodash'; -import { AllowUnknownProperties } from '../typings/common'; -import { APMError } from '../typings/es_schemas/ui/apm_error'; -import { Span } from '../typings/es_schemas/ui/span'; -import { Transaction } from '../typings/es_schemas/ui/transaction'; -import * as fieldnames from './elasticsearch_fieldnames'; +import { AllowUnknownProperties } from '../../typings/common'; +import { APMError } from '../../typings/es_schemas/ui/apm_error'; +import { Span } from '../../typings/es_schemas/ui/span'; +import { Transaction } from '../../typings/es_schemas/ui/transaction'; +import * as apmFieldnames from './apm'; +import * as infraMetricsFieldnames from './infra_metrics'; + +const fieldnames = { + ...apmFieldnames, + ...infraMetricsFieldnames, +}; describe('Transaction', () => { const transaction: AllowUnknownProperties<Transaction> = { diff --git a/x-pack/plugins/apm/common/es_fields/infra_metrics.ts b/x-pack/plugins/apm/common/es_fields/infra_metrics.ts new file mode 100644 index 0000000000000..fbf09e1887dfb --- /dev/null +++ b/x-pack/plugins/apm/common/es_fields/infra_metrics.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// Kubernetes +export const KUBERNETES_CONTAINER_NAME = 'kubernetes.container.name'; +export const KUBERNETES_DEPLOYMENT = 'kubernetes.deployment'; +export const KUBERNETES_DEPLOYMENT_NAME = 'kubernetes.deployment.name'; +export const KUBERNETES_NAMESPACE_NAME = 'kubernetes.namespace.name'; +export const KUBERNETES_NAMESPACE = 'kubernetes.namespace'; +export const KUBERNETES_REPLICASET = 'kubernetes.replicaset'; +export const KUBERNETES_REPLICASET_NAME = 'kubernetes.replicaset.name'; diff --git a/x-pack/plugins/apm/common/service_groups.test.ts b/x-pack/plugins/apm/common/service_groups.test.ts index 856eec4ef2e3f..28c9120338ad5 100644 --- a/x-pack/plugins/apm/common/service_groups.test.ts +++ b/x-pack/plugins/apm/common/service_groups.test.ts @@ -14,7 +14,7 @@ import { TRANSACTION_TYPE, TRANSACTION_DURATION, SERVICE_FRAMEWORK_VERSION, -} from './elasticsearch_fieldnames'; +} from './es_fields/apm'; describe('service_groups common utils', () => { describe('isSupportedField', () => { diff --git a/x-pack/plugins/apm/common/service_groups.ts b/x-pack/plugins/apm/common/service_groups.ts index 4b2ba1288ecae..cf58c0e9a4b8d 100644 --- a/x-pack/plugins/apm/common/service_groups.ts +++ b/x-pack/plugins/apm/common/service_groups.ts @@ -13,7 +13,7 @@ import { SERVICE_NAME, SERVICE_ENVIRONMENT, SERVICE_LANGUAGE_NAME, -} from './elasticsearch_fieldnames'; +} from './es_fields/apm'; const LABELS = 'labels'; // implies labels.* wildcard diff --git a/x-pack/plugins/apm/common/service_map.ts b/x-pack/plugins/apm/common/service_map.ts index d10785d614cd3..fb2fa7fae6540 100644 --- a/x-pack/plugins/apm/common/service_map.ts +++ b/x-pack/plugins/apm/common/service_map.ts @@ -23,7 +23,7 @@ import { ServiceAnomalyStats } from './anomaly_detection'; // SPAN_DESTINATION_SERVICE_RESOURCE, // SPAN_SUBTYPE, // SPAN_TYPE, -// } from './elasticsearch_fieldnames'; +// } from './es_fields/apm'; export interface ServiceConnectionNode extends cytoscape.NodeDataDefinition { 'service.name': string; diff --git a/x-pack/plugins/apm/common/utils/environment_query.test.ts b/x-pack/plugins/apm/common/utils/environment_query.test.ts index fbd1b6b9a7a2d..f039b3f281fac 100644 --- a/x-pack/plugins/apm/common/utils/environment_query.test.ts +++ b/x-pack/plugins/apm/common/utils/environment_query.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SERVICE_ENVIRONMENT } from '../elasticsearch_fieldnames'; +import { SERVICE_ENVIRONMENT } from '../es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED } from '../environment_filter_values'; import { environmentQuery } from './environment_query'; diff --git a/x-pack/plugins/apm/common/utils/environment_query.ts b/x-pack/plugins/apm/common/utils/environment_query.ts index 42744778b861b..4b9edc8c51be5 100644 --- a/x-pack/plugins/apm/common/utils/environment_query.ts +++ b/x-pack/plugins/apm/common/utils/environment_query.ts @@ -6,10 +6,7 @@ */ import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { - SERVICE_ENVIRONMENT, - SERVICE_NODE_NAME, -} from '../elasticsearch_fieldnames'; +import { SERVICE_ENVIRONMENT, SERVICE_NODE_NAME } from '../es_fields/apm'; import { ENVIRONMENT_ALL, ENVIRONMENT_NOT_DEFINED, diff --git a/x-pack/plugins/apm/public/components/alerting/utils/fields.tsx b/x-pack/plugins/apm/public/components/alerting/utils/fields.tsx index 3f028c2ead002..df6090239dbe7 100644 --- a/x-pack/plugins/apm/public/components/alerting/utils/fields.tsx +++ b/x-pack/plugins/apm/public/components/alerting/utils/fields.tsx @@ -12,7 +12,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { ENVIRONMENT_ALL, getEnvironmentLabel, diff --git a/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx b/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx index 01a5ed8ada073..826f7b809715c 100644 --- a/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/alerts_overview/index.tsx @@ -12,7 +12,7 @@ import { AlertConsumers } from '@kbn/rule-data-utils'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { ApmPluginStartDeps } from '../../../plugin'; import { useApmParams } from '../../../hooks/use_apm_params'; -import { SERVICE_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { AlertsTableStatusFilter, diff --git a/x-pack/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx b/x-pack/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx index 6bc7ae8fecf0f..28518aba7b9b6 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx @@ -36,7 +36,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useFetchParams } from '../use_fetch_params'; diff --git a/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts b/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts index 59c594c04b0c5..e381071a185be 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts +++ b/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts @@ -13,7 +13,7 @@ import type { ResponseErrorBody, } from '@kbn/core-http-browser'; -import { EVENT_OUTCOME } from '../../../../common/elasticsearch_fieldnames'; +import { EVENT_OUTCOME } from '../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../common/event_outcome'; import { DEBOUNCE_INTERVAL, diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx index 21124629a4063..22afb5198a1ca 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx +++ b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx @@ -43,7 +43,7 @@ import { import { ExceptionStacktrace } from './exception_stacktrace'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { ERROR_GROUP_ID } from '../../../../../common/elasticsearch_fieldnames'; +import { ERROR_GROUP_ID } from '../../../../../common/es_fields/apm'; import { TraceSearchType } from '../../../../../common/trace_explorer'; import { TransactionTab } from '../../transaction_details/waterfall_with_summary/transaction_tabs'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; diff --git a/x-pack/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx b/x-pack/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx index e5244981f110b..d9a802e2c78b5 100644 --- a/x-pack/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx +++ b/x-pack/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx @@ -12,7 +12,11 @@ import React from 'react'; import { EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ApmPluginStartDeps } from '../../../../plugin'; - +import { + KUBERNETES_POD_NAME, + HOST_NAME, + CONTAINER_ID, +} from '../../../../../common/es_fields/apm'; type Tab = NonNullable<EuiTabbedContentProps['tabs']>[0] & { id: 'containers' | 'pods' | 'hosts'; hidden?: boolean; @@ -57,7 +61,7 @@ export function useTabs({ should: [ { terms: { - 'host.name': hostNames, + [HOST_NAME]: hostNames, }, }, ], @@ -69,7 +73,7 @@ export function useTabs({ const podsFilter = useMemo( () => ({ bool: { - filter: [{ terms: { 'kubernetes.pod.name': podNames } }], + filter: [{ terms: { [KUBERNETES_POD_NAME]: podNames } }], }, }), [podNames] @@ -77,7 +81,7 @@ export function useTabs({ const containersFilter = useMemo( () => ({ bool: { - filter: [{ terms: { 'container.id': containerIds } }], + filter: [{ terms: { [CONTAINER_ID]: containerIds } }], }, }), [containerIds] diff --git a/x-pack/plugins/apm/public/components/app/service_logs/index.tsx b/x-pack/plugins/apm/public/components/app/service_logs/index.tsx index 4e48dadb2b921..6616eee3d85d1 100644 --- a/x-pack/plugins/apm/public/components/app/service_logs/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_logs/index.tsx @@ -16,7 +16,7 @@ import { CONTAINER_ID, HOST_NAME, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; diff --git a/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts b/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts index 524006967cbf5..dbd27134f4eb7 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts +++ b/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts @@ -12,7 +12,7 @@ import { ServiceAnomalyStats } from '../../../../common/anomaly_detection'; import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { getServiceHealthStatusColor, ServiceHealthStatus, diff --git a/x-pack/plugins/apm/public/components/app/service_map/icons.ts b/x-pack/plugins/apm/public/components/app/service_map/icons.ts index 3f6f7cb893024..187a84cb6cca6 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/icons.ts +++ b/x-pack/plugins/apm/public/components/app/service_map/icons.ts @@ -10,7 +10,7 @@ import { AGENT_NAME, SPAN_SUBTYPE, SPAN_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { getAgentIcon } from '../../shared/agent_icon/get_agent_icon'; import { getSpanIcon } from '../../shared/span_icon/get_span_icon'; diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx index 8f5b7e9acce39..36bc1ba74fd56 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx @@ -19,7 +19,7 @@ import { TransactionTab } from '../../transaction_details/waterfall_with_summary import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; export function EdgeContents({ elementData }: ContentsProps) { const edgeData = elementData as EdgeDataDefinition; diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx index 19a914a7a3c5a..726280024efcf 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx @@ -19,7 +19,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_TYPE, SPAN_SUBTYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { ExternalConnectionNode } from '../../../../../common/service_map'; const ExternalResourcesList = euiStyled.section` diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx index 64d750a70b805..386b550b7f8b0 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx @@ -22,10 +22,7 @@ import React, { useRef, useState, } from 'react'; -import { - SERVICE_NAME, - SPAN_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, SPAN_TYPE } from '../../../../../common/es_fields/apm'; import { Environment } from '../../../../../common/environment_rt'; import { useTheme } from '../../../../hooks/use_theme'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx index 3bef0615078d7..b4e70568d026f 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx @@ -14,10 +14,7 @@ import React from 'react'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { NodeDataDefinition } from 'cytoscape'; import type { ContentsProps } from '.'; -import { - SPAN_SUBTYPE, - SPAN_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +import { SPAN_SUBTYPE, SPAN_TYPE } from '../../../../../common/es_fields/apm'; const ItemRow = euiStyled.div` line-height: 2; diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx index c74de9051224c..6d92c8694c6e3 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/filters/index.tsx @@ -4,11 +4,17 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiSelect } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexGroupProps, + EuiFlexItem, + EuiSelect, +} from '@elastic/eui'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { Environment } from '../../../../../../common/environment_rt'; import { useApmServiceContext } from '../../../../../context/apm_service/use_apm_service_context'; +import { useBreakpoints } from '../../../../../hooks/use_breakpoints'; import { useFetcher } from '../../../../../hooks/use_fetcher'; import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { push } from '../../../../shared/links/url_helpers'; @@ -39,6 +45,7 @@ export function MobileFilters({ filters, }: Props) { const history = useHistory(); + const { isSmall, isLarge } = useBreakpoints(); const { serviceName } = useApmServiceContext(); const { data = { mobileFilters: [] } } = useFetcher( (callApmApi) => { @@ -68,16 +75,26 @@ export function MobileFilters({ }); } + const groupDirection: EuiFlexGroupProps['direction'] = isLarge + ? 'column' + : 'row'; + return ( - <EuiFlexGroup justifyContent="flexEnd"> + <EuiFlexGroup + justifyContent="flexEnd" + gutterSize="s" + responsive={false} + direction={groupDirection} + > {data.mobileFilters.map((filter) => { return ( <EuiFlexItem grow={false} key={filter.key} - style={{ minWidth: '225px' }} + style={isLarge ? {} : { width: '225px' }} > <EuiSelect + fullWidth={isSmall} prepend={filter.label} options={toSelectOptions(filter.options)} value={filters[filter.key]} diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts index 49bf9fdbe2656..31150b73fcf51 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/latency_map/get_layer_list.ts @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n'; import { CLIENT_GEO_COUNTRY_ISO_CODE, TRANSACTION_DURATION, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { APM_STATIC_DATA_VIEW_ID } from '../../../../../../common/data_view_constants'; interface VectorLayerDescriptor extends BaseVectorLayerDescriptor { diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx index 5d1481a010d91..101ae1592e5f1 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/index.tsx @@ -17,7 +17,7 @@ import { HOST_OS_VERSION, NETWORK_CONNECTION_TYPE, SERVICE_VERSION, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; export type MostUsedMetricTypes = | typeof DEVICE_MODEL_NAME diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx index fa4a5bf3657f6..49e0cefc6ddf9 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/most_used_chart/most_used_chart.test.tsx @@ -13,7 +13,7 @@ import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MockApmPluginContextWrapper } from '../../../../../context/apm_plugin/mock_apm_plugin_context'; import { getLensAttributes } from './get_lens_attributes'; import { MostUsedChart, MostUsedMetricTypes } from '.'; -import { HOST_OS_VERSION } from '../../../../../../common/elasticsearch_fieldnames'; +import { HOST_OS_VERSION } from '../../../../../../common/es_fields/apm'; const mockEmbeddableComponent = jest.fn(); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx index 5b06edee24f35..cf2feb2ad4d8c 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/service_oveview_mobile_charts.tsx @@ -37,7 +37,7 @@ import { HOST_OS_VERSION, NETWORK_CONNECTION_TYPE, SERVICE_VERSION, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; interface Props { latencyChartHeight: number; rowDirection: 'column' | 'row'; diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts index b64bbb1c0cc5b..c642dfe33116d 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_charts/use_filters_for_mobile_charts.ts @@ -16,7 +16,7 @@ import { DEVICE_MODEL_NAME, NETWORK_CONNECTION_TYPE, SERVICE_VERSION, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; export function useFiltersForMobileCharts() { const { diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx index fd8b43700f9b6..f37e9b52b7093 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx @@ -16,7 +16,7 @@ import { SectionTitle, } from '@kbn/observability-plugin/public'; import { isJavaAgentName } from '../../../../../../common/agent_name'; -import { SERVICE_NODE_NAME } from '../../../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NODE_NAME } from '../../../../../../common/es_fields/apm'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS } from '../../../../../hooks/use_fetcher'; import { pushNewItemToKueryBar } from '../../../../shared/kuery_bar/utils'; diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx index c759f356753a0..b862ad858d0c6 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx @@ -18,17 +18,20 @@ import { CLOUD_PROVIDER, CONTAINER_ID, HOST_NAME, + SERVICE_VERSION, SERVICE_NODE_NAME, SERVICE_RUNTIME_NAME, SERVICE_RUNTIME_VERSION, - SERVICE_VERSION, - KUBERNETES_CONTAINER_NAME, - KUBERNETES_NAMESPACE, KUBERNETES_POD_NAME, KUBERNETES_POD_UID, +} from '../../../../../common/es_fields/apm'; + +import { + KUBERNETES_CONTAINER_NAME, + KUBERNETES_NAMESPACE, KUBERNETES_REPLICASET_NAME, KUBERNETES_DEPLOYMENT_NAME, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/infra_metrics'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useTheme } from '../../../../hooks/use_theme'; diff --git a/x-pack/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx b/x-pack/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx index 1a4e8a4727d85..31b8ae54a4fc2 100644 --- a/x-pack/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx @@ -19,7 +19,7 @@ import { useFetcher, FETCH_STATUS } from '../../../../../../hooks/use_fetcher'; import { FormRowSelect } from './form_row_select'; import { LegacyAPMLink } from '../../../../../shared/links/apm/apm_link'; import { FormRowSuggestionsSelect } from './form_row_suggestions_select'; -import { SERVICE_NAME } from '../../../../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../../../../common/es_fields/apm'; interface Props { newConfig: AgentConfigurationIntake; setNewConfig: React.Dispatch<React.SetStateAction<AgentConfigurationIntake>>; diff --git a/x-pack/plugins/apm/public/components/app/settings/agent_explorer/index.tsx b/x-pack/plugins/apm/public/components/app/settings/agent_explorer/index.tsx index 11f4f8d0d79a1..2770fd1737afe 100644 --- a/x-pack/plugins/apm/public/components/app/settings/agent_explorer/index.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/agent_explorer/index.tsx @@ -20,7 +20,7 @@ import { useHistory } from 'react-router-dom'; import { SERVICE_LANGUAGE_NAME, SERVICE_NAME, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useProgressiveFetcher } from '../../../../hooks/use_progressive_fetcher'; diff --git a/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx b/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx index 564cddd1af89c..a2a4b756d4c5b 100644 --- a/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx @@ -70,7 +70,12 @@ export function GeneralSettings() { return ( <> <EuiCallOut - title={ + title={i18n.translate('xpack.apm.apmSettings.callOutTitle', { + defaultMessage: 'Looking for all settings?', + })} + iconType="search" + > + <p> <FormattedMessage id="xpack.apm.apmSettings.kibanaLink" defaultMessage="The full list of APM options can be found in {link}" @@ -82,15 +87,14 @@ export function GeneralSettings() { })} > {i18n.translate('xpack.apm.apmSettings.kibanaLink.label', { - defaultMessage: 'Kibana advanced settings', + defaultMessage: 'Kibana advanced settings.', })} </EuiLink> ), }} /> - } - iconType="iInCircle" - /> + </p> + </EuiCallOut> <EuiSpacer /> {apmSettingsKeys.map((settingKey) => { const editableConfig = settingsEditableConfig[settingKey]; diff --git a/x-pack/plugins/apm/public/components/app/trace_link/get_redirect_to_trace_page_url.ts b/x-pack/plugins/apm/public/components/app/trace_link/get_redirect_to_trace_page_url.ts index a94ecd5c8f875..0f76d5e7dee9f 100644 --- a/x-pack/plugins/apm/public/components/app/trace_link/get_redirect_to_trace_page_url.ts +++ b/x-pack/plugins/apm/public/components/app/trace_link/get_redirect_to_trace_page_url.ts @@ -6,7 +6,7 @@ */ import { format } from 'url'; -import { TRACE_ID } from '../../../../common/elasticsearch_fieldnames'; +import { TRACE_ID } from '../../../../common/es_fields/apm'; export const getRedirectToTracePageUrl = ({ traceId, diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts index 77f284e0ffee7..752c8dd4c9ee4 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts +++ b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts @@ -8,7 +8,7 @@ import { useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { DEFAULT_PERCENTILE_THRESHOLD } from '../../../../../common/correlations/constants'; -import { EVENT_OUTCOME } from '../../../../../common/elasticsearch_fieldnames'; +import { EVENT_OUTCOME } from '../../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../../common/event_outcome'; import { LatencyDistributionChartType } from '../../../../../common/latency_distribution_chart_types'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx index 43af7b9c7414c..5b766a9cf04a9 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { SERVICE_NAME, TRANSACTION_NAME, -} from '../../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../../common/es_fields/apm'; import { getNextEnvironmentUrlParam } from '../../../../../../../common/environment_filter_values'; import { LatencyAggregationType } from '../../../../../../../common/latency_aggregation_types'; import { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx index 59abacb1c325c..30ff2a8945d7c 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx @@ -13,7 +13,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, TRANSACTION_NAME, -} from '../../../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../../../common/es_fields/apm'; import { getNextEnvironmentUrlParam } from '../../../../../../../../common/environment_filter_values'; import { NOT_AVAILABLE_LABEL } from '../../../../../../../../common/i18n'; import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx index 8057ee3a32b7d..e2e4ea1fb00f4 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx @@ -14,7 +14,7 @@ import { isRumAgentName } from '../../../../../../../common/agent_name'; import { TRACE_ID, TRANSACTION_ID, -} from '../../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../../common/utils/formatters'; import { Margins } from '../../../../../shared/charts/timeline'; import { TruncateWithTooltip } from '../../../../../shared/truncate_with_tooltip'; diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx index f7eb437f1d096..7a3ab4639d986 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx @@ -19,7 +19,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_DURATION, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { ENVIRONMENT_ALL, ENVIRONMENT_NOT_DEFINED, diff --git a/x-pack/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx index dc01779cc3af3..e74c1014bcbec 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx @@ -24,7 +24,7 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import { useChartTheme } from '@kbn/observability-plugin/public'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; -import { SERVICE_NODE_NAME } from '../../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NODE_NAME } from '../../../../../common/es_fields/apm'; import { asTransactionRate, getDurationFormatter, diff --git a/x-pack/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx b/x-pack/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx index 17ad34f70c008..a98f9d8a3203c 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx @@ -11,7 +11,7 @@ import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { TRACE_ID, TRANSACTION_ID, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../common/utils/formatters'; import { useLegacyUrlParams } from '../../../../../context/url_params_context/use_url_params'; import { useTheme } from '../../../../../hooks/use_theme'; diff --git a/x-pack/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx b/x-pack/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx index 882b974abd6fe..e4687719cdfc3 100644 --- a/x-pack/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx +++ b/x-pack/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx @@ -23,7 +23,7 @@ import { SPAN_TYPE, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { SpanIcon } from '../span_icon'; import { AgentIcon } from '../agent_icon'; import { asPercent } from '../../../../common/utils/formatters'; diff --git a/x-pack/plugins/apm/public/components/shared/environment_select/index.tsx b/x-pack/plugins/apm/public/components/shared/environment_select/index.tsx index f954d6d693171..a6b14b4f0a4e8 100644 --- a/x-pack/plugins/apm/public/components/shared/environment_select/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/environment_select/index.tsx @@ -14,7 +14,7 @@ import { ENVIRONMENT_NOT_DEFINED, ENVIRONMENT_ALL, } from '../../../../common/environment_filter_values'; -import { SERVICE_ENVIRONMENT } from '../../../../common/elasticsearch_fieldnames'; +import { SERVICE_ENVIRONMENT } from '../../../../common/es_fields/apm'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; import { useApmParams } from '../../../hooks/use_apm_params'; diff --git a/x-pack/plugins/apm/public/components/shared/kuery_bar/get_bool_filter.ts b/x-pack/plugins/apm/public/components/shared/kuery_bar/get_bool_filter.ts index e2db3349323ee..92a8a9172ff9a 100644 --- a/x-pack/plugins/apm/public/components/shared/kuery_bar/get_bool_filter.ts +++ b/x-pack/plugins/apm/public/components/shared/kuery_bar/get_bool_filter.ts @@ -12,7 +12,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { UIProcessorEvent } from '../../../../common/processor_event'; import { environmentQuery } from '../../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx index c7d35e7c983e8..b54d3a393a72f 100644 --- a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx @@ -9,7 +9,7 @@ import React, { ReactNode } from 'react'; import { ERROR_GROUP_ID, SERVICE_NAME, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { DiscoverLink } from './discover_link'; diff --git a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx index f943e6fb49985..c8bcc29a15a98 100644 --- a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx @@ -6,7 +6,7 @@ */ import React, { ReactNode } from 'react'; -import { SPAN_ID } from '../../../../../common/elasticsearch_fieldnames'; +import { SPAN_ID } from '../../../../../common/es_fields/apm'; import { Span } from '../../../../../typings/es_schemas/ui/span'; import { DiscoverLink } from './discover_link'; diff --git a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx index d776572cc9e32..3a79e880e1bd1 100644 --- a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx @@ -10,7 +10,7 @@ import { PROCESSOR_EVENT, TRACE_ID, TRANSACTION_ID, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { DiscoverLink } from './discover_link'; diff --git a/x-pack/plugins/apm/public/components/shared/search_bar.tsx b/x-pack/plugins/apm/public/components/shared/search_bar.tsx index c71e21bee2c38..1a46ca2e87568 100644 --- a/x-pack/plugins/apm/public/components/shared/search_bar.tsx +++ b/x-pack/plugins/apm/public/components/shared/search_bar.tsx @@ -13,6 +13,8 @@ import { EuiSpacer, } from '@elastic/eui'; import React from 'react'; +import { isMobileAgentName } from '../../../common/agent_name'; +import { useApmServiceContext } from '../../context/apm_service/use_apm_service_context'; import { useBreakpoints } from '../../hooks/use_breakpoints'; import { ApmDatePicker } from './date_picker/apm_date_picker'; import { KueryBar } from './kuery_bar'; @@ -36,6 +38,9 @@ export function SearchBar({ kueryBarBoolFilter, kueryBarPlaceholder, }: Props) { + const { agentName } = useApmServiceContext(); + const isMobileAgent = isMobileAgentName(agentName); + const { isSmall, isMedium, isLarge, isXl, isXXL, isXXXL } = useBreakpoints(); if (hidden) { @@ -92,7 +97,7 @@ export function SearchBar({ </EuiFlexGroup> </EuiFlexItem> </EuiFlexGroup> - <EuiSpacer size="m" /> + <EuiSpacer size={isMobileAgent ? 's' : 'm'} /> </> ); } diff --git a/x-pack/plugins/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx b/x-pack/plugins/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx index 5207dae54efad..492200290dbe1 100644 --- a/x-pack/plugins/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { StickyProperties } from '.'; import { shallow } from 'enzyme'; -import { USER_ID, URL_FULL } from '../../../../common/elasticsearch_fieldnames'; +import { USER_ID, URL_FULL } from '../../../../common/es_fields/apm'; import { mockMoment } from '../../../utils/test_helpers'; describe('StickyProperties', () => { diff --git a/x-pack/plugins/apm/scripts/aggregate_latency_metrics/index.ts b/x-pack/plugins/apm/scripts/aggregate_latency_metrics/index.ts index 8576034d167ad..e2b3ef28f21ee 100644 --- a/x-pack/plugins/apm/scripts/aggregate_latency_metrics/index.ts +++ b/x-pack/plugins/apm/scripts/aggregate_latency_metrics/index.ts @@ -23,7 +23,7 @@ import { SERVICE_VERSION, TRANSACTION_RESULT, PROCESSOR_EVENT, -} from '../../common/elasticsearch_fieldnames'; +} from '../../common/es_fields/apm'; import { createOrUpdateIndex } from '../shared/create_or_update_index'; import { parseIndexUrl } from '../shared/parse_index_url'; import { ESClient, getEsClient } from '../shared/get_es_client'; diff --git a/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts b/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts index 7480fd1c847f3..3221212da93aa 100644 --- a/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts +++ b/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts @@ -12,10 +12,7 @@ import moment from 'moment'; import uuid from 'uuid/v4'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { ML_ERRORS } from '../../../common/anomaly_detection'; -import { - METRICSET_NAME, - PROCESSOR_EVENT, -} from '../../../common/elasticsearch_fieldnames'; +import { METRICSET_NAME, PROCESSOR_EVENT } from '../../../common/es_fields/apm'; import { Environment } from '../../../common/environment_rt'; import { environmentQuery } from '../../../common/utils/environment_query'; import { withApmSpan } from '../../utils/with_apm_span'; diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts index babbd57ccc9dc..1b9103aeefc6a 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts @@ -11,7 +11,7 @@ import { tasks } from './tasks'; import { SERVICE_NAME, SERVICE_ENVIRONMENT, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; describe('data telemetry collection tasks', () => { const indices = { diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index db07108179756..d7d14c37e819f 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -41,7 +41,7 @@ import { TRANSACTION_RESULT, TRANSACTION_TYPE, USER_AGENT_ORIGINAL, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, MAX_NUMBER_OF_SERVICE_GROUPS, diff --git a/x-pack/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts b/x-pack/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts index 4e15500a59466..32c805b330327 100644 --- a/x-pack/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts +++ b/x-pack/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts @@ -6,7 +6,7 @@ */ import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { AGENT_NAME } from '../../../common/elasticsearch_fieldnames'; +import { AGENT_NAME } from '../../../common/es_fields/apm'; import { RUM_AGENT_NAMES } from '../../../common/agent_name'; // exclude RUM exit spans, as they're high cardinality and don't usually diff --git a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts index 4c76699d2089b..f39a5a3264449 100644 --- a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts +++ b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts @@ -23,7 +23,7 @@ import { SPAN_ID, SPAN_SUBTYPE, SPAN_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; import { Node, NodeType } from '../../../../common/connections'; import { excludeRumExitSpansQuery } from '../exclude_rum_exit_spans_query'; diff --git a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts index 409565db5729f..6f432f72e307e 100644 --- a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts +++ b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts @@ -24,7 +24,7 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, SPAN_SUBTYPE, SPAN_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { getBucketSize } from '../../helpers/get_bucket_size'; import { EventOutcome } from '../../../../common/event_outcome'; import { NodeType } from '../../../../common/connections'; diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts index 11633dff25fd2..b57916814e179 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts @@ -8,7 +8,7 @@ import { uniq, defaultsDeep, cloneDeep } from 'lodash'; import type { ESSearchRequest, ESFilter } from '@kbn/es-types'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { PROCESSOR_EVENT } from '../../../../../common/elasticsearch_fieldnames'; +import { PROCESSOR_EVENT } from '../../../../../common/es_fields/apm'; import { ApmIndicesConfig } from '../../../../routes/settings/apm_indices/get_apm_indices'; const processorEventIndexMap = { diff --git a/x-pack/plugins/apm/server/lib/helpers/service_metrics/index.ts b/x-pack/plugins/apm/server/lib/helpers/service_metrics/index.ts index 1f68eaef98aae..ce50557e44ada 100644 --- a/x-pack/plugins/apm/server/lib/helpers/service_metrics/index.ts +++ b/x-pack/plugins/apm/server/lib/helpers/service_metrics/index.ts @@ -7,7 +7,7 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { METRICSET_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { METRICSET_NAME } from '../../../../common/es_fields/apm'; import { APMEventClient } from '../create_es_client/create_apm_event_client'; export async function getSearchServiceMetrics({ diff --git a/x-pack/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts b/x-pack/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts index 6b58db02bbbbc..0632f5a0b4d61 100644 --- a/x-pack/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts +++ b/x-pack/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts @@ -18,7 +18,7 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, SPAN_DURATION, SPAN_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { APMEventClient } from '../create_es_client/create_apm_event_client'; export function getProcessorEventForServiceDestinationStatistics( diff --git a/x-pack/plugins/apm/server/lib/helpers/transaction_coldstart_rate.ts b/x-pack/plugins/apm/server/lib/helpers/transaction_coldstart_rate.ts index 4ea3958f07361..2a01534a58c2f 100644 --- a/x-pack/plugins/apm/server/lib/helpers/transaction_coldstart_rate.ts +++ b/x-pack/plugins/apm/server/lib/helpers/transaction_coldstart_rate.ts @@ -9,7 +9,7 @@ import type { AggregationOptionsByType, AggregationResultOf, } from '@kbn/es-types'; -import { FAAS_COLDSTART } from '../../../common/elasticsearch_fieldnames'; +import { FAAS_COLDSTART } from '../../../common/es_fields/apm'; export const getColdstartAggregation = () => ({ terms: { diff --git a/x-pack/plugins/apm/server/lib/helpers/transaction_error_rate.ts b/x-pack/plugins/apm/server/lib/helpers/transaction_error_rate.ts index 665784ce53454..ff06cfd0f69d5 100644 --- a/x-pack/plugins/apm/server/lib/helpers/transaction_error_rate.ts +++ b/x-pack/plugins/apm/server/lib/helpers/transaction_error_rate.ts @@ -10,7 +10,7 @@ import type { AggregationResultOf, } from '@kbn/es-types'; import { isNull } from 'lodash'; -import { EVENT_OUTCOME } from '../../../common/elasticsearch_fieldnames'; +import { EVENT_OUTCOME } from '../../../common/es_fields/apm'; import { EventOutcome } from '../../../common/event_outcome'; export const getOutcomeAggregation = () => { diff --git a/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts b/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts index 3e54ee7fda79f..534d9af012fe9 100644 --- a/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts +++ b/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts @@ -13,7 +13,7 @@ import { TRANSACTION_DURATION_HISTOGRAM, TRANSACTION_ROOT, PARENT_ID, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { APMConfig } from '../../..'; import { APMEventClient } from '../create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts index 74419d47507a4..8c8c2be00dd4b 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts @@ -12,7 +12,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; import { environmentQuery } from '../../../common/utils/environment_query'; import { Coordinate } from '../../../typings/timeseries'; diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts index 8fb57d037a3c6..f34ab55f485ba 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts @@ -15,7 +15,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; import { Coordinate } from '../../../typings/timeseries'; diff --git a/x-pack/plugins/apm/server/plugin.ts b/x-pack/plugins/apm/server/plugin.ts index f40ce41fa3f63..7fc3ab4f4d52e 100644 --- a/x-pack/plugins/apm/server/plugin.ts +++ b/x-pack/plugins/apm/server/plugin.ts @@ -51,7 +51,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_TYPE, -} from '../common/elasticsearch_fieldnames'; +} from '../common/es_fields/apm'; import { tutorialProvider } from './tutorial'; import { migrateLegacyAPMIndicesToSpaceAware } from './saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware'; diff --git a/x-pack/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts b/x-pack/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts index abebc4285a1e2..2a9bfcda1977c 100644 --- a/x-pack/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts +++ b/x-pack/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts @@ -18,7 +18,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/agent_explorer/get_agents_items.ts b/x-pack/plugins/apm/server/routes/agent_explorer/get_agents_items.ts index 9fbb4a772e890..43cfc271da9aa 100644 --- a/x-pack/plugins/apm/server/routes/agent_explorer/get_agents_items.ts +++ b/x-pack/plugins/apm/server/routes/agent_explorer/get_agents_items.ts @@ -18,7 +18,7 @@ import { SERVICE_LANGUAGE_NAME, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/get_service_group_fields_for_anomaly.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/get_service_group_fields_for_anomaly.ts index 0786cd81aa7f2..a5c4205298438 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/get_service_group_fields_for_anomaly.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/get_service_group_fields_for_anomaly.ts @@ -14,7 +14,7 @@ import { SERVICE_NAME, TRANSACTION_TYPE, TRANSACTION_DURATION, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { alertingEsClient } from '../../alerting_es_client'; import { getServiceGroupFields, diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts index c2e4191fc49f5..889b249ceca3b 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts @@ -31,7 +31,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { getEnvironmentEsField, getEnvironmentLabel, diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts index fa819e268c802..4dfdf665e3d08 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts @@ -7,7 +7,7 @@ import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { SERVICE_NAME } from '../../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../../common/es_fields/apm'; import { AlertParams } from '../../route'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts index 648aa857870cc..276e817093f40 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts @@ -34,7 +34,7 @@ import { PROCESSOR_EVENT, SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { getApmIndices } from '../../../settings/apm_indices/get_apm_indices'; import { apmActionVariables } from '../../action_variables'; diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts index 781e9739fdba9..0b4add4c316c3 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts @@ -12,7 +12,7 @@ import { SERVICE_NAME, SERVICE_ENVIRONMENT, TRANSACTION_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { AlertParams } from '../../route'; import { diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts index 304a752079e12..56cf1fc466584 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts @@ -33,7 +33,7 @@ import { SERVICE_NAME, TRANSACTION_TYPE, SERVICE_ENVIRONMENT, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED, getEnvironmentEsField, diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts index d799e025c3453..d8d1b91acc60c 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts @@ -9,7 +9,7 @@ import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { AlertParams } from '../../route'; import { diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts index 97f07e32566fd..cda1c0a9f2f88 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts @@ -36,7 +36,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../../common/event_outcome'; import { asDecimalOrInteger } from '../../../../../common/utils/formatters'; import { environmentQuery } from '../../../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts index 48d468c517972..e431f3eec1fdb 100644 --- a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts +++ b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SPAN_DURATION, TRANSACTION_DURATION, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts index 222cce131372d..8d088ea0dd2f3 100644 --- a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts +++ b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts @@ -12,7 +12,7 @@ import { CommonCorrelationsQueryParams } from '../../../../common/correlations/t import { SPAN_DURATION, TRANSACTION_DURATION, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; diff --git a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts index 405ca6250e5d5..788ee820e4453 100644 --- a/x-pack/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts +++ b/x-pack/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts @@ -10,7 +10,7 @@ import { FailedTransactionsCorrelation } from '../../../../common/correlations/f import { EVENT_OUTCOME, PROCESSOR_EVENT, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../common/event_outcome'; import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; diff --git a/x-pack/plugins/apm/server/routes/correlations/route.ts b/x-pack/plugins/apm/server/routes/correlations/route.ts index 00cba18950319..1957da0d7caba 100644 --- a/x-pack/plugins/apm/server/routes/correlations/route.ts +++ b/x-pack/plugins/apm/server/routes/correlations/route.ts @@ -22,7 +22,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { fetchFieldValueFieldStats } from './queries/field_stats/fetch_field_value_field_stats'; import { fetchFieldValuePairs } from './queries/fetch_field_value_pairs'; import { fetchSignificantCorrelations } from './queries/fetch_significant_correlations'; diff --git a/x-pack/plugins/apm/server/routes/correlations/utils/get_duration_field.ts b/x-pack/plugins/apm/server/routes/correlations/utils/get_duration_field.ts index 80824382b362f..7c353ff0939aa 100644 --- a/x-pack/plugins/apm/server/routes/correlations/utils/get_duration_field.ts +++ b/x-pack/plugins/apm/server/routes/correlations/utils/get_duration_field.ts @@ -9,7 +9,7 @@ import { SPAN_DURATION, TRANSACTION_DURATION, TRANSACTION_DURATION_HISTOGRAM, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; const { diff --git a/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts b/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts index 61fbe9b362347..7422c878163b7 100644 --- a/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts +++ b/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts @@ -12,7 +12,7 @@ import { TRACE_ID, TRANSACTION_ID, TRANSACTION_DURATION, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { APM_STATIC_DATA_VIEW_ID } from '../../../common/data_view_constants'; import { hasHistoricalAgentData } from '../historical_data/has_historical_agent_data'; import { withApmSpan } from '../../utils/with_apm_span'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts b/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts index 150ec8664a246..72945e44df1a2 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts @@ -10,7 +10,7 @@ import { EVENT_OUTCOME, SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts index 135178aca2ac9..81395df6ca491 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts @@ -15,7 +15,7 @@ import { EVENT_OUTCOME, SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../lib/helpers/metrics'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts index 14689f9665708..0127c0db380c0 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts @@ -13,7 +13,7 @@ import { import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../lib/helpers/metrics'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts index 5daf4483f8fd0..ef3d532ee97b0 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts @@ -8,7 +8,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { maybe } from '../../../common/utils/maybe'; -import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/elasticsearch_fieldnames'; +import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getMetadataForDependency({ diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts index 6ba07907666be..6f9982a60a49c 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts @@ -13,7 +13,7 @@ import { import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getBucketSize } from '../../lib/helpers/get_bucket_size'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts index b2e4c44a730fb..bc01a0b0220a4 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts @@ -17,7 +17,7 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT, SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts index 83d7f2bf52b9e..b8e579cff80df 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts @@ -26,7 +26,7 @@ import { TRANSACTION_ID, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts index 8f2710cbc972f..0beda0afa4e13 100644 --- a/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts @@ -6,7 +6,7 @@ */ import { kqlQuery } from '@kbn/observability-plugin/server'; -import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/elasticsearch_fieldnames'; +import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; diff --git a/x-pack/plugins/apm/server/routes/environments/get_all_environments.ts b/x-pack/plugins/apm/server/routes/environments/get_all_environments.ts index 8cd7c14a0d629..bd8c2ec4fb8f7 100644 --- a/x-pack/plugins/apm/server/routes/environments/get_all_environments.ts +++ b/x-pack/plugins/apm/server/routes/environments/get_all_environments.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME, SERVICE_ENVIRONMENT, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED } from '../../../common/environment_filter_values'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/environments/get_environments.ts b/x-pack/plugins/apm/server/routes/environments/get_environments.ts index e8a3abace204e..f04d67fe7d339 100644 --- a/x-pack/plugins/apm/server/routes/environments/get_environments.ts +++ b/x-pack/plugins/apm/server/routes/environments/get_environments.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED } from '../../../common/environment_filter_values'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; import { Environment } from '../../../common/environment_rt'; diff --git a/x-pack/plugins/apm/server/routes/errors/distribution/get_buckets.ts b/x-pack/plugins/apm/server/routes/errors/distribution/get_buckets.ts index 770305df2aab2..72e9b1c1b2d55 100644 --- a/x-pack/plugins/apm/server/routes/errors/distribution/get_buckets.ts +++ b/x-pack/plugins/apm/server/routes/errors/distribution/get_buckets.ts @@ -11,10 +11,7 @@ import { termQuery, } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - ERROR_GROUP_ID, - SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts b/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts index 70ee012635b01..0c7a5de3ffa6d 100644 --- a/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts +++ b/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts @@ -24,7 +24,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../lib/helpers/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; diff --git a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts index 30720c2d799c3..ba4026ea8dc4f 100644 --- a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts @@ -14,10 +14,7 @@ import { import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; import { Coordinate } from '../../../../typings/timeseries'; -import { - ERROR_GROUP_ID, - SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../lib/helpers/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; diff --git a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts index f4d2fcff4a402..176534c57be4a 100644 --- a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts +++ b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts @@ -22,7 +22,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getErrorName } from '../../../lib/helpers/get_error_name'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample.ts b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample.ts index 744db1c9c21b8..20615dc3be536 100644 --- a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample.ts +++ b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample.ts @@ -12,7 +12,7 @@ import { ERROR_GROUP_ID, SERVICE_NAME, TRANSACTION_SAMPLED, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getTransaction } from '../../transactions/get_transaction'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/event_metadata/get_event_metadata.ts b/x-pack/plugins/apm/server/routes/event_metadata/get_event_metadata.ts index a30160840657e..7788784326389 100644 --- a/x-pack/plugins/apm/server/routes/event_metadata/get_event_metadata.ts +++ b/x-pack/plugins/apm/server/routes/event_metadata/get_event_metadata.ts @@ -11,7 +11,7 @@ import { ERROR_ID, SPAN_ID, TRANSACTION_ID, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getEventMetadata({ diff --git a/x-pack/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts b/x-pack/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts index 52e77f3643bcd..0e05d9664cedd 100644 --- a/x-pack/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts +++ b/x-pack/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts @@ -16,7 +16,7 @@ import { import { APMPlugin, APMRouteHandlerResources } from '../..'; import { createInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; import { AgentConfiguration } from '../../../common/agent_configuration/configuration_types'; -import { AGENT_NAME } from '../../../common/elasticsearch_fieldnames'; +import { AGENT_NAME } from '../../../common/es_fields/apm'; import { APMPluginStartDependencies } from '../../types'; import { mergePackagePolicyWithApm } from './merge_package_policy_with_apm'; diff --git a/x-pack/plugins/apm/server/routes/infrastructure/get_host_names.ts b/x-pack/plugins/apm/server/routes/infrastructure/get_host_names.ts index 257233fada9cb..59c4eec1556b4 100644 --- a/x-pack/plugins/apm/server/routes/infrastructure/get_host_names.ts +++ b/x-pack/plugins/apm/server/routes/infrastructure/get_host_names.ts @@ -6,10 +6,7 @@ */ import { rangeQuery } from '@kbn/observability-plugin/server'; -import { - CONTAINER_ID, - HOST_NAME, -} from '../../../common/elasticsearch_fieldnames'; +import { CONTAINER_ID, HOST_NAME } from '../../../common/es_fields/apm'; import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; export async function getContainerHostNames({ diff --git a/x-pack/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts b/x-pack/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts index 73c9732335c10..20983009b7f05 100644 --- a/x-pack/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts +++ b/x-pack/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts @@ -13,7 +13,7 @@ import { CONTAINER_ID, HOST_HOSTNAME, KUBERNETES_POD_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export const getInfrastructureData = async ({ diff --git a/x-pack/plugins/apm/server/routes/latency_distribution/route.ts b/x-pack/plugins/apm/server/routes/latency_distribution/route.ts index 0208d0a979b7e..0ef6ba54f9877 100644 --- a/x-pack/plugins/apm/server/routes/latency_distribution/route.ts +++ b/x-pack/plugins/apm/server/routes/latency_distribution/route.ts @@ -17,7 +17,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { latencyDistributionChartTypeRt, LatencyDistributionChartType, diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts index debb20c11f1a5..2979fcc8c45b3 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts @@ -9,7 +9,7 @@ import { APMConfig } from '../../../../..'; import { METRIC_JAVA_GC_COUNT, METRIC_JAVA_GC_TIME, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; import { ChartBase } from '../../../types'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts index cb97295bbca01..d8526aa71f230 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts @@ -19,7 +19,7 @@ import { METRIC_JAVA_GC_COUNT, METRIC_JAVA_GC_TIME, SERVICE_NAME, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { getBucketSize } from '../../../../../lib/helpers/get_bucket_size'; import { getVizColorForIndex } from '../../../../../../common/viz_colors'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts index 6fac756ccef5f..fe1dc496d21a9 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts @@ -7,7 +7,7 @@ import { euiLightVars as theme } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; -import { METRIC_JAVA_GC_COUNT } from '../../../../../../common/elasticsearch_fieldnames'; +import { METRIC_JAVA_GC_COUNT } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformGcMetrics } from './fetch_and_transform_gc_metrics'; import { ChartBase } from '../../../types'; import { APMConfig } from '../../../../..'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts index fed63945800da..4c3fdf23bcda0 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts @@ -7,7 +7,7 @@ import { euiLightVars as theme } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; -import { METRIC_JAVA_GC_TIME } from '../../../../../../common/elasticsearch_fieldnames'; +import { METRIC_JAVA_GC_TIME } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformGcMetrics } from './fetch_and_transform_gc_metrics'; import { ChartBase } from '../../../types'; import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts index 86c0b0af26054..5dca1df3b321d 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts @@ -12,7 +12,7 @@ import { METRIC_JAVA_HEAP_MEMORY_COMMITTED, METRIC_JAVA_HEAP_MEMORY_USED, AGENT_NAME, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { ChartBase } from '../../../types'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts index 888af8d795afb..de9522528e0bf 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts @@ -12,7 +12,7 @@ import { METRIC_JAVA_NON_HEAP_MEMORY_COMMITTED, METRIC_JAVA_NON_HEAP_MEMORY_USED, AGENT_NAME, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts index 74daa14438a15..fdb0215576301 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { METRIC_JAVA_THREAD_COUNT, AGENT_NAME, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts index 7da8e16bc28cc..2dff5e5ef99e2 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { METRIC_SYSTEM_CPU_PERCENT, METRIC_PROCESS_CPU_PERCENT, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { APMConfig } from '../../../../..'; diff --git a/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts b/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts index c4aa4f82fe558..2bb6b4a84925d 100644 --- a/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts +++ b/x-pack/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts @@ -14,7 +14,7 @@ import { METRIC_CGROUP_MEMORY_USAGE_BYTES, METRIC_SYSTEM_FREE_MEMORY, METRIC_SYSTEM_TOTAL_MEMORY, -} from '../../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { ChartBase } from '../../../types'; import { APMConfig } from '../../../../..'; diff --git a/x-pack/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts b/x-pack/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts index c23950b311e24..46a6610759e53 100644 --- a/x-pack/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts +++ b/x-pack/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts @@ -22,7 +22,7 @@ import { environmentQuery, serviceNodeNameQuery, } from '../../../common/utils/environment_query'; -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { ChartType, Coordinate, YUnit } from '../../../typings/timeseries'; import { APMConfig } from '../..'; diff --git a/x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts b/x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts index 2dd719717be00..c59da62d0c815 100644 --- a/x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts +++ b/x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts @@ -13,13 +13,10 @@ import { METRIC_JAVA_THREAD_COUNT, METRIC_PROCESS_CPU_PERCENT, HOST_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; -import { - SERVICE_NAME, - SERVICE_NODE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, SERVICE_NODE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts index 5361070e50c8d..6038fc6ab6fd6 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts @@ -19,7 +19,7 @@ import { METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { getServerlessFunctionNameFromId } from '../../../../common/serverless'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { Coordinate } from '../../../../typings/timeseries'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts index facd270aec728..97fb24124d034 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts @@ -16,7 +16,7 @@ import { METRICSET_NAME, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { Coordinate } from '../../../../typings/timeseries'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts index a56e6c4c8764c..846754a645aa4 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts @@ -13,7 +13,7 @@ import { FAAS_COLDSTART, FAAS_ID, METRICSET_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../fetch_and_transform_metrics'; import { ChartBase } from '../types'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts index b1802edb5440b..caca426769ec9 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts @@ -12,7 +12,7 @@ import { FAAS_COLDSTART_DURATION, FAAS_ID, METRICSET_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../fetch_and_transform_metrics'; import { ChartBase } from '../types'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts index 1c08588d9ec64..725cc7e893025 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts @@ -20,7 +20,7 @@ import { METRICSET_NAME, METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; import { GenericMetricsChart } from '../fetch_and_transform_metrics'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts index 47593c3f48409..40e2d2e0f3dad 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts @@ -13,7 +13,7 @@ import { FAAS_BILLED_DURATION, FAAS_ID, METRICSET_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; import { getVizColorForIndex } from '../../../../common/viz_colors'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts index 236e950c1f13c..d253b6bc63f85 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts @@ -19,7 +19,7 @@ import { METRIC_SYSTEM_FREE_MEMORY, METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { getServerlessFunctionNameFromId } from '../../../../common/serverless'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { calcMemoryUsed } from './helper'; diff --git a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts index 7d8f94606f86b..4e5bac125d2f3 100644 --- a/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts +++ b/x-pack/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts @@ -19,7 +19,7 @@ import { METRIC_SYSTEM_FREE_MEMORY, METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { calcEstimatedCost, calcMemoryUsedRate } from './helper'; diff --git a/x-pack/plugins/apm/server/routes/mobile/get_mobile_filters.ts b/x-pack/plugins/apm/server/routes/mobile/get_mobile_filters.ts index bdd1667b4c8e8..bc2af83764c9c 100644 --- a/x-pack/plugins/apm/server/routes/mobile/get_mobile_filters.ts +++ b/x-pack/plugins/apm/server/routes/mobile/get_mobile_filters.ts @@ -19,7 +19,7 @@ import { SERVICE_NAME, SERVICE_VERSION, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/observability_overview/get_service_count.ts b/x-pack/plugins/apm/server/routes/observability_overview/get_service_count.ts index 315f9345bff84..73ada87ff7d45 100644 --- a/x-pack/plugins/apm/server/routes/observability_overview/get_service_count.ts +++ b/x-pack/plugins/apm/server/routes/observability_overview/get_service_count.ts @@ -7,7 +7,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts b/x-pack/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts index 8f99b6a08ae84..844cab9da1ca3 100644 --- a/x-pack/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts +++ b/x-pack/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts @@ -10,7 +10,7 @@ import { TRANSACTION_PAGE_LOAD, TRANSACTION_REQUEST, } from '../../../common/transaction_types'; -import { TRANSACTION_TYPE } from '../../../common/elasticsearch_fieldnames'; +import { TRANSACTION_TYPE } from '../../../common/es_fields/apm'; import { getDocumentTypeFilterForTransactions, getProcessorEventForTransactions, diff --git a/x-pack/plugins/apm/server/routes/service_groups/get_services_counts.ts b/x-pack/plugins/apm/server/routes/service_groups/get_services_counts.ts index b261c2a4cfd4a..80582c9fb982f 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/get_services_counts.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/get_services_counts.ts @@ -8,7 +8,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { rangeQuery, kqlQuery } from '@kbn/observability-plugin/server'; import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { SavedServiceGroup } from '../../../common/service_groups'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts index 4acfb49762629..734cb3ddd6251 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts @@ -12,7 +12,7 @@ import { AGENT_NAME, SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function lookupServices({ diff --git a/x-pack/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts b/x-pack/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts index 5d044846da6e7..ee09078795df6 100644 --- a/x-pack/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts +++ b/x-pack/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts @@ -7,7 +7,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { TRACE_ID } from '../../../common/elasticsearch_fieldnames'; +import { TRACE_ID } from '../../../common/es_fields/apm'; import { ConnectionNode, ExternalConnectionNode, diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts index d5a7c20b5204f..35c422c53156e 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts @@ -13,7 +13,7 @@ import { AGENT_NAME, SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { withApmSpan } from '../../utils/with_apm_span'; import { MlClient } from '../../lib/helpers/get_ml_client'; diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts index 241672a7fa4db..c373fcea49071 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts @@ -12,7 +12,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT, SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; import { withApmSpan } from '../../utils/with_apm_span'; diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts index 7f4b260b83309..bbcbd439443fc 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts @@ -15,7 +15,7 @@ import { METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { NodeStats } from '../../../common/service_map'; import { TRANSACTION_PAGE_LOAD, diff --git a/x-pack/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts b/x-pack/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts index 2289d3df26485..d65e97c6988e5 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts @@ -15,7 +15,7 @@ import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE, TRACE_ID, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { SERVICE_MAP_TIMEOUT_ERROR } from '../../../common/service_map'; import { environmentQuery } from '../../../common/utils/environment_query'; import { serviceGroupQuery } from '../../lib/service_group_query'; diff --git a/x-pack/plugins/apm/server/routes/service_map/group_resource_nodes.ts b/x-pack/plugins/apm/server/routes/service_map/group_resource_nodes.ts index e9434861f9ad7..6b5bd0f761806 100644 --- a/x-pack/plugins/apm/server/routes/service_map/group_resource_nodes.ts +++ b/x-pack/plugins/apm/server/routes/service_map/group_resource_nodes.ts @@ -8,10 +8,7 @@ import { i18n } from '@kbn/i18n'; import { groupBy } from 'lodash'; import { ValuesType } from 'utility-types'; -import { - SPAN_TYPE, - SPAN_SUBTYPE, -} from '../../../common/elasticsearch_fieldnames'; +import { SPAN_TYPE, SPAN_SUBTYPE } from '../../../common/es_fields/apm'; import { ConnectionElement, isSpanGroupingSupported, diff --git a/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts b/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts index b27e6ea03bdb2..f33f1fdf28094 100644 --- a/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts +++ b/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts @@ -14,7 +14,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_SUBTYPE, SPAN_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { transformServiceMapResponses, ServiceMapResponse, diff --git a/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.ts b/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.ts index 4d4522461252b..54299848473bb 100644 --- a/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.ts +++ b/x-pack/plugins/apm/server/routes/service_map/transform_service_map_responses.ts @@ -12,7 +12,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_TYPE, SPAN_SUBTYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { Connection, ConnectionNode, diff --git a/x-pack/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts b/x-pack/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts index c98bc9dbeb17b..ce5a5eb959217 100644 --- a/x-pack/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts +++ b/x-pack/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts @@ -12,7 +12,7 @@ import { Annotation, AnnotationType } from '../../../../common/annotations'; import { SERVICE_NAME, SERVICE_VERSION, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getDocumentTypeFilterForTransactions, diff --git a/x-pack/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts b/x-pack/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts index eaf1a1dd04d30..8422373d5e8d9 100644 --- a/x-pack/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts +++ b/x-pack/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts @@ -17,7 +17,7 @@ import { Annotation as ESAnnotation } from '@kbn/observability-plugin/common/ann import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { Annotation, AnnotationType } from '../../../../common/annotations'; -import { SERVICE_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; export function getStoredAnnotations({ diff --git a/x-pack/plugins/apm/server/routes/services/get_service_agent.ts b/x-pack/plugins/apm/server/routes/services/get_service_agent.ts index e848dd9befbfb..567cd47b28999 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_agent.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_agent.ts @@ -11,7 +11,7 @@ import { AGENT_NAME, SERVICE_NAME, SERVICE_RUNTIME_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; interface ServiceAgent { diff --git a/x-pack/plugins/apm/server/routes/services/get_service_dependencies.ts b/x-pack/plugins/apm/server/routes/services/get_service_dependencies.ts index e0878a9361f30..45bc74a5d0c71 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_dependencies.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_dependencies.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts b/x-pack/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts index 8b940b8525b66..defe47c0bd61c 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts @@ -7,7 +7,7 @@ import { sortBy, take } from 'lodash'; import { kqlQuery } from '@kbn/observability-plugin/server'; import { getNodeName } from '../../../common/connections'; -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts b/x-pack/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts index b5b98890ac636..049a01c55fb12 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts @@ -10,13 +10,15 @@ import { CONTAINER_ID, CONTAINER_IMAGE, KUBERNETES, - KUBERNETES_CONTAINER_NAME, - KUBERNETES_NAMESPACE, KUBERNETES_POD_NAME, KUBERNETES_POD_UID, +} from '../../../common/es_fields/apm'; +import { + KUBERNETES_CONTAINER_NAME, + KUBERNETES_NAMESPACE, KUBERNETES_REPLICASET_NAME, KUBERNETES_DEPLOYMENT_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/infra_metrics'; import { Kubernetes } from '../../../typings/es_schemas/raw/fields/kubernetes'; import { maybe } from '../../../common/utils/maybe'; import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts b/x-pack/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts index 22893a5acefd3..9ff813c6cd1b5 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts @@ -11,7 +11,7 @@ import { METRICSET_NAME, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { maybe } from '../../../common/utils/maybe'; import { getDocumentTypeFilterForTransactions, diff --git a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts index 71e1b2f7658c1..63fb6464dee36 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts @@ -15,7 +15,7 @@ import { METRIC_SYSTEM_TOTAL_MEMORY, SERVICE_NAME, SERVICE_NODE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { SERVICE_NODE_NAME_MISSING } from '../../../../common/service_nodes'; import { Coordinate } from '../../../../typings/timeseries'; import { environmentQuery } from '../../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts index 8bff6b47308bc..2b46b68eaf96a 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts @@ -10,7 +10,7 @@ import { SERVICE_NAME, SERVICE_NODE_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../common/event_outcome'; import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { SERVICE_NODE_NAME_MISSING } from '../../../../common/service_nodes'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_metadata_details.ts b/x-pack/plugins/apm/server/routes/services/get_service_metadata_details.ts index dfe482325035b..4563bd851f8a8 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_metadata_details.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_metadata_details.ts @@ -24,7 +24,8 @@ import { SERVICE_VERSION, FAAS_ID, FAAS_TRIGGER_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; + import { ContainerType } from '../../../common/service_metadata'; import { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_metadata_icons.ts b/x-pack/plugins/apm/server/routes/services/get_service_metadata_icons.ts index 6b6ee0489ad19..f94cb4e5d3b29 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_metadata_icons.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_metadata_icons.ts @@ -16,7 +16,7 @@ import { SERVICE_NAME, KUBERNETES_POD_NAME, HOST_OS_PLATFORM, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { ContainerType } from '../../../common/service_metadata'; import { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_node_metadata.ts b/x-pack/plugins/apm/server/routes/services/get_service_node_metadata.ts index f85bed4b77bba..0a1e4c113168d 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_node_metadata.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_node_metadata.ts @@ -7,15 +7,9 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - HOST_NAME, - CONTAINER_ID, -} from '../../../common/elasticsearch_fieldnames'; +import { HOST_NAME, CONTAINER_ID } from '../../../common/es_fields/apm'; import { NOT_AVAILABLE_LABEL } from '../../../common/i18n'; -import { - SERVICE_NAME, - SERVICE_NODE_NAME, -} from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, SERVICE_NODE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery, serviceNodeNameQuery, diff --git a/x-pack/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts b/x-pack/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts index 4b8d979a7dd85..5840f143869ef 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts @@ -10,13 +10,15 @@ import { CONTAINER_ID, CONTAINER_IMAGE, KUBERNETES, - KUBERNETES_CONTAINER_NAME, - KUBERNETES_NAMESPACE, KUBERNETES_POD_NAME, KUBERNETES_POD_UID, +} from '../../../common/es_fields/apm'; +import { + KUBERNETES_CONTAINER_NAME, + KUBERNETES_NAMESPACE, KUBERNETES_REPLICASET_NAME, KUBERNETES_DEPLOYMENT_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/infra_metrics'; import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; export const getServiceOverviewContainerMetadata = async ({ diff --git a/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts index 5e8c5b0cc1c55..60d28bfd6bd22 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts @@ -12,7 +12,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { EventOutcome } from '../../../common/event_outcome'; import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts b/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts index 7b828d91af9a0..67b601c8426d0 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts @@ -11,7 +11,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { EventOutcome } from '../../../common/event_outcome'; import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/services/get_service_transaction_types.ts b/x-pack/plugins/apm/server/routes/services/get_service_transaction_types.ts index 1081c35b7eb70..884ce3b00023d 100644 --- a/x-pack/plugins/apm/server/routes/services/get_service_transaction_types.ts +++ b/x-pack/plugins/apm/server/routes/services/get_service_transaction_types.ts @@ -6,10 +6,7 @@ */ import { rangeQuery } from '@kbn/observability-plugin/server'; -import { - SERVICE_NAME, - TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getDocumentTypeFilterForTransactions, diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_service_aggregated_transaction_stats.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_service_aggregated_transaction_stats.ts index 73436ad9afb67..e3517dfab3940 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_service_aggregated_transaction_stats.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_service_aggregated_transaction_stats.ts @@ -15,7 +15,7 @@ import { TRANSACTION_DURATION_SUMMARY, TRANSACTION_FAILURE_COUNT, TRANSACTION_SUCCESS_COUNT, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { TRANSACTION_PAGE_LOAD, TRANSACTION_REQUEST, diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts index ba5903133e445..631f9674b6652 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts @@ -11,7 +11,7 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { TRANSACTION_PAGE_LOAD, TRANSACTION_REQUEST, diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_services_from_error_and_metric_documents.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_services_from_error_and_metric_documents.ts index 7ae1698b988dd..dd07277864d78 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_services_from_error_and_metric_documents.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_services_from_error_and_metric_documents.ts @@ -12,7 +12,7 @@ import { AGENT_NAME, SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { serviceGroupQuery } from '../../../lib/service_group_query'; import { ServiceGroup } from '../../../../common/service_groups'; diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts index dff072cfc05f6..0c870c61b784e 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts @@ -8,7 +8,7 @@ import { Logger } from '@kbn/logging'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { SERVICE_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { Environment } from '../../../../common/environment_rt'; import { joinByKey } from '../../../../common/utils/join_by_key'; diff --git a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_aggregated_transaction_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_aggregated_transaction_detailed_statistics.ts index f6ae0b220ee43..93097f2ed0e29 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_aggregated_transaction_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_aggregated_transaction_detailed_statistics.ts @@ -14,7 +14,7 @@ import { TRANSACTION_DURATION_SUMMARY, TRANSACTION_FAILURE_COUNT, TRANSACTION_SUCCESS_COUNT, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; import { TRANSACTION_PAGE_LOAD, diff --git a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts index fbddad6aa1c42..8170d5a73e8c6 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts @@ -10,7 +10,7 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; import { TRANSACTION_PAGE_LOAD, diff --git a/x-pack/plugins/apm/server/routes/services/get_throughput.ts b/x-pack/plugins/apm/server/routes/services/get_throughput.ts index 5413bcbf56322..12b819ae4e32d 100644 --- a/x-pack/plugins/apm/server/routes/services/get_throughput.ts +++ b/x-pack/plugins/apm/server/routes/services/get_throughput.ts @@ -14,7 +14,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getDocumentTypeFilterForTransactions, diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts index 484357be294ae..b9a0d5cb36fd0 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts @@ -10,7 +10,7 @@ import { AgentConfiguration } from '../../../../common/agent_configuration/confi import { SERVICE_ENVIRONMENT, SERVICE_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { getConfigsAppliedToAgentsThroughFleet } from './get_config_applied_to_agent_through_fleet'; diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts index 1ebc98877941f..a1e3c8993972e 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts @@ -6,8 +6,8 @@ */ import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { SERVICE_NAME } from '../../../../common/elasticsearch_fieldnames'; -import { AGENT_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../../common/es_fields/apm'; +import { AGENT_NAME } from '../../../../common/es_fields/apm'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getAgentNameByService({ diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts index 1e5099966ea7c..7d4382e054783 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts @@ -7,7 +7,7 @@ import { termQuery, rangeQuery } from '@kbn/observability-plugin/server'; import datemath from '@kbn/datemath'; -import { METRICSET_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { METRICSET_NAME } from '../../../../common/es_fields/apm'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; export async function getConfigsAppliedToAgentsThroughFleet( diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts index 336a992da7b2c..4223ecdf0ed21 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts @@ -8,7 +8,7 @@ import { SERVICE_NAME, SERVICE_ENVIRONMENT, -} from '../../../../../common/elasticsearch_fieldnames'; +} from '../../../../../common/es_fields/apm'; import { ALL_OPTION_VALUE } from '../../../../../common/agent_configuration/all_option'; import { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts index ea58a92eca7ca..51f6702a0fb57 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts @@ -9,7 +9,7 @@ import type { SearchHit } from '@kbn/es-types'; import { SERVICE_NAME, SERVICE_ENVIRONMENT, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/custom_link_types.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/custom_link_types.ts index 48f547e3deb0f..614834006fb7d 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/custom_link_types.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/custom_link_types.ts @@ -16,7 +16,7 @@ import * as t from 'io-ts'; // SERVICE_ENVIRONMENT, // TRANSACTION_NAME, // TRANSACTION_TYPE, -// } from '../../../../common/elasticsearch_fieldnames'; +// } from '../../../../common/es_fields/apm'; export interface CustomLinkES { id?: string; diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts index 1d3639bbb9f11..177ef2173983b 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts @@ -15,7 +15,7 @@ import { TRANSACTION_TYPE, SERVICE_ENVIRONMENT, TRANSACTION_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; describe('custom link get transaction', () => { let mock: SearchParamsMock; diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts index 469b6f8c356b1..c0905d2628ccb 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts @@ -13,7 +13,7 @@ import { import { SERVICE_NAME, TRANSACTION_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; describe('List Custom Links', () => { let mock: SearchParamsMock; diff --git a/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts b/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts index 60dfe40f469fb..4c8b6a8994abd 100644 --- a/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts +++ b/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts @@ -15,7 +15,7 @@ import { SPAN_LINKS_SPAN_ID, TRACE_ID, TRANSACTION_ID, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import type { SpanRaw } from '../../../typings/es_schemas/raw/span_raw'; import type { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; import { getBufferedTimerange } from './utils'; diff --git a/x-pack/plugins/apm/server/routes/span_links/get_linked_parents.ts b/x-pack/plugins/apm/server/routes/span_links/get_linked_parents.ts index 76efb549bc222..2010cd5e86f2f 100644 --- a/x-pack/plugins/apm/server/routes/span_links/get_linked_parents.ts +++ b/x-pack/plugins/apm/server/routes/span_links/get_linked_parents.ts @@ -12,7 +12,7 @@ import { TRACE_ID, TRANSACTION_ID, PROCESSOR_EVENT, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { SpanRaw } from '../../../typings/es_schemas/raw/span_raw'; import { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/span_links/get_span_links_details.ts b/x-pack/plugins/apm/server/routes/span_links/get_span_links_details.ts index c27764e91fbcc..a41fd77e2ce6f 100644 --- a/x-pack/plugins/apm/server/routes/span_links/get_span_links_details.ts +++ b/x-pack/plugins/apm/server/routes/span_links/get_span_links_details.ts @@ -20,7 +20,7 @@ import { SPAN_SUBTYPE, SPAN_TYPE, AGENT_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { Environment } from '../../../common/environment_rt'; import { SpanLinkDetails } from '../../../common/span_links'; import { SpanLink } from '../../../typings/es_schemas/raw/fields/span_links'; diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts b/x-pack/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts index 25a3ad5431fa5..7d6cb304e0547 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts @@ -24,7 +24,7 @@ import { TRANSACTION_SAMPLED, AGENT_NAME, INDEX, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts b/x-pack/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts index 56c7085a1bdc4..e5246d7c45c92 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts @@ -11,11 +11,7 @@ import { termQuery, } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - TIER, - SERVICE_NAME, - INDEX, -} from '../../../common/elasticsearch_fieldnames'; +import { TIER, SERVICE_NAME, INDEX } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getBucketSizeForAggregatedTransactions } from '../../lib/helpers/get_bucket_size_for_aggregated_transactions'; import { diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts b/x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts index 5ed230235f408..e019c563601cb 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts @@ -16,7 +16,7 @@ import { SERVICE_NAME, TIER, INDEX, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts b/x-pack/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts index 23f2146b18060..eb506170966c0 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts @@ -22,11 +22,7 @@ import { indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer_types'; import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { - SERVICE_NAME, - TIER, - INDEX, -} from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, TIER, INDEX } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getDocumentTypeFilterForTransactions, diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts b/x-pack/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts index 1f883adee3f70..b1aa823da569c 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts @@ -13,7 +13,7 @@ import { getProcessorEventForTransactions, getDocumentTypeFilterForTransactions, } from '../../lib/helpers/transactions'; -import { SERVICE_NAME, TIER } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME, TIER } from '../../../common/es_fields/apm'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, diff --git a/x-pack/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts b/x-pack/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts index 856b6bea1b9a5..45f344af0a546 100644 --- a/x-pack/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts +++ b/x-pack/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts @@ -7,7 +7,7 @@ import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { SERVICE_NAME } from '../../../common/elasticsearch_fieldnames'; +import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getSuggestionsWithTermsAggregation({ diff --git a/x-pack/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts b/x-pack/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts index 612039ed0914b..77d42c646d386 100644 --- a/x-pack/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts +++ b/x-pack/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts @@ -18,7 +18,7 @@ import { TRACE_ID, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts b/x-pack/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts index dc9143685902b..6026d3e517cfd 100644 --- a/x-pack/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts +++ b/x-pack/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts @@ -28,7 +28,7 @@ import { SERVICE_NAME, TRANSACTION_TYPE, TRANSACTION_NAME, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { RandomSampler } from '../../lib/helpers/get_random_sampler'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts b/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts index 960924e1aa4b0..31e0d5c292fce 100644 --- a/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts +++ b/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts @@ -17,7 +17,7 @@ import { SPAN_DURATION, TRACE_ID, TRANSACTION_DURATION, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { getLinkedChildrenCountBySpanId } from '../span_links/get_linked_children'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { APMConfig } from '../..'; diff --git a/x-pack/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts b/x-pack/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts index 2e74d104592d7..9a811b00c82b9 100644 --- a/x-pack/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts +++ b/x-pack/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts @@ -19,7 +19,7 @@ import { TRACE_ID, TRANSACTION_ID, TRANSACTION_SAMPLED, -} from '../../../common/elasticsearch_fieldnames'; +} from '../../../common/es_fields/apm'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/transactions/breakdown/index.ts b/x-pack/plugins/apm/server/routes/transactions/breakdown/index.ts index 5630a4c0c475a..74dcf54a30b62 100644 --- a/x-pack/plugins/apm/server/routes/transactions/breakdown/index.ts +++ b/x-pack/plugins/apm/server/routes/transactions/breakdown/index.ts @@ -16,7 +16,7 @@ import { SPAN_SELF_TIME_SUM, TRANSACTION_TYPE, TRANSACTION_NAME, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; import { MAX_KPIS } from './constants'; diff --git a/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts b/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts index be534d877d9fd..5e6176d9f3f90 100644 --- a/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts +++ b/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts @@ -15,7 +15,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; import { environmentQuery } from '../../../../common/utils/environment_query'; diff --git a/x-pack/plugins/apm/server/routes/transactions/get_transaction/index.ts b/x-pack/plugins/apm/server/routes/transactions/get_transaction/index.ts index 9ca077744899e..2ec622ef4c723 100644 --- a/x-pack/plugins/apm/server/routes/transactions/get_transaction/index.ts +++ b/x-pack/plugins/apm/server/routes/transactions/get_transaction/index.ts @@ -7,10 +7,7 @@ import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - TRACE_ID, - TRANSACTION_ID, -} from '../../../../common/elasticsearch_fieldnames'; +import { TRACE_ID, TRANSACTION_ID } from '../../../../common/es_fields/apm'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts b/x-pack/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts index 0f27d37c2b0ab..807c4ef75b58c 100644 --- a/x-pack/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts +++ b/x-pack/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts @@ -6,10 +6,7 @@ */ import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { - TRACE_ID, - PARENT_ID, -} from '../../../../common/elasticsearch_fieldnames'; +import { TRACE_ID, PARENT_ID } from '../../../../common/es_fields/apm'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getRootTransactionByTraceId( diff --git a/x-pack/plugins/apm/server/routes/transactions/trace_samples/index.ts b/x-pack/plugins/apm/server/routes/transactions/trace_samples/index.ts index 9fe3e7ff79335..80cf5fdd4760f 100644 --- a/x-pack/plugins/apm/server/routes/transactions/trace_samples/index.ts +++ b/x-pack/plugins/apm/server/routes/transactions/trace_samples/index.ts @@ -16,7 +16,7 @@ import { TRANSACTION_NAME, TRANSACTION_SAMPLED, TRANSACTION_TYPE, -} from '../../../../common/elasticsearch_fieldnames'; +} from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js index 24ae9b3faa1f1..2e69f52bdf651 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js +++ b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js @@ -187,6 +187,10 @@ module.exports = { ], use: require.resolve('null-loader'), }, + { + test: /\.peggy$/, + use: require.resolve('@kbn/peggy-loader'), + }, ], }, node: { diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts index fb1e93ddbe956..a0f6c8fe0e9bb 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts +++ b/x-pack/plugins/canvas/shareable_runtime/webpack/ci_stats_plugin.ts @@ -11,11 +11,8 @@ import Path from 'path'; import webpack from 'webpack'; import { ToolingLog } from '@kbn/tooling-log'; -import { REPO_ROOT } from '@kbn/utils'; -import normalizePath from 'normalize-path'; import { CiStatsReporter } from '@kbn/ci-stats-reporter'; import { isNormalModule, isConcatenatedModule } from '@kbn/optimizer-webpack-helpers'; -import { RUNTIME_SIZE_LIMIT } from './runtime_size_limit'; const IGNORED_EXTNAME = ['.map', '.br', '.gz']; @@ -91,10 +88,6 @@ export class CiStatsPlugin { group: `canvas shareable runtime`, id: 'total size', value: entry.size, - limit: RUNTIME_SIZE_LIMIT, - limitConfigPath: normalizePath( - Path.relative(REPO_ROOT, require.resolve('./runtime_size_limit')) - ), }, { group: `canvas shareable runtime`, diff --git a/x-pack/plugins/cases/public/common/translations.ts b/x-pack/plugins/cases/public/common/translations.ts index 9748339878222..08f7c0aa4e8d0 100644 --- a/x-pack/plugins/cases/public/common/translations.ts +++ b/x-pack/plugins/cases/public/common/translations.ts @@ -143,8 +143,7 @@ export const COMMENTS = i18n.translate('xpack.cases.allCases.comments', { }); export const TAGS_HELP = i18n.translate('xpack.cases.createCase.fieldTagsHelpText', { - defaultMessage: - 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', + defaultMessage: 'Separate tags with a line break.', }); export const TAGS_EMPTY_ERROR = i18n.translate('xpack.cases.createCase.fieldTagsEmptyError', { @@ -152,7 +151,7 @@ export const TAGS_EMPTY_ERROR = i18n.translate('xpack.cases.createCase.fieldTags }); export const NO_TAGS = i18n.translate('xpack.cases.caseView.noTags', { - defaultMessage: 'No tags are currently assigned to this case.', + defaultMessage: 'No tags are added', }); export const TITLE_REQUIRED = i18n.translate('xpack.cases.createCase.titleFieldRequiredError', { @@ -302,3 +301,17 @@ export const DELETED_CASES = (totalCases: number) => values: { totalCases }, defaultMessage: 'Deleted {totalCases, plural, =1 {case} other {{totalCases} cases}}', }); + +export const ADD_TAG_CUSTOM_OPTION_LABEL = (searchValue: string) => + i18n.translate('xpack.cases.configure.addTagCustomOptionLabel', { + defaultMessage: 'Add {searchValue} as a tag', + values: { searchValue }, + }); + +/** + * EUI checkbox replace {searchValue} with the current + * search value. We need to put the template variable + * searchValue in the string but not replace it + * with i18n. + */ +export const ADD_TAG_CUSTOM_OPTION_LABEL_COMBO_BOX = ADD_TAG_CUSTOM_OPTION_LABEL('{searchValue}'); diff --git a/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.test.tsx b/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.test.tsx index 9eea326ba389b..c18642738b376 100644 --- a/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.test.tsx +++ b/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.test.tsx @@ -237,7 +237,7 @@ describe('EditTagsSelectable', () => { }); }); - it('adds a partial match correctly', async () => { + it('adds a partial match correctly and does not show the no match label', async () => { const result = appMock.render(<EditTagsSelectable {...props} />); /** @@ -252,6 +252,10 @@ describe('EditTagsSelectable', () => { ).toBeInTheDocument(); }); + expect( + result.queryByTestId('cases-actions-tags-edit-selectable-no-match-label') + ).not.toBeInTheDocument(); + const addNewTagButton = result.getByTestId('cases-actions-tags-edit-selectable-add-new-tag'); userEvent.click(addNewTagButton); @@ -275,4 +279,43 @@ describe('EditTagsSelectable', () => { result.queryByTestId('cases-actions-tags-edit-selectable-add-new-tag') ).not.toBeInTheDocument(); }); + + it('does not show the no match label when the initial tags are empty', async () => { + const result = appMock.render(<EditTagsSelectable {...props} tags={[]} />); + + await waitForComponentToUpdate(); + + expect( + result.queryByTestId('cases-actions-tags-edit-selectable-no-match-label') + ).not.toBeInTheDocument(); + }); + + it('shows the no match label when there is no match', async () => { + const result = appMock.render(<EditTagsSelectable {...props} />); + + await userEvent.type(result.getByPlaceholderText('Search'), 'not-exist', { delay: 1 }); + await waitForComponentToUpdate(); + + expect( + result.getByTestId('cases-actions-tags-edit-selectable-no-match-label') + ).toBeInTheDocument(); + }); + + it('shows the no match label and the add new item when there is space in the search term', async () => { + const result = appMock.render(<EditTagsSelectable {...props} />); + + await userEvent.type(result.getByPlaceholderText('Search'), 'test tag', { delay: 1 }); + + await waitFor(() => { + expect( + result.getByTestId('cases-actions-tags-edit-selectable-add-new-tag') + ).toBeInTheDocument(); + }); + + await waitForComponentToUpdate(); + + expect( + result.getByTestId('cases-actions-tags-edit-selectable-no-match-label') + ).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.tsx b/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.tsx index bb7b167814c6b..1bd1ba4b74e88 100644 --- a/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.tsx +++ b/x-pack/plugins/cases/public/components/actions/tags/edit_tags_selectable.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo, useReducer, useState, useEffect } from 'react'; +import React, { useCallback, useMemo, useReducer, useState } from 'react'; import type { EuiSelectableOption, IconType } from '@elastic/eui'; import { EuiSelectable, @@ -17,11 +17,9 @@ import { EuiHorizontalRule, EuiIcon, EuiHighlight, - EuiSelectableListItem, useEuiTheme, } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; import { assertNever } from '@kbn/std'; import { isEmpty } from 'lodash'; import type { Case } from '../../../../common'; @@ -237,29 +235,9 @@ const hasExactMatch = (searchValue: string, options: TagSelectableOption[]) => { return options.some((option) => option.key === searchValue); }; -const AddNewTagItem: React.FC<{ searchValue: string; onNewItem: (newTag: string) => void }> = - React.memo(({ searchValue, onNewItem }) => { - const onNewTagClick = useCallback(() => { - onNewItem(searchValue); - }, [onNewItem, searchValue]); - - return ( - <EuiSelectableListItem - isFocused={false} - showIcons={false} - onClick={onNewTagClick} - data-test-subj="cases-actions-tags-edit-selectable-add-new-tag" - > - <FormattedMessage - id="xpack.cases.actions.tags.newTagMessage" - defaultMessage="Add {searchValue} as a tag" - values={{ searchValue: <b>{searchValue}</b> }} - /> - </EuiSelectableListItem> - ); - }); - -AddNewTagItem.displayName = 'AddNewTagItem'; +const hasPartialMatch = (searchValue: string, options: TagSelectableOption[]) => { + return options.some((option) => option.key?.includes(searchValue)); +}; const EditTagsSelectableComponent: React.FC<Props> = ({ selectedCases, @@ -328,16 +306,6 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ [onChangeTags, state.tags] ); - const onNewItem = useCallback( - (newTag: string) => { - const { selectedTags, unSelectedTags } = getSelectedAndUnselectedTags(options, state.tags); - dispatch({ type: Actions.CHECK_TAG, payload: [newTag] }); - setSearchValue(''); - onChangeTags({ selectedTags: [...selectedTags, newTag], unSelectedTags }); - }, - [onChangeTags, options, state.tags] - ); - const onSelectAll = useCallback(() => { dispatch({ type: Actions.CHECK_TAG, payload: Object.keys(state.tags) }); onChangeTags({ selectedTags: Object.keys(state.tags), unSelectedTags: [] }); @@ -360,25 +328,6 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ setSearchValue(value); }, []); - /** - * TODO: Remove hack when PR https://github.com/elastic/eui/pull/6317 - * is merged and the new fix is merged into Kibana. - * - * This is a hack to force a rerender when - * the user adds a new tag. There is a bug in - * the EuiSelectable where a race condition that's causing the search bar - * to not to match terms with the empty string to trigger the reload. - * This means that when a user press the button to add a tag the - * search bar clears but the options are not shown. - */ - const [_, setRerender] = useState(0); - - useEffect(() => { - if (isEmpty(searchValue)) { - setRerender((x) => x + 1); - } - }, [options, setRerender, searchValue]); - /** * While the user searches we need to add the ability * to add the search term as a new tag. The no matches message @@ -393,8 +342,7 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ return [ { key: searchValue, - searchableLabel: searchValue, - label: `Add ${searchValue} as a tag`, + label: i18n.ADD_TAG_CUSTOM_OPTION_LABEL(searchValue), 'data-test-subj': 'cases-actions-tags-edit-selectable-add-new-tag', data: { tagIcon: 'empty', newItem: true }, }, @@ -409,6 +357,11 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ (tag) => tag.tagState === TagState.CHECKED || tag.tagState === TagState.PARTIAL ).length; + const showNoMatchText = useMemo( + () => !hasPartialMatch(searchValue, options) && Object.keys(state.tags).length > 0, + [options, searchValue, state.tags] + ); + return ( <EuiSelectable options={optionsWithAddNewTagOption} @@ -424,7 +377,8 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ renderOption={renderOption} listProps={{ showIcons: false }} onChange={onChange} - noMatchesMessage={<AddNewTagItem searchValue={searchValue ?? ''} onNewItem={onNewItem} />} + noMatchesMessage={i18n.NO_SEARCH_MATCH} + emptyMessage={i18n.NO_TAGS_AVAILABLE} data-test-subj="cases-actions-tags-edit-selectable" height="full" > @@ -483,6 +437,19 @@ const EditTagsSelectableComponent: React.FC<Props> = ({ </EuiFlexItem> </EuiFlexGroup> <EuiHorizontalRule margin="m" /> + {showNoMatchText ? ( + <EuiText + size="xs" + color="subdued" + textAlign="center" + css={{ + marginBottom: euiTheme.size.s, + }} + data-test-subj="cases-actions-tags-edit-selectable-no-match-label" + > + {i18n.NO_SEARCH_MATCH} + </EuiText> + ) : null} {list} </> )} diff --git a/x-pack/plugins/cases/public/components/actions/tags/translations.ts b/x-pack/plugins/cases/public/components/actions/tags/translations.ts index 61aadf41129a2..a00292ff11cb4 100644 --- a/x-pack/plugins/cases/public/components/actions/tags/translations.ts +++ b/x-pack/plugins/cases/public/components/actions/tags/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -export { CANCEL } from '../../../common/translations'; +export { CANCEL, ADD_TAG_CUSTOM_OPTION_LABEL } from '../../../common/translations'; export const EDIT_TAGS = i18n.translate('xpack.cases.actions.tags.edit', { defaultMessage: 'Edit tags', @@ -51,3 +51,11 @@ export const SELECTED_TAGS = (selectedTags: number) => defaultMessage: 'Selected: {selectedTags}', values: { selectedTags }, }); + +export const NO_TAGS_AVAILABLE = i18n.translate('xpack.cases.actions.tags.noTagsAvailable', { + defaultMessage: 'No tags available. To add a tag, enter it in the query bar', +}); + +export const NO_SEARCH_MATCH = i18n.translate('xpack.cases.actions.tags.noTagsMatch', { + defaultMessage: 'No tags match your search', +}); diff --git a/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.test.tsx b/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.test.tsx index cb49cd3372340..a9ba3ed9cc4f5 100644 --- a/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.test.tsx +++ b/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.test.tsx @@ -193,4 +193,154 @@ describe('useTagsAction', () => { ); }); }); + + it('do not update cases with no changes', async () => { + const updateSpy = jest.spyOn(api, 'updateCases'); + + const { result, waitFor } = renderHook( + () => useTagsAction({ onAction, onActionSuccess, isDisabled: false }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + const action = result.current.getAction([{ ...basicCase, tags: [] }]); + + act(() => { + action.onClick(); + }); + + expect(onAction).toHaveBeenCalled(); + expect(result.current.isFlyoutOpen).toBe(true); + + act(() => { + result.current.onSaveTags({ selectedTags: [], unSelectedTags: ['pepsi'] }); + }); + + await waitFor(() => { + expect(result.current.isFlyoutOpen).toBe(false); + expect(onActionSuccess).not.toHaveBeenCalled(); + expect(updateSpy).not.toHaveBeenCalled(); + }); + }); + + it('do not update if the selected tags are the same but with different order', async () => { + const updateSpy = jest.spyOn(api, 'updateCases'); + + const { result, waitFor } = renderHook( + () => useTagsAction({ onAction, onActionSuccess, isDisabled: false }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + const action = result.current.getAction([{ ...basicCase, tags: ['1', '2'] }]); + + act(() => { + action.onClick(); + }); + + expect(onAction).toHaveBeenCalled(); + expect(result.current.isFlyoutOpen).toBe(true); + + act(() => { + result.current.onSaveTags({ selectedTags: ['2', '1'], unSelectedTags: [] }); + }); + + await waitFor(() => { + expect(result.current.isFlyoutOpen).toBe(false); + expect(onActionSuccess).not.toHaveBeenCalled(); + expect(updateSpy).not.toHaveBeenCalled(); + }); + }); + + it('do not update if the selected tags are the same', async () => { + const updateSpy = jest.spyOn(api, 'updateCases'); + + const { result, waitFor } = renderHook( + () => useTagsAction({ onAction, onActionSuccess, isDisabled: false }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + const action = result.current.getAction([{ ...basicCase, tags: ['1'] }]); + + act(() => { + action.onClick(); + }); + + expect(onAction).toHaveBeenCalled(); + expect(result.current.isFlyoutOpen).toBe(true); + + act(() => { + result.current.onSaveTags({ selectedTags: ['1'], unSelectedTags: [] }); + }); + + await waitFor(() => { + expect(result.current.isFlyoutOpen).toBe(false); + expect(onActionSuccess).not.toHaveBeenCalled(); + expect(updateSpy).not.toHaveBeenCalled(); + }); + }); + + it('do not update if selecting and unselecting the same tag', async () => { + const updateSpy = jest.spyOn(api, 'updateCases'); + + const { result, waitFor } = renderHook( + () => useTagsAction({ onAction, onActionSuccess, isDisabled: false }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + const action = result.current.getAction([{ ...basicCase, tags: ['1'] }]); + + act(() => { + action.onClick(); + }); + + expect(onAction).toHaveBeenCalled(); + expect(result.current.isFlyoutOpen).toBe(true); + + act(() => { + result.current.onSaveTags({ selectedTags: ['1'], unSelectedTags: ['1'] }); + }); + + await waitFor(() => { + expect(result.current.isFlyoutOpen).toBe(false); + expect(onActionSuccess).not.toHaveBeenCalled(); + expect(updateSpy).not.toHaveBeenCalled(); + }); + }); + + it('do not update with empty tags and no selection', async () => { + const updateSpy = jest.spyOn(api, 'updateCases'); + + const { result, waitFor } = renderHook( + () => useTagsAction({ onAction, onActionSuccess, isDisabled: false }), + { + wrapper: appMockRender.AppWrapper, + } + ); + + const action = result.current.getAction([{ ...basicCase, tags: [] }]); + + act(() => { + action.onClick(); + }); + + expect(onAction).toHaveBeenCalled(); + expect(result.current.isFlyoutOpen).toBe(true); + + act(() => { + result.current.onSaveTags({ selectedTags: [], unSelectedTags: [] }); + }); + + await waitFor(() => { + expect(result.current.isFlyoutOpen).toBe(false); + expect(onActionSuccess).not.toHaveBeenCalled(); + expect(updateSpy).not.toHaveBeenCalled(); + }); + }); }); diff --git a/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.tsx b/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.tsx index b8c2506cdb99c..4711eb31830ec 100644 --- a/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.tsx +++ b/x-pack/plugins/cases/public/components/actions/tags/use_tags_action.tsx @@ -7,7 +7,8 @@ import { EuiIcon } from '@elastic/eui'; import React, { useCallback, useState } from 'react'; -import { difference } from 'lodash'; +import { difference, isEqual } from 'lodash'; +import type { CaseUpdateRequest } from '../../../../common/ui'; import { useUpdateCases } from '../../../containers/use_bulk_update_case'; import type { Case } from '../../../../common'; import { useCasesContext } from '../../cases_context/use_cases_context'; @@ -33,20 +34,32 @@ export const useTagsAction = ({ onAction, onActionSuccess, isDisabled }: UseActi [onAction] ); + const areTagsEqual = (originalTags: Set<string>, tagsToUpdate: Set<string>): boolean => { + return isEqual(originalTags, tagsToUpdate); + }; + const onSaveTags = useCallback( (tagsSelection: TagsSelectionState) => { onAction(); onFlyoutClosed(); - const casesToUpdate = selectedCasesToEditTags.map((theCase) => { - const tags = difference(theCase.tags, tagsSelection.unSelectedTags); - const uniqueTags = new Set([...tags, ...tagsSelection.selectedTags]); - return { - tags: Array.from(uniqueTags.values()), - id: theCase.id, - version: theCase.version, - }; - }); + const casesToUpdate = selectedCasesToEditTags.reduce((acc, theCase) => { + const tagsWithoutUnselectedTags = difference(theCase.tags, tagsSelection.unSelectedTags); + const uniqueTags = new Set([...tagsWithoutUnselectedTags, ...tagsSelection.selectedTags]); + + if (areTagsEqual(new Set([...theCase.tags]), uniqueTags)) { + return acc; + } + + return [ + ...acc, + { + tags: Array.from(uniqueTags.values()), + id: theCase.id, + version: theCase.version, + }, + ]; + }, [] as CaseUpdateRequest[]); updateCases( { diff --git a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx index d34997ca5796e..6ab3cbe898547 100644 --- a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx @@ -23,8 +23,7 @@ import { jest.mock('../../containers/api'); -// FLAKY: https://github.com/elastic/kibana/issues/144660 -describe.skip('useActions', () => { +describe('useActions', () => { let appMockRender: AppMockRenderer; beforeEach(() => { @@ -97,7 +96,9 @@ describe.skip('useActions', () => { }); act(() => { - userEvent.click(res.getByTestId(`case-action-status-panel-${basicCase.id}`)); + userEvent.click(res.getByTestId(`case-action-status-panel-${basicCase.id}`), undefined, { + skipPointerEventsCheck: true, + }); }); await waitFor(() => { diff --git a/x-pack/plugins/cases/public/components/case_view/components/assign_users.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/assign_users.test.tsx index b14e52c9e51dc..2f90aff69c60e 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/assign_users.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/assign_users.test.tsx @@ -46,7 +46,7 @@ describe('AssignUsers', () => { it('does not show any assignees when there are none assigned', () => { appMockRender.render(<AssignUsers {...defaultProps} />); - expect(screen.getByText('No users have been assigned.')).toBeInTheDocument(); + expect(screen.getByText('No users are assigned')).toBeInTheDocument(); }); it('does not show the suggest users edit button when the user does not have update permissions', () => { @@ -95,7 +95,7 @@ describe('AssignUsers', () => { expect(screen.getByText('Damaged Raccoon')).toBeInTheDocument(); expect(screen.getByText('Physical Dinosaur')).toBeInTheDocument(); expect(screen.queryByText('Wet Dingo')).not.toBeInTheDocument(); - expect(screen.queryByText('No users have been assigned.')).not.toBeInTheDocument(); + expect(screen.queryByText('No users are assigned')).not.toBeInTheDocument(); expect(screen.queryByTestId('case-view-assignees-loading')).not.toBeInTheDocument(); }); @@ -112,7 +112,7 @@ describe('AssignUsers', () => { expect(screen.getByText('Damaged Raccoon')).toBeInTheDocument(); expect(screen.getByText('Physical Dinosaur')).toBeInTheDocument(); expect(screen.queryByText('Wet Dingo')).not.toBeInTheDocument(); - expect(screen.queryByText('No users have been assigned.')).not.toBeInTheDocument(); + expect(screen.queryByText('No users are assigned')).not.toBeInTheDocument(); expect(screen.queryByTestId('case-view-assignees-loading')).not.toBeInTheDocument(); }); diff --git a/x-pack/plugins/cases/public/components/case_view/components/edit_tags.tsx b/x-pack/plugins/cases/public/components/case_view/components/edit_tags.tsx index 2f8567d14f08d..a221a43b92ded 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/edit_tags.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/edit_tags.tsx @@ -147,6 +147,7 @@ export const EditTags = React.memo(({ isLoading, onSubmit, tags }: EditTagsProps placeholder: '', options, noSuggestions: false, + customOptionText: i18n.ADD_TAG_CUSTOM_OPTION_LABEL_COMBO_BOX, }, }} /> diff --git a/x-pack/plugins/cases/public/components/case_view/translations.ts b/x-pack/plugins/cases/public/components/case_view/translations.ts index c4d0020aa7107..d71c56fc97fca 100644 --- a/x-pack/plugins/cases/public/components/case_view/translations.ts +++ b/x-pack/plugins/cases/public/components/case_view/translations.ts @@ -186,7 +186,7 @@ export const EDIT_ASSIGNEES_ARIA_LABEL = i18n.translate( ); export const NO_ASSIGNEES = i18n.translate('xpack.cases.caseView.noAssignees', { - defaultMessage: 'No users have been assigned.', + defaultMessage: 'No users are assigned', }); export const ASSIGN_A_USER = i18n.translate('xpack.cases.caseView.assignUser', { diff --git a/x-pack/plugins/cases/public/components/create/form_context.test.tsx b/x-pack/plugins/cases/public/components/create/form_context.test.tsx index 65a350679a8c5..3c0599613cdd1 100644 --- a/x-pack/plugins/cases/public/components/create/form_context.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form_context.test.tsx @@ -138,7 +138,8 @@ const waitForFormToRender = async (renderer: Screen) => { }); }; -describe('Create case', () => { +// FLAKY: https://github.com/elastic/kibana/issues/142284 +describe.skip('Create case', () => { const refetch = jest.fn(); const onFormSubmitSuccess = jest.fn(); const afterCaseCreated = jest.fn(); @@ -446,7 +447,9 @@ describe('Create case', () => { }); }); - describe('Step 2 - Connector Fields', () => { + // FLAKY: https://github.com/elastic/kibana/issues/143407 + // FLAKY: https://github.com/elastic/kibana/issues/142282 + describe.skip('Step 2 - Connector Fields', () => { it(`should submit and push to Jira connector`, async () => { useGetConnectorsMock.mockReturnValue({ ...sampleConnectorData, diff --git a/x-pack/plugins/cases/public/components/create/tags.tsx b/x-pack/plugins/cases/public/components/create/tags.tsx index 6bae6015e769b..f3d4319dfea37 100644 --- a/x-pack/plugins/cases/public/components/create/tags.tsx +++ b/x-pack/plugins/cases/public/components/create/tags.tsx @@ -10,6 +10,7 @@ import React, { memo, useMemo } from 'react'; import { getUseField } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import { Field } from '@kbn/es-ui-shared-plugin/static/forms/components'; import { useGetTags } from '../../containers/use_get_tags'; +import * as i18n from './translations'; const CommonUseField = getUseField({ component: Field }); @@ -39,6 +40,7 @@ const TagsComponent: React.FC<Props> = ({ isLoading }) => { disabled: isLoading || isLoadingTags, options, noSuggestions: false, + customOptionText: i18n.ADD_TAG_CUSTOM_OPTION_LABEL_COMBO_BOX, }, }} /> diff --git a/x-pack/plugins/cases/public/containers/api.test.tsx b/x-pack/plugins/cases/public/containers/api.test.tsx index d7f522358e5bd..b06befcc54929 100644 --- a/x-pack/plugins/cases/public/containers/api.test.tsx +++ b/x-pack/plugins/cases/public/containers/api.test.tsx @@ -75,7 +75,7 @@ describe('Cases API', () => { }); const data = ['1', '2']; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await deleteCases(data, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}`, { method: 'DELETE', @@ -84,7 +84,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await deleteCases(data, abortCtrl.signal); expect(resp).toEqual(''); }); @@ -96,7 +96,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(actionLicenses); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await getActionLicense(abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`/api/actions/connector_types`, { method: 'GET', @@ -104,7 +104,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await getActionLicense(abortCtrl.signal); expect(resp).toEqual(actionLicenses); }); @@ -117,7 +117,7 @@ describe('Cases API', () => { }); const data = basicCase.id; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await getCase(data, true, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}/${basicCase.id}`, { method: 'GET', @@ -126,12 +126,12 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await getCase(data, true, abortCtrl.signal); expect(resp).toEqual(basicCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await getCase(data, true, abortCtrl.signal); expect(resp).toEqual(caseWithRegisteredAttachments); @@ -151,7 +151,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue({ ...basicResolveCase, target_alias_id: targetAliasId }); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await resolveCase(caseId, true, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}/${caseId}/resolve`, { method: 'GET', @@ -160,12 +160,12 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await resolveCase(caseId, true, abortCtrl.signal); expect(resp).toEqual({ ...basicResolveCase, case: basicCase, targetAliasId }); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue({ ...basicResolveCase, case: caseWithRegisteredAttachmentsSnake, @@ -187,7 +187,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(allCasesSnake); }); - test('should be called with correct check url, method, signal with empty defaults', async () => { + it('should be called with correct check url, method, signal with empty defaults', async () => { await getCases({ filterOptions: DEFAULT_FILTER_OPTIONS, queryParams: DEFAULT_QUERY_PARAMS, @@ -204,7 +204,7 @@ describe('Cases API', () => { }); }); - test('should applies correct all filters', async () => { + it('should applies correct all filters', async () => { await getCases({ filterOptions: { searchFields: DEFAULT_FILTER_OPTIONS.searchFields, @@ -237,7 +237,7 @@ describe('Cases API', () => { }); }); - test('should apply the severity field correctly (with severity value)', async () => { + it('should apply the severity field correctly (with severity value)', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -258,7 +258,7 @@ describe('Cases API', () => { }); }); - test('should not send the severity field with "all" severity value', async () => { + it('should not send the severity field with "all" severity value', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -278,7 +278,7 @@ describe('Cases API', () => { }); }); - test('should apply the severity field correctly (with status value)', async () => { + it('should apply the severity field correctly (with status value)', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -299,7 +299,7 @@ describe('Cases API', () => { }); }); - test('should not send the severity field with "all" status value', async () => { + it('should not send the severity field with "all" status value', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -319,7 +319,7 @@ describe('Cases API', () => { }); }); - test('should not send the assignees field if it an empty array', async () => { + it('should not send the assignees field if it an empty array', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -339,7 +339,7 @@ describe('Cases API', () => { }); }); - test('should convert a single null value to none', async () => { + it('should convert a single null value to none', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -360,7 +360,7 @@ describe('Cases API', () => { }); }); - test('should converts null value in the array to none', async () => { + it('should converts null value in the array to none', async () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, @@ -381,7 +381,7 @@ describe('Cases API', () => { }); }); - test('should handle tags with weird chars', async () => { + it('should handle tags with weird chars', async () => { const weirdTags: string[] = ['(', '"double"']; await getCases({ @@ -414,7 +414,7 @@ describe('Cases API', () => { }); }); - test('should return correct response and not covert to camel case registered attachments', async () => { + it('should return correct response and not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(allCasesSnake); const resp = await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, owner: [SECURITY_SOLUTION_OWNER] }, @@ -433,7 +433,7 @@ describe('Cases API', () => { fetchMock.mockClear(); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await getCasesStatus({ http, signal: abortCtrl.signal, @@ -446,7 +446,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await getCasesStatus({ http, signal: abortCtrl.signal, @@ -463,7 +463,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(caseUserActionsSnake); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await getCaseUserActions(basicCase.id, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}/${basicCase.id}/user_actions`, { method: 'GET', @@ -471,12 +471,12 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await getCaseUserActions(basicCase.id, abortCtrl.signal); expect(resp).toEqual(caseUserActions); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseUserActionsWithRegisteredAttachmentsSnake); const resp = await getCaseUserActions(basicCase.id, abortCtrl.signal); expect(resp).toEqual(caseUserActionsWithRegisteredAttachments); @@ -489,7 +489,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(tags); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await getTags(abortCtrl.signal, [SECURITY_SOLUTION_OWNER]); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}/tags`, { method: 'GET', @@ -500,7 +500,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await getTags(abortCtrl.signal, [SECURITY_SOLUTION_OWNER]); expect(resp).toEqual(tags); }); @@ -514,7 +514,7 @@ describe('Cases API', () => { const data = { description: 'updated description' }; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await patchCase(basicCase.id, data, basicCase.version, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}`, { @@ -526,7 +526,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await patchCase( basicCase.id, { description: 'updated description' }, @@ -537,7 +537,7 @@ describe('Cases API', () => { expect(resp).toEqual([basicCase]); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue([caseWithRegisteredAttachmentsSnake]); const resp = await patchCase( basicCase.id, @@ -564,7 +564,7 @@ describe('Cases API', () => { }, ]; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await updateCases(data, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}`, { method: 'PATCH', @@ -573,10 +573,15 @@ describe('Cases API', () => { }); }); - test('should return correct response should not covert to camel case registered attachments', async () => { + it('should return correct response should not covert to camel case registered attachments', async () => { const resp = await updateCases(data, abortCtrl.signal); expect(resp).toEqual(cases); }); + + it('returns an empty array if the cases are empty', async () => { + const resp = await updateCases([], abortCtrl.signal); + expect(resp).toEqual([]); + }); }); describe('patchComment', () => { @@ -585,7 +590,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(basicCaseSnake); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await patchComment({ caseId: basicCase.id, commentId: basicCase.comments[0].id, @@ -608,7 +613,7 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await patchComment({ caseId: basicCase.id, commentId: basicCase.comments[0].id, @@ -620,7 +625,7 @@ describe('Cases API', () => { expect(resp).toEqual(basicCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await patchComment({ @@ -657,7 +662,7 @@ describe('Cases API', () => { owner: SECURITY_SOLUTION_OWNER, }; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await postCase(data, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}`, { method: 'POST', @@ -666,12 +671,12 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await postCase(data, abortCtrl.signal); expect(resp).toEqual(basicCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await postCase(data, abortCtrl.signal); expect(resp).toEqual(caseWithRegisteredAttachments); @@ -701,7 +706,7 @@ describe('Cases API', () => { }, ]; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await createAttachments(data, basicCase.id, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith( INTERNAL_BULK_CREATE_ATTACHMENTS_URL.replace('{case_id}', basicCase.id), @@ -713,12 +718,12 @@ describe('Cases API', () => { ); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await createAttachments(data, basicCase.id, abortCtrl.signal); expect(resp).toEqual(basicCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await createAttachments(data, basicCase.id, abortCtrl.signal); expect(resp).toEqual(caseWithRegisteredAttachments); @@ -733,7 +738,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(pushedCaseSnake); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await pushCase(basicCase.id, connectorId, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith( `${CASES_URL}/${basicCase.id}/connector/${connectorId}/_push`, @@ -745,12 +750,12 @@ describe('Cases API', () => { ); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await pushCase(basicCase.id, connectorId, abortCtrl.signal); expect(resp).toEqual(pushedCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await pushCase(basicCase.id, connectorId, abortCtrl.signal); expect(resp).toEqual(caseWithRegisteredAttachments); @@ -764,7 +769,7 @@ describe('Cases API', () => { }); const commentId = 'ab1234'; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { const resp = await deleteComment({ caseId: basicCaseId, commentId, @@ -784,7 +789,7 @@ describe('Cases API', () => { fetchMock.mockResolvedValue(['siem', 'observability']); }); - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { const resp = await getFeatureIds( { registrationContext: ['security', 'observability.logs'] }, abortCtrl.signal @@ -811,7 +816,7 @@ describe('Cases API', () => { owner: SECURITY_SOLUTION_OWNER, }; - test('should be called with correct check url, method, signal', async () => { + it('should be called with correct check url, method, signal', async () => { await postComment(data, basicCase.id, abortCtrl.signal); expect(fetchMock).toHaveBeenCalledWith(`${CASES_URL}/${basicCase.id}/comments`, { @@ -821,12 +826,12 @@ describe('Cases API', () => { }); }); - test('should return correct response', async () => { + it('should return correct response', async () => { const resp = await postComment(data, basicCase.id, abortCtrl.signal); expect(resp).toEqual(basicCase); }); - test('should not covert to camel case registered attachments', async () => { + it('should not covert to camel case registered attachments', async () => { fetchMock.mockResolvedValue(caseWithRegisteredAttachmentsSnake); const resp = await postComment(data, basicCase.id, abortCtrl.signal); expect(resp).toEqual(caseWithRegisteredAttachments); diff --git a/x-pack/plugins/cases/public/containers/api.ts b/x-pack/plugins/cases/public/containers/api.ts index 651de220ded2b..b31bc0e65446c 100644 --- a/x-pack/plugins/cases/public/containers/api.ts +++ b/x-pack/plugins/cases/public/containers/api.ts @@ -231,6 +231,10 @@ export const updateCases = async ( cases: CaseUpdateRequest[], signal: AbortSignal ): Promise<Case[]> => { + if (cases.length === 0) { + return []; + } + const response = await KibanaServices.get().http.fetch<CasesResponse>(CASES_URL, { method: 'PATCH', body: JSON.stringify({ cases }), diff --git a/x-pack/plugins/cases/public/containers/translations.ts b/x-pack/plugins/cases/public/containers/translations.ts index 5bf4acf385fce..892af5864cdc3 100644 --- a/x-pack/plugins/cases/public/containers/translations.ts +++ b/x-pack/plugins/cases/public/containers/translations.ts @@ -17,6 +17,10 @@ export const ERROR_DELETING = i18n.translate('xpack.cases.containers.errorDeleti defaultMessage: 'Error deleting data', }); +export const ERROR_UPDATING = i18n.translate('xpack.cases.containers.errorUpdatingTitle', { + defaultMessage: 'Error updating data', +}); + export const UPDATED_CASE = (caseTitle: string) => i18n.translate('xpack.cases.containers.updatedCase', { values: { caseTitle }, diff --git a/x-pack/plugins/cases/public/containers/use_bulk_update_case.tsx b/x-pack/plugins/cases/public/containers/use_bulk_update_case.tsx index 85a5a743d16d3..81af102cac652 100644 --- a/x-pack/plugins/cases/public/containers/use_bulk_update_case.tsx +++ b/x-pack/plugins/cases/public/containers/use_bulk_update_case.tsx @@ -37,7 +37,7 @@ export const useUpdateCases = () => { showSuccessToast(successToasterTitle); }, onError: (error: ServerError) => { - showErrorToast(error, { title: i18n.ERROR_DELETING }); + showErrorToast(error, { title: i18n.ERROR_UPDATING }); }, } ); diff --git a/x-pack/plugins/cases/server/services/notifications/email_notification_service.test.ts b/x-pack/plugins/cases/server/services/notifications/email_notification_service.test.ts index 84ac5283067f6..199ef6e227820 100644 --- a/x-pack/plugins/cases/server/services/notifications/email_notification_service.test.ts +++ b/x-pack/plugins/cases/server/services/notifications/email_notification_service.test.ts @@ -51,7 +51,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -74,7 +74,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -102,7 +102,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['physical_dinosaur@elastic.co'], }); @@ -125,7 +125,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -156,7 +156,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/s/test-space/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/s/test-space/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -186,7 +186,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -209,7 +209,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: one, two\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: one, two\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); @@ -232,7 +232,7 @@ describe('EmailNotificationService', () => { ], }, message: - 'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', + 'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)', subject: '[Elastic][Cases] Super Bad Security Issue', to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'], }); diff --git a/x-pack/plugins/cases/server/services/notifications/email_notification_service.ts b/x-pack/plugins/cases/server/services/notifications/email_notification_service.ts index fc7458c7453ba..2800a248b1394 100644 --- a/x-pack/plugins/cases/server/services/notifications/email_notification_service.ts +++ b/x-pack/plugins/cases/server/services/notifications/email_notification_service.ts @@ -56,7 +56,7 @@ export class EmailNotificationService implements NotificationService { publicBaseUrl?: IBasePath['publicBaseUrl'] ) { const lineBreak = '\r\n\r\n'; - let message = `You are assigned to an Elastic Kibana Case.${lineBreak}`; + let message = `You are assigned to an Elastic Case.${lineBreak}`; message = `${message}Title: ${theCase.attributes.title}${lineBreak}`; message = `${message}Status: ${theCase.attributes.status}${lineBreak}`; message = `${message}Severity: ${theCase.attributes.severity}${lineBreak}`; diff --git a/x-pack/plugins/cloud_security_posture/public/application/constants.tsx b/x-pack/plugins/cloud_security_posture/public/application/constants.tsx deleted file mode 100644 index a1a5785286604..0000000000000 --- a/x-pack/plugins/cloud_security_posture/public/application/constants.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { RouteProps } from 'react-router-dom'; -import type { CspPage } from '../common/navigation/types'; -import * as pages from '../pages'; - -export const pageToComponentMapping: Record<CspPage, RouteProps['component']> = { - findings: pages.Findings, - dashboard: pages.ComplianceDashboard, - benchmarks: pages.Benchmarks, - rules: pages.Rules, -}; diff --git a/x-pack/plugins/cloud_security_posture/public/application/csp_route.tsx b/x-pack/plugins/cloud_security_posture/public/application/csp_route.tsx new file mode 100644 index 0000000000000..7d0197fe0eed7 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/application/csp_route.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { Route, type RouteProps } from 'react-router-dom'; +import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; +import { cloudPosturePages } from '../common/navigation/constants'; +import { useSecuritySolutionContext } from './security_solution_context'; +import type { CspPageNavigationItem } from '../common/navigation/types'; + +type CspRouteProps = Omit<RouteProps, 'render'> & CspPageNavigationItem; + +// Security SpyRoute can be automatically rendered for pages with static paths, Security will manage everything using the `links` object. +// Pages with dynamic paths are not in the Security `links` object, they must render SpyRoute with the parameters values, if needed. +const STATIC_PATH_PAGE_IDS = Object.fromEntries( + Object.values(cloudPosturePages).map(({ id }) => [id, true]) +); + +export const CspRoute: React.FC<CspRouteProps> = ({ + id, + children, + component: Component, + disabled = false, + ...cspRouteProps +}) => { + const SpyRoute = useSecuritySolutionContext()?.getSpyRouteComponent(); + + if (disabled) { + return null; + } + + const routeProps: RouteProps = { + ...cspRouteProps, + ...(Component && { + render: (renderProps) => ( + <TrackApplicationView viewId={id}> + {STATIC_PATH_PAGE_IDS[id] && SpyRoute && <SpyRoute pageName={id} />} + <Component {...renderProps} /> + </TrackApplicationView> + ), + }), + }; + + return <Route {...routeProps}>{children}</Route>; +}; diff --git a/x-pack/plugins/cloud_security_posture/public/application/csp_router.test.tsx b/x-pack/plugins/cloud_security_posture/public/application/csp_router.test.tsx index 4ecc050ab88bc..36499b4d72baa 100644 --- a/x-pack/plugins/cloud_security_posture/public/application/csp_router.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/application/csp_router.test.tsx @@ -4,63 +4,132 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { getRoutesFromMapping, addSpyRouteComponentToRoute } from './csp_router'; +import CspRouter from './csp_router'; import React from 'react'; -import Chance from 'chance'; -import { render, screen } from '@testing-library/react'; -import type { RouteComponentProps } from 'react-router-dom'; -import type { CloudSecurityPosturePageId } from '../common/navigation/types'; -import { createPageNavigationItemFixture } from '../test/fixtures/navigation_item'; - -const chance = new Chance(); -const DummyComponent = () => null; - -describe('getRoutesFromMapping', () => { - it('should map routes', () => { - const pageId = chance.word(); - const navigationItems = { [pageId]: createPageNavigationItemFixture() }; - const routesMapping = { [pageId]: DummyComponent }; - const routes = getRoutesFromMapping(navigationItems, routesMapping); - - expect(routes).toHaveLength(1); - expect(routes[0]).toMatchObject({ - path: navigationItems[pageId].path, - component: DummyComponent, +import { render } from '@testing-library/react'; +import { Router } from 'react-router-dom'; +import type { CspPage, CspPageNavigationItem } from '../common/navigation/types'; +import { CspSecuritySolutionContext } from '../types'; +import { createMemoryHistory, MemoryHistory } from 'history'; +import * as constants from '../common/navigation/constants'; +import { QueryClientProviderProps } from '@tanstack/react-query'; + +jest.mock('../pages', () => ({ + Findings: () => <div data-test-subj="Findings">Findings</div>, + ComplianceDashboard: () => <div data-test-subj="ComplianceDashboard">ComplianceDashboard</div>, + Rules: () => <div data-test-subj="Rules">Rules</div>, + Benchmarks: () => <div data-test-subj="Benchmarks">Benchmarks</div>, +})); + +jest.mock('@tanstack/react-query', () => ({ + QueryClientProvider: ({ children }: QueryClientProviderProps) => <>{children}</>, + QueryClient: jest.fn(), +})); + +describe('CspRouter', () => { + const originalCloudPosturePages = { ...constants.cloudPosturePages }; + const mockConstants = constants as { cloudPosturePages: Record<CspPage, CspPageNavigationItem> }; + + const securityContext: CspSecuritySolutionContext = { + getFiltersGlobalComponent: jest.fn(), + getSpyRouteComponent: () => () => <div data-test-subj="mockedSpyRoute" />, + }; + + let history: MemoryHistory; + + const renderCspRouter = () => + render( + <Router history={history}> + <CspRouter securitySolutionContext={securityContext} /> + </Router> + ); + + beforeEach(() => { + mockConstants.cloudPosturePages = originalCloudPosturePages; + jest.clearAllMocks(); + history = createMemoryHistory(); + }); + + describe('happy path', () => { + it('should render Findings', () => { + history.push('/cloud_security_posture/findings'); + const result = renderCspRouter(); + + expect(result.queryByTestId('Findings')).toBeInTheDocument(); + expect(result.queryByTestId('ComplianceDashboard')).not.toBeInTheDocument(); + expect(result.queryByTestId('Benchmarks')).not.toBeInTheDocument(); + expect(result.queryByTestId('Rules')).not.toBeInTheDocument(); + }); + + it('should render Dashboards', () => { + history.push('/cloud_security_posture/dashboard'); + const result = renderCspRouter(); + + expect(result.queryByTestId('ComplianceDashboard')).toBeInTheDocument(); + expect(result.queryByTestId('Findings')).not.toBeInTheDocument(); + expect(result.queryByTestId('Benchmarks')).not.toBeInTheDocument(); + expect(result.queryByTestId('Rules')).not.toBeInTheDocument(); + }); + + it('should render Benchmarks', () => { + history.push('/cloud_security_posture/benchmarks'); + const result = renderCspRouter(); + + expect(result.queryByTestId('Benchmarks')).toBeInTheDocument(); + expect(result.queryByTestId('Findings')).not.toBeInTheDocument(); + expect(result.queryByTestId('ComplianceDashboard')).not.toBeInTheDocument(); + expect(result.queryByTestId('Rules')).not.toBeInTheDocument(); + }); + + it('should render Rules', () => { + history.push('/cloud_security_posture/benchmarks/packagePolicyId/policyId/rules'); + const result = renderCspRouter(); + + expect(result.queryByTestId('Rules')).toBeInTheDocument(); + expect(result.queryByTestId('Findings')).not.toBeInTheDocument(); + expect(result.queryByTestId('ComplianceDashboard')).not.toBeInTheDocument(); + expect(result.queryByTestId('Benchmarks')).not.toBeInTheDocument(); }); }); - it('should not map routes where the navigation item is disabled', () => { - const pageId = chance.word(); - const navigationItems = { [pageId]: createPageNavigationItemFixture({ disabled: true }) }; - const routesMapping = { [pageId]: DummyComponent }; - const routes = getRoutesFromMapping(navigationItems, routesMapping); + describe('unhappy path', () => { + it('should redirect base path to dashboard', () => { + history.push('/cloud_security_posture/some_wrong_path'); + const result = renderCspRouter(); - expect(routes).toHaveLength(0); + expect(history.location.pathname).toEqual('/cloud_security_posture/dashboard'); + expect(result.queryByTestId('ComplianceDashboard')).toBeInTheDocument(); + }); }); -}); -describe('addSpyRouteComponentToRoute', () => { - it('should add the spy route component to a csp route', () => { - const pageNameForRoute = chance.pickone<CloudSecurityPosturePageId>([ - 'cloud_security_posture-dashboard', - 'cloud_security_posture-findings', - 'cloud_security_posture-benchmarks', - 'cloud_security_posture-rules', - ]); - - // Create a mock SpyRoute component that renders the page name as a test ID - const SpyRouteMock = ({ pageName }: { pageName?: string }) => <div data-test-subj={pageName} />; - const mockRouteComponentTestId = chance.word(); - const MockRouteComponent = () => <div data-test-subj={mockRouteComponentTestId} />; - const route = { id: pageNameForRoute, path: chance.word(), component: MockRouteComponent }; - const routeWithSpyRoute = addSpyRouteComponentToRoute(route, SpyRouteMock); - - expect(routeWithSpyRoute.render).toEqual(expect.any(Function)); - - render(<div>{routeWithSpyRoute.render!({} as unknown as RouteComponentProps)}</div>); - - expect(routeWithSpyRoute.component).toBeUndefined(); - expect(screen.getByTestId(mockRouteComponentTestId)).toBeInTheDocument(); - expect(screen.getByTestId(pageNameForRoute)).toBeInTheDocument(); + describe('CspRoute', () => { + it('should not render disabled path', () => { + mockConstants.cloudPosturePages = { + ...constants.cloudPosturePages, + benchmarks: { + ...constants.cloudPosturePages.benchmarks, + disabled: true, + }, + }; + + history.push('/cloud_security_posture/benchmarks'); + const result = renderCspRouter(); + + expect(result.queryByTestId('ComplianceDashboard')).not.toBeInTheDocument(); + }); + + it('should render SpyRoute for static paths', () => { + history.push('/cloud_security_posture/benchmarks'); + const result = renderCspRouter(); + + expect(result.queryByTestId('mockedSpyRoute')).toBeInTheDocument(); + }); + + it('should not render SpyRoute for dynamic paths', () => { + history.push('/cloud_security_posture/benchmarks/packagePolicyId/policyId/rules'); + const result = renderCspRouter(); + + expect(result.queryByTestId('mockedSpyRoute')).not.toBeInTheDocument(); + }); }); }); diff --git a/x-pack/plugins/cloud_security_posture/public/application/csp_router.tsx b/x-pack/plugins/cloud_security_posture/public/application/csp_router.tsx index bfb9cb12ae5c3..0522a82c9cd64 100644 --- a/x-pack/plugins/cloud_security_posture/public/application/csp_router.tsx +++ b/x-pack/plugins/cloud_security_posture/public/application/csp_router.tsx @@ -7,81 +7,39 @@ import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { Redirect, Route, RouteComponentProps, type RouteProps, Switch } from 'react-router-dom'; -import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { CLOUD_SECURITY_POSTURE_BASE_PATH, type CspSecuritySolutionContext } from '..'; -import { cloudPosturePages } from '../common/navigation/constants'; -import type { CloudSecurityPosturePageId, CspPageNavigationItem } from '../common/navigation/types'; -import { pageToComponentMapping } from './constants'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { benchmarksNavigation, cloudPosturePages } from '../common/navigation/constants'; +import type { CspSecuritySolutionContext } from '..'; import { SecuritySolutionContext } from './security_solution_context'; - -type CspRouteProps = RouteProps & { - path: string; - id: CloudSecurityPosturePageId; -}; +import * as pages from '../pages'; +import { CspRoute } from './csp_route'; const queryClient = new QueryClient({ defaultOptions: { queries: { refetchOnWindowFocus: false } }, }); -// Converts the mapping of page -> component to be of type `RouteProps` while filtering out disabled navigation items -export const getRoutesFromMapping = <T extends string>( - navigationItems: Record<T, CspPageNavigationItem>, - componentMapping: Record<T, RouteProps['component']> -): readonly CspRouteProps[] => - Object.entries(componentMapping) - .filter(([key]) => !navigationItems[key as T].disabled) - .map<CspRouteProps>(([key, component]) => ({ - ...navigationItems[key as T], - component: component as CspRouteProps['component'], - })); - -// Adds the `SpyRoute` component from the security solution plugin to a CSP route -export const addSpyRouteComponentToRoute = ( - route: CspRouteProps, - SpyRoute: ReturnType<CspSecuritySolutionContext['getSpyRouteComponent']> -): CspRouteProps => { - const Component = route.component; - if (!Component) { - return route; - } - - const newRoute = { - ...route, - render: (props: RouteComponentProps) => ( - <> - <SpyRoute pageName={route.id} /> - <TrackApplicationView viewId={route.id}> - <Component {...props} /> - </TrackApplicationView> - </> - ), - }; - - delete newRoute.component; - return newRoute; -}; - -const securitySolutionRoutes = getRoutesFromMapping(cloudPosturePages, pageToComponentMapping); - /** Props for the cloud security posture router component */ export interface CspRouterProps { securitySolutionContext?: CspSecuritySolutionContext; } export const CspRouter = ({ securitySolutionContext }: CspRouterProps) => { - const SpyRoute = securitySolutionContext - ? securitySolutionContext.getSpyRouteComponent() - : undefined; - const routerElement = ( <QueryClientProvider client={queryClient}> <Switch> - {securitySolutionRoutes.map((route) => { - const routeProps = SpyRoute ? addSpyRouteComponentToRoute(route, SpyRoute) : route; - return <Route key={routeProps.path} {...routeProps} />; - })} - <Route exact path={CLOUD_SECURITY_POSTURE_BASE_PATH} component={RedirectToDashboard} /> + <CspRoute {...cloudPosturePages.findings} component={pages.Findings} /> + <CspRoute {...cloudPosturePages.dashboard} component={pages.ComplianceDashboard} /> + + <CspRoute {...cloudPosturePages.benchmarks}> + <Switch> + <CspRoute {...benchmarksNavigation.rules} component={pages.Rules} /> + <CspRoute {...cloudPosturePages.benchmarks} component={pages.Benchmarks} /> + </Switch> + </CspRoute> + + <Route> + <Redirect to={cloudPosturePages.dashboard.path} /> + </Route> </Switch> </QueryClientProvider> ); @@ -97,8 +55,6 @@ export const CspRouter = ({ securitySolutionContext }: CspRouterProps) => { return <>{routerElement}</>; }; -const RedirectToDashboard = () => <Redirect to={cloudPosturePages.dashboard.path} />; - // Using a default export for usage with `React.lazy` // eslint-disable-next-line import/no-default-export export { CspRouter as default }; diff --git a/x-pack/plugins/cloud_security_posture/public/application/security_solution_context.ts b/x-pack/plugins/cloud_security_posture/public/application/security_solution_context.ts index e34d77ec6c452..2149999b8a2f3 100644 --- a/x-pack/plugins/cloud_security_posture/public/application/security_solution_context.ts +++ b/x-pack/plugins/cloud_security_posture/public/application/security_solution_context.ts @@ -4,9 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import React, { useContext } from 'react'; import type { CspSecuritySolutionContext } from '../types'; export const SecuritySolutionContext = React.createContext<CspSecuritySolutionContext | undefined>( undefined ); + +export const useSecuritySolutionContext = () => { + return useContext(SecuritySolutionContext); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts index 3a3bbf869da1e..7de2479600074 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { CspPage, CspPageNavigationItem } from './types'; +import type { CspBenchmarksPage, CspPage, CspPageNavigationItem } from './types'; const NAV_ITEMS_NAMES = { DASHBOARD: i18n.translate('xpack.csp.navigation.dashboardNavItemLabel', { @@ -37,19 +37,21 @@ export const cloudPosturePages: Record<CspPage, CspPageNavigationItem> = { path: `${CLOUD_SECURITY_POSTURE_BASE_PATH}/findings`, id: 'cloud_security_posture-findings', }, - rules: { - name: NAV_ITEMS_NAMES.RULES, - path: `${CLOUD_SECURITY_POSTURE_BASE_PATH}/benchmarks/:packagePolicyId/:policyId/rules`, - id: 'cloud_security_posture-rules', - }, benchmarks: { name: NAV_ITEMS_NAMES.BENCHMARKS, path: `${CLOUD_SECURITY_POSTURE_BASE_PATH}/benchmarks`, - exact: true, id: 'cloud_security_posture-benchmarks', }, }; +export const benchmarksNavigation: Record<CspBenchmarksPage, CspPageNavigationItem> = { + rules: { + name: NAV_ITEMS_NAMES.RULES, + path: `${CLOUD_SECURITY_POSTURE_BASE_PATH}/benchmarks/:packagePolicyId/:policyId/rules`, + id: 'cloud_security_posture-benchmarks-rules', + }, +}; + export const findingsNavigation = { findings_default: { name: NAV_ITEMS_NAMES.FINDINGS, diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/security_solution_links.test.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/security_solution_links.test.ts index 08d3e6ba2a34a..072776cde5a0c 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/security_solution_links.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/navigation/security_solution_links.test.ts @@ -14,7 +14,7 @@ const chance = new Chance(); describe('getSecuritySolutionLink', () => { it('gets the correct link properties', () => { - const cspPage = chance.pickone<CspPage>(['dashboard', 'findings', 'benchmarks', 'rules']); + const cspPage = chance.pickone<CspPage>(['dashboard', 'findings', 'benchmarks']); const link = getSecuritySolutionLink(cspPage); @@ -26,7 +26,7 @@ describe('getSecuritySolutionLink', () => { describe('getSecuritySolutionNavTab', () => { it('gets the correct nav tab properties', () => { - const cspPage = chance.pickone<CspPage>(['dashboard', 'findings', 'benchmarks', 'rules']); + const cspPage = chance.pickone<CspPage>(['dashboard', 'findings', 'benchmarks']); const basePath = chance.word(); const navTab = getSecuritySolutionNavTab(cspPage, basePath); diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts index f96510702fdd3..4848ed7a19791 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts @@ -8,14 +8,14 @@ export interface CspNavigationItem { readonly name: string; readonly path: string; readonly disabled?: boolean; - readonly exact?: boolean; } export interface CspPageNavigationItem extends CspNavigationItem { id: CloudSecurityPosturePageId; } -export type CspPage = 'dashboard' | 'findings' | 'benchmarks' | 'rules'; +export type CspPage = 'dashboard' | 'findings' | 'benchmarks'; +export type CspBenchmarksPage = 'rules'; /** * All the IDs for the cloud security posture pages. @@ -25,10 +25,4 @@ export type CloudSecurityPosturePageId = | 'cloud_security_posture-dashboard' | 'cloud_security_posture-findings' | 'cloud_security_posture-benchmarks' - | 'cloud_security_posture-rules'; - -/** An entry for the cloud security posture breadcrumbs implementation. */ -export interface BreadcrumbEntry { - readonly name: string; - readonly path: string; -} + | 'cloud_security_posture-benchmarks-rules'; diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/use_csp_breadcrumbs.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/use_csp_breadcrumbs.ts deleted file mode 100644 index d9b540e755bfa..0000000000000 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/use_csp_breadcrumbs.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { MouseEvent } from 'react'; -import type { ChromeBreadcrumb, CoreStart } from '@kbn/core/public'; -import { useEffect } from 'react'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { type RouteProps, useRouteMatch } from 'react-router-dom'; -import type { EuiBreadcrumb } from '@elastic/eui'; -import { string } from 'io-ts'; -import useObservable from 'react-use/lib/useObservable'; -import type { BreadcrumbEntry } from './types'; - -const getClickableBreadcrumb = (routeMatch: RouteProps['path'], breadcrumbPath: string) => { - const hasParams = breadcrumbPath.includes(':'); - if (hasParams) return; - - if (routeMatch !== breadcrumbPath) { - return breadcrumbPath.startsWith('/') ? `${breadcrumbPath}` : `/${breadcrumbPath}`; - } -}; - -export const useCspBreadcrumbs = (breadcrumbs: BreadcrumbEntry[]) => { - const { - services: { - chrome: { setBreadcrumbs, docTitle }, - application: { currentAppId$, applications$, navigateToApp }, - }, - } = useKibana<CoreStart>(); - - const match = useRouteMatch(); - - const appId = useObservable(currentAppId$); - const applications = useObservable(applications$); - const application = appId ? applications?.get(appId) : undefined; - const appTitle = application?.title; - - useEffect(() => { - const additionalBreadCrumbs: ChromeBreadcrumb[] = breadcrumbs.map((breadcrumb) => { - const clickableLink = getClickableBreadcrumb(match.path, breadcrumb.path); - - return { - text: breadcrumb.name, - ...(clickableLink && - appId && { - onClick: (e) => { - e.preventDefault(); - void navigateToApp(appId, { path: clickableLink }); - }, - }), - }; - }); - - const nextBreadcrumbs = [ - { - text: appTitle, - ...(appId && { - onClick: (e: MouseEvent<HTMLAnchorElement>) => { - e.preventDefault(); - void navigateToApp(appId); - }, - }), - }, - ...additionalBreadCrumbs, - ]; - - setBreadcrumbs(nextBreadcrumbs); - docTitle.change(getTextBreadcrumbs(nextBreadcrumbs)); - }, [match.path, setBreadcrumbs, breadcrumbs, docTitle, appTitle, appId, navigateToApp]); -}; - -const getTextBreadcrumbs = (breadcrumbs: EuiBreadcrumb[]) => - breadcrumbs.map((breadcrumb) => breadcrumb.text).filter(string.is); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/custom_assets_extension.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/custom_assets_extension.tsx index d281cced59cab..ea79f8aab978d 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/custom_assets_extension.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/custom_assets_extension.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { type CustomAssetsAccordionProps, CustomAssetsAccordion } from '@kbn/fleet-plugin/public'; import { i18n } from '@kbn/i18n'; import { useKibana } from '../../common/hooks/use_kibana'; -import { cloudPosturePages } from '../../common/navigation/constants'; +import { benchmarksNavigation, cloudPosturePages } from '../../common/navigation/constants'; const SECURITY_APP_NAME = 'securitySolutionUI'; @@ -34,7 +34,7 @@ export const CspCustomAssetsExtension = () => { ), }, { - name: cloudPosturePages.rules.name, + name: benchmarksNavigation.rules.name, url: application.getUrlForApp(SECURITY_APP_NAME, { path: cloudPosturePages.benchmarks.path }), description: i18n.translate('xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel', { defaultMessage: 'View CSP Rules ', diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_create.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_create.tsx index 329dcb5aaccd1..ae5d79984da7e 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_create.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_create.tsx @@ -23,7 +23,7 @@ export const CspCreatePolicyExtension = memo<PackagePolicyCreateExtensionCompone onChange(getUpdatedEksVar(newPolicy, key, value)); return ( - <EuiForm> + <EuiForm style={{ marginTop: 0 }}> <DeploymentTypeSelect type={selectedDeploymentType} onChange={updateDeploymentType} /> {selectedDeploymentType === CLOUDBEAT_EKS && ( <EksFormWrapper inputs={newPolicy.inputs} onChange={updateEksVar} /> diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_edit.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_edit.tsx index 7badccfdc932e..33ed6dced08ad 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_edit.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_extension_edit.tsx @@ -20,7 +20,7 @@ export const CspEditPolicyExtension = memo<PackagePolicyEditExtensionComponentPr onChange(getUpdatedEksVar(newPolicy, key, value)); return ( - <EuiForm> + <EuiForm style={{ marginTop: 0 }}> <DeploymentTypeSelect type={selectedDeploymentType} isDisabled /> {selectedDeploymentType === CLOUDBEAT_EKS && ( <EksFormWrapper inputs={newPolicy.inputs} onChange={updateEksVar} /> diff --git a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks_table.tsx index df1a058de11b6..d1c92ab40a72f 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks_table.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks_table.tsx @@ -21,7 +21,7 @@ import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { TimestampTableCell } from '../../components/timestamp_table_cell'; import type { Benchmark } from '../../../common/types'; import { useKibana } from '../../common/hooks/use_kibana'; -import { cloudPosturePages } from '../../common/navigation/constants'; +import { benchmarksNavigation } from '../../common/navigation/constants'; import * as TEST_SUBJ from './test_subjects'; import { getEnabledCspIntegrationDetails } from '../../common/utils/get_enabled_csp_integration_details'; @@ -54,7 +54,7 @@ const IntegrationButtonLink = ({ return ( <EuiLink href={application.getUrlForApp('security', { - path: generatePath(cloudPosturePages.rules.path, { + path: generatePath(benchmarksNavigation.rules.path, { packagePolicyId, policyId, }), diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx index edb41a0535f16..897695e1a66fd 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useContext, useMemo } from 'react'; +import React from 'react'; import { generatePath, Link, type RouteComponentProps } from 'react-router-dom'; import { EuiButtonEmpty, @@ -21,37 +21,15 @@ import { i18n } from '@kbn/i18n'; import { PackagePolicy } from '@kbn/fleet-plugin/common'; import { CspInlineDescriptionList } from '../../components/csp_inline_description_list'; import { CloudPosturePageTitle } from '../../components/cloud_posture_page_title'; -import type { BreadcrumbEntry } from '../../common/navigation/types'; import { RulesContainer, type PageUrlParams } from './rules_container'; import { cloudPosturePages } from '../../common/navigation/constants'; -import { useCspBreadcrumbs } from '../../common/navigation/use_csp_breadcrumbs'; import { useCspIntegrationInfo } from './use_csp_integration'; import { useKibana } from '../../common/hooks/use_kibana'; import { CloudPosturePage } from '../../components/cloud_posture_page'; -import { SecuritySolutionContext } from '../../application/security_solution_context'; +import { useSecuritySolutionContext } from '../../application/security_solution_context'; import * as TEST_SUBJECTS from './test_subjects'; import { getEnabledCspIntegrationDetails } from '../../common/utils/get_enabled_csp_integration_details'; -const getRulesBreadcrumbs = ( - name?: string, - manageBreadcrumb?: BreadcrumbEntry -): BreadcrumbEntry[] => { - const breadCrumbs: BreadcrumbEntry[] = []; - if (manageBreadcrumb) { - breadCrumbs.push(manageBreadcrumb); - } - - breadCrumbs.push(cloudPosturePages.benchmarks); - - if (name) { - breadCrumbs.push({ ...cloudPosturePages.rules, name }); - } else { - breadCrumbs.push(cloudPosturePages.rules); - } - - return breadCrumbs; -}; - const getRulesSharedValues = ( packageInfo?: PackagePolicy ): NonNullable<EuiDescriptionListProps['listItems']> => { @@ -90,18 +68,10 @@ const getRulesSharedValues = ( export const Rules = ({ match: { params } }: RouteComponentProps<PageUrlParams>) => { const { http } = useKibana().services; const integrationInfo = useCspIntegrationInfo(params); - const securitySolutionContext = useContext(SecuritySolutionContext); + const SpyRoute = useSecuritySolutionContext()?.getSpyRouteComponent(); const [packageInfo] = integrationInfo.data || []; - const breadcrumbs = useMemo( - () => - getRulesBreadcrumbs(packageInfo?.name, securitySolutionContext?.getManageBreadcrumbEntry()), - [packageInfo?.name, securitySolutionContext] - ); - - useCspBreadcrumbs(breadcrumbs); - const sharedValues = getRulesSharedValues(packageInfo); return ( @@ -155,6 +125,12 @@ export const Rules = ({ match: { params } }: RouteComponentProps<PageUrlParams>) /> <EuiSpacer /> <RulesContainer /> + {SpyRoute && ( + <SpyRoute + pageName={cloudPosturePages.benchmarks.id} + state={{ ruleName: packageInfo?.name }} + /> + )} </CloudPosturePage> ); }; diff --git a/x-pack/plugins/cloud_security_posture/public/types.ts b/x-pack/plugins/cloud_security_posture/public/types.ts index 150dd4b89cee6..628f195adf155 100755 --- a/x-pack/plugins/cloud_security_posture/public/types.ts +++ b/x-pack/plugins/cloud_security_posture/public/types.ts @@ -18,7 +18,7 @@ import type { UsageCollectionStart, } from '@kbn/usage-collection-plugin/public'; import type { CspRouterProps } from './application/csp_router'; -import type { BreadcrumbEntry, CloudSecurityPosturePageId } from './common/navigation/types'; +import type { CloudSecurityPosturePageId } from './common/navigation/types'; /** * The cloud security posture's public plugin setup interface. @@ -62,7 +62,8 @@ export interface CspSecuritySolutionContext { /** Gets the `FiltersGlobal` component for embedding a filter bar in the security solution application. */ getFiltersGlobalComponent: () => ComponentType<{ children: ReactNode }>; /** Gets the `SpyRoute` component for navigation highlighting and breadcrumbs. */ - getSpyRouteComponent: () => ComponentType<{ pageName?: CloudSecurityPosturePageId }>; - /** Gets the `Manage` breadcrumb entry. */ - getManageBreadcrumbEntry: () => BreadcrumbEntry | undefined; + getSpyRouteComponent: () => ComponentType<{ + pageName: CloudSecurityPosturePageId; + state?: Record<string, string | undefined>; + }>; } diff --git a/x-pack/plugins/custom_branding/README.md b/x-pack/plugins/custom_branding/README.md new file mode 100755 index 0000000000000..849e022bcd1e5 --- /dev/null +++ b/x-pack/plugins/custom_branding/README.md @@ -0,0 +1,10 @@ +# customBranding +## !! UNDER DEVELOPMENT !! +This is a plugin to configure custom branding. +This plugin is currently under active development; do not use. + +--- + +## Development + +See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment. diff --git a/x-pack/plugins/custom_branding/common/constants.ts b/x-pack/plugins/custom_branding/common/constants.ts new file mode 100644 index 0000000000000..3bb0574117bd4 --- /dev/null +++ b/x-pack/plugins/custom_branding/common/constants.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { LicenseType } from '@kbn/licensing-plugin/common/types'; + +export const PLUGIN = { + ID: 'customBranding', + MINIMUM_LICENSE_REQUIRED: 'enterprise' as LicenseType, + getI18nName: (i18n: any): string => { + return i18n.translate('xpack.customBranding.appName', { + defaultMessage: 'Custom Branding', + }); + }, +}; diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack/runtime_size_limit.ts b/x-pack/plugins/custom_branding/common/types.ts similarity index 78% rename from x-pack/plugins/canvas/shareable_runtime/webpack/runtime_size_limit.ts rename to x-pack/plugins/custom_branding/common/types.ts index 51b16b6ccbd52..d198c06b90be1 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack/runtime_size_limit.ts +++ b/x-pack/plugins/custom_branding/common/types.ts @@ -5,4 +5,6 @@ * 2.0. */ -export const RUNTIME_SIZE_LIMIT = 8_200_000; +export interface CustomBrandingInfoResponse { + allowed: boolean; +} diff --git a/x-pack/plugins/custom_branding/kibana.json b/x-pack/plugins/custom_branding/kibana.json new file mode 100755 index 0000000000000..df29e4bfb1f1a --- /dev/null +++ b/x-pack/plugins/custom_branding/kibana.json @@ -0,0 +1,14 @@ +{ + "id": "customBranding", + "version": "1.0.0", + "kibanaVersion": "kibana", + "owner": { + "name": "global-experience", + "githubTeam": "kibana-global-experience" + }, + "description": " Enables customization of Kibana", + "server": true, + "ui": true, + "requiredPlugins": ["licensing", "licenseApiGuard"], + "optionalPlugins": [] +} diff --git a/x-pack/plugins/custom_branding/public/application.tsx b/x-pack/plugins/custom_branding/public/application.tsx new file mode 100755 index 0000000000000..c9cf2cc557d1d --- /dev/null +++ b/x-pack/plugins/custom_branding/public/application.tsx @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { CustomBrandingApp } from './components/app'; + +export const renderApp = ( + { notifications, http }: CoreStart, + { appBasePath, element }: AppMountParameters +) => { + ReactDOM.render( + <CustomBrandingApp basename={appBasePath} notifications={notifications} http={http} />, + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/x-pack/plugins/custom_branding/public/components/app.tsx b/x-pack/plugins/custom_branding/public/components/app.tsx new file mode 100755 index 0000000000000..212584dc5ff38 --- /dev/null +++ b/x-pack/plugins/custom_branding/public/components/app.tsx @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { CoreStart } from '@kbn/core/public'; + +interface CustomBrandingAppDeps { + basename: string; + notifications: CoreStart['notifications']; + http: CoreStart['http']; +} + +export const CustomBrandingApp = (props: CustomBrandingAppDeps) => { + return <div>Hello</div>; +}; diff --git a/x-pack/plugins/custom_branding/public/index.ts b/x-pack/plugins/custom_branding/public/index.ts new file mode 100755 index 0000000000000..4f6e0b6ff81ad --- /dev/null +++ b/x-pack/plugins/custom_branding/public/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CustomBrandingPlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, Kibana Platform `plugin()` initializer. +export function plugin() { + return new CustomBrandingPlugin(); +} diff --git a/x-pack/plugins/custom_branding/public/plugin.ts b/x-pack/plugins/custom_branding/public/plugin.ts new file mode 100755 index 0000000000000..fdf6c48d72275 --- /dev/null +++ b/x-pack/plugins/custom_branding/public/plugin.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CustomBrandingPluginSetup, CustomBrandingPluginStart } from './types'; + +export class CustomBrandingPlugin + implements Plugin<CustomBrandingPluginSetup, CustomBrandingPluginStart> +{ + public setup(core: CoreSetup): CustomBrandingPluginSetup { + return {}; + } + + public start(core: CoreStart): CustomBrandingPluginStart { + return {}; + } + + public stop() {} +} diff --git a/x-pack/plugins/custom_branding/public/types.ts b/x-pack/plugins/custom_branding/public/types.ts new file mode 100755 index 0000000000000..398b585a9b99b --- /dev/null +++ b/x-pack/plugins/custom_branding/public/types.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface CustomBrandingPluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface CustomBrandingPluginStart {} diff --git a/x-pack/plugins/custom_branding/server/index.ts b/x-pack/plugins/custom_branding/server/index.ts new file mode 100755 index 0000000000000..d0387671278d2 --- /dev/null +++ b/x-pack/plugins/custom_branding/server/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PluginInitializerContext } from '@kbn/core/server'; + +import { CustomBrandingPlugin } from './plugin'; + +export function plugin(initializerContext: PluginInitializerContext) { + return new CustomBrandingPlugin(initializerContext); +} diff --git a/x-pack/plugins/custom_branding/server/plugin.ts b/x-pack/plugins/custom_branding/server/plugin.ts new file mode 100755 index 0000000000000..27d8376919182 --- /dev/null +++ b/x-pack/plugins/custom_branding/server/plugin.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from '@kbn/core/server'; +import { i18n } from '@kbn/i18n'; +import { License } from '@kbn/license-api-guard-plugin/server'; +import { PLUGIN } from '../common/constants'; +import { Dependencies } from './types'; +import { registerRoutes } from './routes'; +import type { CustomBrandingRequestHandlerContext } from './types'; + +export class CustomBrandingPlugin implements Plugin { + private readonly license: License; + private readonly logger: Logger; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + this.license = new License(); + } + + public setup(core: CoreSetup) { + this.logger.debug('customBranding: Setup'); + this.license.setup({ + pluginName: PLUGIN.getI18nName(i18n), + logger: this.logger, + }); + const router = core.http.createRouter<CustomBrandingRequestHandlerContext>(); + registerRoutes(router); + + return {}; + } + + public start(core: CoreStart, { licensing }: Dependencies) { + this.logger.debug('customBranding: Started'); + this.license.start({ + pluginId: PLUGIN.ID, + minimumLicenseType: PLUGIN.MINIMUM_LICENSE_REQUIRED, + licensing, + }); + return {}; + } + + public stop() {} +} diff --git a/x-pack/plugins/custom_branding/server/routes/index.ts b/x-pack/plugins/custom_branding/server/routes/index.ts new file mode 100755 index 0000000000000..3e87ab509438d --- /dev/null +++ b/x-pack/plugins/custom_branding/server/routes/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { registerInfoRoute } from './info'; +import { CustomBrandingRouter } from '../types'; + +export const registerRoutes = (router: CustomBrandingRouter) => { + registerInfoRoute(router); +}; diff --git a/x-pack/plugins/custom_branding/server/routes/info.ts b/x-pack/plugins/custom_branding/server/routes/info.ts new file mode 100644 index 0000000000000..83921db247782 --- /dev/null +++ b/x-pack/plugins/custom_branding/server/routes/info.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ILicense } from '@kbn/licensing-plugin/server'; +import { CustomBrandingInfoResponse } from '../../common/types'; +import { CustomBrandingRouter } from '../types'; + +export const registerInfoRoute = (router: CustomBrandingRouter) => { + router.get( + { + path: '/api/custom_branding/info', + validate: false, + options: { + authRequired: 'optional', + }, + }, + async (ctx, req, res) => { + const allowed = isValidLicense((await ctx.licensing).license); + + if (!allowed) { + return res.forbidden(); + } + + return res.ok({ + body: { + allowed, + } as CustomBrandingInfoResponse, + }); + } + ); +}; + +const isValidLicense = (license: ILicense): boolean => { + return license.hasAtLeast('enterprise'); +}; diff --git a/x-pack/plugins/custom_branding/server/types.ts b/x-pack/plugins/custom_branding/server/types.ts new file mode 100755 index 0000000000000..c40f49ef1acba --- /dev/null +++ b/x-pack/plugins/custom_branding/server/types.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + LicensingApiRequestHandlerContext, + LicensingPluginStart, +} from '@kbn/licensing-plugin/server'; +import { CustomRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import { IRouter } from '@kbn/core/server'; + +export interface Dependencies { + licensing: LicensingPluginStart; +} + +export type CustomBrandingRequestHandlerContext = CustomRequestHandlerContext<{ + licensing: LicensingApiRequestHandlerContext; +}>; +export type CustomBrandingRouter = IRouter<CustomBrandingRequestHandlerContext>; diff --git a/x-pack/plugins/custom_branding/tsconfig.json b/x-pack/plugins/custom_branding/tsconfig.json new file mode 100644 index 0000000000000..c6eec4a99683d --- /dev/null +++ b/x-pack/plugins/custom_branding/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "isolatedModules": true, + }, + "include": [ + "public/**/*", + "server/**/*", + "common/**/*" + ], + "kbn_references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../license_api_guard/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/enterprise_search/common/types/connectors.ts b/x-pack/plugins/enterprise_search/common/types/connectors.ts index 5340c6d9b8fd3..1cabde52b894e 100644 --- a/x-pack/plugins/enterprise_search/common/types/connectors.ts +++ b/x-pack/plugins/enterprise_search/common/types/connectors.ts @@ -99,7 +99,7 @@ export interface FilteringConfig { } export enum TriggerMethod { - ON_DEMAND = 'on-demand', + ON_DEMAND = 'on_demand', SCHEDULED = 'scheduled', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_tab.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_tab.tsx deleted file mode 100644 index 48a815d3c55cc..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_tab.tsx +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -import { ConnectorFilteringForm } from './connector_filtering_form'; - -export const EditFilteringTab: React.FC<{ revertAction: () => void }> = ({ - children, - revertAction, -}) => { - return ( - <EuiFlexGroup direction="column"> - <EuiFlexItem> - <EuiFlexGroup justifyContent="flexEnd"> - <EuiFlexItem grow={false}> - <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-editRules-revert" - onClick={revertAction} - > - {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.flyout.revertButtonTitle', - { - defaultMessage: 'Revert to active rules', - } - )} - </EuiButton> - </EuiFlexItem> - </EuiFlexGroup> - </EuiFlexItem> - <EuiFlexItem> - <ConnectorFilteringForm>{children}</ConnectorFilteringForm> - </EuiFlexItem> - </EuiFlexGroup> - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/advanced_filtering_rules.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx similarity index 86% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/advanced_filtering_rules.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx index 67c6bdf009f4a..d45f3481807b2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/advanced_filtering_rules.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/advanced_sync_rules.tsx @@ -15,23 +15,23 @@ import { CodeEditor } from '@kbn/kibana-react-plugin/public'; import { ConnectorFilteringLogic } from './connector_filtering_logic'; -export const AdvancedFilteringRules: React.FC = () => { +export const AdvancedSyncRules: React.FC = () => { const { hasJsonValidationError: hasError, localAdvancedSnippet } = useValues(ConnectorFilteringLogic); const { setLocalAdvancedSnippet } = useActions(ConnectorFilteringLogic); return ( <EuiFormRow label={i18n.translate( - 'xpack.enterpriseSearch.content.indices.connector.filtering.advancedRules.title', + 'xpack.enterpriseSearch.content.indices.connector.syncRules.advancedRules.title', { - defaultMessage: 'Advanced filtering rules', + defaultMessage: 'Advanced rules', } )} isInvalid={hasError} error={ hasError ? i18n.translate( - 'xpack.enterpriseSearch.content.indices.connector.filtering.advancedRules.error', + 'xpack.enterpriseSearch.content.indices.connector.syncRules.advancedRules.error', { defaultMessage: 'JSON format is invalid', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_logic.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx similarity index 98% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_logic.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx index 98b0c7f286c55..2cb49e063b0bc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_logic.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx @@ -144,7 +144,7 @@ export const ConnectorFilteringLogic = kea< flashSuccessToast( i18n.translate( 'xpack.enterpriseSearch.content.index.connector.filtering.successToastRules.title', - { defaultMessage: 'Filtering rules updated' } + { defaultMessage: 'Sync rules updated' } ) ); }, @@ -161,8 +161,8 @@ export const ConnectorFilteringLogic = kea< draftApiSuccess: () => { flashSuccessToast( i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.successToastDraft.title', - { defaultMessage: 'Draft saved' } + 'xpack.enterpriseSearch.content.index.connector.syncRules.successToastDraft.title', + { defaultMessage: 'Draft rules saved' } ) ); }, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx similarity index 81% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx index fac8afe06ccc3..4c5525a7fbc4c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx @@ -23,14 +23,16 @@ import { import { i18n } from '@kbn/i18n'; +import { docLinks } from '../../../../../shared/doc_links'; + import { FilteringRulesTable } from '../../../shared/filtering_rules_table/filtering_rules_table'; import { IndexViewLogic } from '../../index_view_logic'; import { ConnectorFilteringLogic } from './connector_filtering_logic'; -import { EditFilteringFlyout } from './edit_filtering_flyout'; -import { FilteringStateCallouts } from './filtering_callouts'; +import { EditSyncRulesFlyout } from './edit_sync_rules_flyout'; +import { SyncRulesStateCallouts } from './sync_rules_callouts'; -export const ConnectorFiltering: React.FC = () => { +export const ConnectorSyncRules: React.FC = () => { const { indexName, hasAdvancedFilteringFeature, hasBasicFilteringFeature } = useValues(IndexViewLogic); const { applyDraft, setLocalFilteringRules, setLocalAdvancedSnippet, setIsEditing } = @@ -41,7 +43,7 @@ export const ConnectorFiltering: React.FC = () => { return ( <> {isEditing && ( - <EditFilteringFlyout + <EditSyncRulesFlyout hasAdvancedFilteringFeature={hasAdvancedFilteringFeature} hasBasicFilteringFeature={hasBasicFilteringFeature} revertLocalFilteringRules={() => setLocalFilteringRules(filteringRules)} @@ -53,7 +55,7 @@ export const ConnectorFiltering: React.FC = () => { <EuiFlexGroup direction="column"> {hasDraft && ( <EuiFlexItem> - <FilteringStateCallouts + <SyncRulesStateCallouts applyDraft={applyDraft} editDraft={() => setIsEditing(true)} state={draftState} @@ -66,15 +68,15 @@ export const ConnectorFiltering: React.FC = () => { <EuiFlexItem> <EuiTitle size="s"> <h3> - {i18n.translate('xpack.enterpriseSearch.index.connector.filtering.title', { - defaultMessage: 'Sync filters ', + {i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.title', { + defaultMessage: 'Sync rules ', })} </h3> </EuiTitle> <EuiSpacer /> <EuiText size="s"> <p> - {i18n.translate('xpack.enterpriseSearch.index.connector.filtering.description', { + {i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.description', { defaultMessage: `Include or exclude high level items, file types and (file or folder) paths to synchronize from {indexName}. Everything is included by default. Each document is tested against the reules below and the first rule that matches will be applied.`, @@ -84,9 +86,9 @@ export const ConnectorFiltering: React.FC = () => { })} </p> <p> - <EuiLink href="TODOTODOTODOTODO" external> + <EuiLink href={docLinks.syncRules} external> {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.syncFiltersLabel', + 'xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel', { defaultMessage: 'Learn more about sync rules', } @@ -97,21 +99,21 @@ export const ConnectorFiltering: React.FC = () => { </EuiFlexItem> <EuiFlexItem grow={false}> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-editRules-editDraftRules" + data-telemetry-id="entSearchContent-connector-syncRules-editRules-editDraftRules" color="primary" onClick={() => setIsEditing(!isEditing)} > {hasDraft ? i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.editFilterRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.editFilterRulesTitle', { - defaultMessage: 'Edit filter rules', + defaultMessage: 'Edit sync rules', } ) : i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.draftNewFilterRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.draftNewFilterRulesTitle', { - defaultMessage: 'Draft new filter rules', + defaultMessage: 'Draft new sync rules', } )} </EuiButton> @@ -126,9 +128,9 @@ export const ConnectorFiltering: React.FC = () => { <EuiTitle size="s"> <h3> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.basicFiltersTitle', + 'xpack.enterpriseSearch.content.index.connector.syncRules.basicRulesTitle', { - defaultMessage: 'Basic filters', + defaultMessage: 'Basic rules', } )} </h3> @@ -137,7 +139,7 @@ export const ConnectorFiltering: React.FC = () => { <EuiText size="s"> <p> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.basicFiltersDescription', + 'xpack.enterpriseSearch.content.index.connector.syncRules.basicRulesDescription', { defaultMessage: 'These filters apply to documents in post-processing.', } @@ -158,9 +160,9 @@ export const ConnectorFiltering: React.FC = () => { <EuiTitle size="s"> <h3> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.advancedFiltersTitle', + 'xpack.enterpriseSearch.content.index.connector.syncRules.advancedRulesTitle', { - defaultMessage: 'Advanced filters', + defaultMessage: 'Advanced rules', } )} </h3> @@ -169,16 +171,16 @@ export const ConnectorFiltering: React.FC = () => { <EuiText size="s"> <p> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.advancedFiltersDescription', + 'xpack.enterpriseSearch.content.index.connector.syncRules.advancedFiltersDescription', { defaultMessage: 'These filters apply to documents at the data source.', } )} </p> <p> - <EuiLink external href="TODOTODOTODODOTO"> + <EuiLink external href={docLinks.syncRules}> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.advancedFiltersLinkTitle', + 'xpack.enterpriseSearch.content.index.connector.syncRules.advancedFiltersLinkTitle', { defaultMessage: 'Learn more about advanced sync rules.', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_form.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_sync_form.tsx similarity index 80% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_form.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_sync_form.tsx index c0821a3bccfed..f7f226d5e266f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/connector_filtering_form.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_sync_form.tsx @@ -17,7 +17,7 @@ import { UnsavedChangesPrompt } from '../../../../../shared/unsaved_changes_prom import { ConnectorFilteringLogic } from './connector_filtering_logic'; -export const ConnectorFilteringForm: React.FC = ({ children }) => { +export const ConnectorSyncRulesForm: React.FC = ({ children }) => { const { saveDraftFilteringRules, setIsEditing } = useActions(ConnectorFilteringLogic); const { hasJsonValidationError, isEditing, isLoading } = useValues(ConnectorFilteringLogic); @@ -26,7 +26,7 @@ export const ConnectorFilteringForm: React.FC = ({ children }) => { <UnsavedChangesPrompt hasUnsavedChanges={isEditing} messageText={i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.unsavedChanges', + 'xpack.enterpriseSearch.index.connector.syncRules.unsavedChanges', { defaultMessage: 'Your changes have not been saved. Are you sure you want to leave?', } @@ -40,13 +40,13 @@ export const ConnectorFilteringForm: React.FC = ({ children }) => { {isEditing && ( <EuiFlexItem grow={false}> <EuiButtonEmpty - data-telemetry-id="entSearchContent-connector-filtering-editRules-cancelEditing" + data-telemetry-id="entSearchContent-connector-syncRules-editRules-cancelEditing" onClick={() => { setIsEditing(!isEditing); }} > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.cancelEditingFilteringDraft', + 'xpack.enterpriseSearch.index.connector.syncRules.cancelEditingFilteringDraft', { defaultMessage: 'Cancel', } @@ -56,13 +56,13 @@ export const ConnectorFilteringForm: React.FC = ({ children }) => { )} <EuiFlexItem grow={false}> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-editRules-saveAndValidate" + data-telemetry-id="entSearchContent-connector-syncRules-editRules-saveAndValidate" disabled={hasJsonValidationError} isLoading={isLoading} onClick={saveDraftFilteringRules} > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.validateDraftTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.validateDraftTitle', { defaultMessage: 'Save and validate draft', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_flyout.tsx similarity index 60% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_flyout.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_flyout.tsx index fecaabc6b1566..1097f5824a125 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/edit_filtering_flyout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_flyout.tsx @@ -15,12 +15,13 @@ import { EuiText, EuiTabbedContent, EuiTabbedContentTab, + EuiSpacer, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { AdvancedFilteringRules } from './advanced_filtering_rules'; -import { EditFilteringTab } from './edit_filtering_tab'; -import { FilteringRulesTable } from './editable_filtering_rules_table'; +import { AdvancedSyncRules } from './advanced_sync_rules'; +import { EditSyncRulesTab } from './edit_sync_rules_tab'; +import { SyncRulesTable } from './editable_basic_rules_table'; interface EditFilteringFlyoutProps { hasAdvancedFilteringFeature: boolean; @@ -35,7 +36,7 @@ enum FilteringTabs { ADVANCED = 'advanced', } -export const EditFilteringFlyout: React.FC<EditFilteringFlyoutProps> = ({ +export const EditSyncRulesFlyout: React.FC<EditFilteringFlyoutProps> = ({ hasAdvancedFilteringFeature, hasBasicFilteringFeature, revertLocalFilteringRules, @@ -47,15 +48,15 @@ export const EditFilteringFlyout: React.FC<EditFilteringFlyoutProps> = ({ ? [ { content: ( - <EditFilteringTab revertAction={revertLocalFilteringRules}> - <FilteringRulesTable /> - </EditFilteringTab> + <EditSyncRulesTab revertAction={revertLocalFilteringRules}> + <SyncRulesTable /> + </EditSyncRulesTab> ), id: FilteringTabs.BASIC, name: i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.basicTabTitle', + 'xpack.enterpriseSearch.content.index.connector.syncRules.basicTabTitle', { - defaultMessage: 'Basic filters', + defaultMessage: 'Basic rules', } ), }, @@ -65,15 +66,15 @@ export const EditFilteringFlyout: React.FC<EditFilteringFlyoutProps> = ({ ? [ { content: ( - <EditFilteringTab revertAction={revertLocalAdvancedFiltering}> - <AdvancedFilteringRules /> - </EditFilteringTab> + <EditSyncRulesTab revertAction={revertLocalAdvancedFiltering}> + <AdvancedSyncRules /> + </EditSyncRulesTab> ), id: FilteringTabs.ADVANCED, name: i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.advancedTabTitle', + 'xpack.enterpriseSearch.content.index.connector.syncRules.advancedTabTitle', { - defaultMessage: 'Advanced filters', + defaultMessage: 'Advanced rules', } ), }, @@ -82,28 +83,24 @@ export const EditFilteringFlyout: React.FC<EditFilteringFlyoutProps> = ({ ]; return ( - <EuiFlyout - ownFocus - onClose={() => setIsEditing(false)} - aria-labelledby="filteringFlyout" - size="l" - > + <EuiFlyout ownFocus onClose={() => setIsEditing(false)} aria-labelledby="rulesFlyout" size="l"> <EuiFlyoutHeader> <EuiTitle size="m"> - <h2 id="filteringFlyout"> + <h2 id="rulesFlyout"> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.flyout.title', + 'xpack.enterpriseSearch.content.index.connector.syncRules.flyout.title', { defaultMessage: 'Draft rules', } )} </h2> </EuiTitle> + <EuiSpacer /> <EuiText size="s"> {i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.flyout.description', + 'xpack.enterpriseSearch.content.index.connector.syncRules.flyout.description', { - defaultMessage: 'Plan and edit filters here before applying them to the next sync.', + defaultMessage: 'Plan and edit rules here before applying them to the next sync.', } )} </EuiText> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_tab.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_tab.tsx new file mode 100644 index 0000000000000..3cb77ba2a3be4 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/edit_sync_rules_tab.tsx @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiSpacer } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { ConnectorSyncRulesForm } from './connector_sync_form'; + +export const EditSyncRulesTab: React.FC<{ revertAction: () => void }> = ({ + children, + revertAction, +}) => { + return ( + <> + <EuiSpacer /> + <EuiFlexGroup direction="column"> + <EuiFlexItem> + <EuiFlexGroup justifyContent="flexEnd"> + <EuiFlexItem grow={false}> + <EuiButton + data-telemetry-id="entSearchContent-connector-syncRules-editRules-revert" + onClick={revertAction} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.index.connector.syncRules.flyout.revertButtonTitle', + { + defaultMessage: 'Revert to active rules', + } + )} + </EuiButton> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + <EuiFlexItem> + <ConnectorSyncRulesForm>{children}</ConnectorSyncRulesForm> + </EuiFlexItem> + </EuiFlexGroup> + </> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/editable_filtering_rules_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/editable_basic_rules_table.tsx similarity index 75% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/editable_filtering_rules_table.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/editable_basic_rules_table.tsx index e0d39e5a0b382..ecdc82d2343d5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/editable_filtering_rules_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/editable_basic_rules_table.tsx @@ -28,6 +28,7 @@ import { FilteringRule, FilteringRuleRule, } from '../../../../../../../common/types/connectors'; +import { docLinks } from '../../../../../shared/doc_links'; import { InlineEditableTable } from '../../../../../shared/tables/inline_editable_table/inline_editable_table'; import { @@ -68,7 +69,7 @@ function validateItem(filteringRule: FilteringRule): FormErrors { return {}; } -export const FilteringRulesTable: React.FC = () => { +export const SyncRulesTable: React.FC = () => { const { editableFilteringRules } = useValues(ConnectorFilteringLogic); const { indexName } = useValues(IndexViewLogic); const { addFilteringRule, deleteFilteringRule, reorderFilteringRules, updateFilteringRule } = @@ -76,15 +77,15 @@ export const FilteringRulesTable: React.FC = () => { const description = ( <EuiText size="s" color="default"> - {i18n.translate('xpack.enterpriseSearch.content.index.connector.filteringRules.description', { + {i18n.translate('xpack.enterpriseSearch.content.index.connector.syncRules.description', { defaultMessage: - 'Add an indexing rule to customize what data is synchronized from {indexName}. Everything is included by default, and documents are validated against the configured set of indexing rules starting from the top listed down.', + 'Add a sync rule to customize what data is synchronized from {indexName}. Everything is included by default, and documents are validated against the configured set of indexing rules starting from the top listed down.', values: { indexName }, })} <EuiSpacer /> - <EuiLink href={'TODOTODOTODO'} external> - {i18n.translate('xpack.enterpriseSearch.content.index.connector.filteringRules.link', { - defaultMessage: 'Learn more about customizing your index rules.', + <EuiLink href={docLinks.syncRules} external> + {i18n.translate('xpack.enterpriseSearch.content.index.connector.syncRules.link', { + defaultMessage: 'Learn more about customizing your sync rules.', })} </EuiLink> </EuiText> @@ -110,34 +111,29 @@ export const FilteringRulesTable: React.FC = () => { /> ), field: 'policy', - name: i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.basicTable.policyTitle', - { defaultMessage: 'Policy' } - ), + name: i18n.translate('xpack.enterpriseSearch.index.connector.rule.basicTable.policyTitle', { + defaultMessage: 'Policy', + }), render: (indexingRule) => ( <EuiText size="s">{filteringPolicyToText(indexingRule.policy)}</EuiText> ), }, { - editingRender: (filteringRule, onChange) => ( + editingRender: (rule, onChange) => ( <EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}> <EuiFlexItem> - <EuiFieldText - fullWidth - value={filteringRule.field} - onChange={(e) => onChange(e.target.value)} - /> + <EuiFieldText fullWidth value={rule.field} onChange={(e) => onChange(e.target.value)} /> </EuiFlexItem> </EuiFlexGroup> ), field: 'field', name: i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.basicTable.fieldTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.basicTable.fieldTitle', { defaultMessage: 'Field' } ), - render: (indexingRule) => ( + render: (rule) => ( <EuiText size="s"> - <EuiCode>{indexingRule.field}</EuiCode> + <EuiCode>{rule.field}</EuiCode> </EuiText> ), }, @@ -155,35 +151,29 @@ export const FilteringRulesTable: React.FC = () => { ), field: 'rule', name: i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.basicTable.ruleTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.basicTable.ruleTitle', { defaultMessage: 'Rule' } ), - render: (filteringRule) => ( - <EuiText size="s">{filteringRuleToText(filteringRule.rule)}</EuiText> - ), + render: (rule) => <EuiText size="s">{filteringRuleToText(rule.rule)}</EuiText>, }, { - editingRender: (filteringRule, onChange) => ( + editingRender: (rule, onChange) => ( <EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}> <EuiFlexItem> - <EuiFieldText - fullWidth - value={filteringRule.value} - onChange={(e) => onChange(e.target.value)} - /> + <EuiFieldText fullWidth value={rule.value} onChange={(e) => onChange(e.target.value)} /> </EuiFlexItem> </EuiFlexGroup> ), field: 'value', name: i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.basicTable.valueTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.basicTable.valueTitle', { defaultMessage: 'Value', } ), - render: (indexingRule) => ( + render: (rule) => ( <EuiText size="s"> - <EuiCode>{indexingRule.value}</EuiCode> + <EuiCode>{rule.value}</EuiCode> </EuiText> ), }, @@ -192,8 +182,8 @@ export const FilteringRulesTable: React.FC = () => { return ( <InlineEditableTable addButtonText={i18n.translate( - 'xpack.enterpriseSearch.content.index.connector.filtering.table.addRuleLabel', - { defaultMessage: 'Add filter rule' } + 'xpack.enterpriseSearch.content.index.connector.syncRules.table.addRuleLabel', + { defaultMessage: 'Add sync rule' } )} columns={columns} defaultItem={{ @@ -227,7 +217,7 @@ export const FilteringRulesTable: React.FC = () => { bottomRows={[ <EuiText size="s"> {i18n.translate( - 'xpack.enterpriseSearch.content.sources.filteringRulesTable.includeEverythingMessage', + 'xpack.enterpriseSearch.content.sources.basicRulesTable.includeEverythingMessage', { defaultMessage: 'Include everything else from this source', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/filtering_callouts.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/sync_rules_callouts.tsx similarity index 84% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/filtering_callouts.tsx rename to x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/sync_rules_callouts.tsx index 18c49513d1e62..8cadc7c74ab39 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/filtering/filtering_callouts.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/sync_rules_callouts.tsx @@ -19,7 +19,7 @@ interface FilteringStatusCalloutsProps { state: FilteringValidationState; } -export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ +export const SyncRulesStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ applyDraft, editDraft, state, @@ -36,7 +36,7 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ </EuiFlexItem> <EuiFlexItem> {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.validatingTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.validatingTitle', { defaultMessage: 'Draft sync rules are validating', } @@ -48,7 +48,7 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiFlexGroup direction="column"> <EuiFlexItem> {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.validatingDescription', + 'xpack.enterpriseSearch.index.connector.syncRules.validatingDescription', { defaultMessage: 'Draft rules need to be validated before they can take effect. This may take a few minutes.', @@ -58,13 +58,13 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiFlexItem> <span> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-validatingCallout-editRules" + data-telemetry-id="entSearchContent-connector-syncRules-validatingCallout-editRules" onClick={editDraft} color="warning" fill > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.validatingCallout.editDraftRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.validatingCallout.editDraftRulesTitle', { defaultMessage: 'Edit draft rules', } @@ -80,14 +80,14 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiCallOut color="danger" iconType="cross" - title={i18n.translate('xpack.enterpriseSearch.index.connector.filtering.invalidTitle', { + title={i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.invalidTitle', { defaultMessage: 'Draft sync rules are invalid', })} > <EuiFlexGroup direction="column"> <EuiFlexItem> {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.invalidDescription', + 'xpack.enterpriseSearch.index.connector.syncRules.invalidDescription', { defaultMessage: 'Draft rules did not validate. Edit the draft rules before they can take effect.', @@ -97,13 +97,13 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiFlexItem> <span> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-errorCallout-editRules" + data-telemetry-id="entSearchContent-connector-syncRules-errorCallout-editRules" onClick={editDraft} color="danger" fill > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.errorCallout.editDraftRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.errorCallout.editDraftRulesTitle', { defaultMessage: 'Edit draft rules', } @@ -119,14 +119,14 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiCallOut color="success" iconType="check" - title={i18n.translate('xpack.enterpriseSearch.index.connector.filtering.validatedTitle', { + title={i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.validatedTitle', { defaultMessage: 'Draft sync rules validated', })} > <EuiFlexGroup direction="column"> <EuiFlexItem> {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.validatedDescription', + 'xpack.enterpriseSearch.index.connector.syncRules.validatedDescription', { defaultMessage: 'Apply draft rules to take effect on the next sync.', } @@ -137,13 +137,13 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiFlexItem grow={false}> <span> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-successCallout-applyRules" + data-telemetry-id="entSearchContent-connector-syncRules-successCallout-applyRules" onClick={applyDraft} color="success" fill > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.successCallout.applyDraftRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.successCallout.applyDraftRulesTitle', { defaultMessage: 'Apply draft rules', } @@ -154,12 +154,12 @@ export const FilteringStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({ <EuiFlexItem grow={false}> <span> <EuiButton - data-telemetry-id="entSearchContent-connector-filtering-successCallout-editRules" + data-telemetry-id="entSearchContent-connector-syncRules-successCallout-editRules" onClick={editDraft} color="success" > {i18n.translate( - 'xpack.enterpriseSearch.index.connector.filtering.errorCallout.successEditDraftRulesTitle', + 'xpack.enterpriseSearch.index.connector.syncRules.errorCallout.successEditDraftRulesTitle', { defaultMessage: 'Edit draft rules', } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx index 0d11185a48705..0b380e003f48d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx @@ -31,7 +31,7 @@ export const InferenceErrors: React.FC = () => { dataType: 'date', field: 'timestamp', name: i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.tableColumn.timestamp', + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.timestamp', { defaultMessage: 'Timestamp' } ), }, @@ -39,8 +39,8 @@ export const InferenceErrors: React.FC = () => { dataType: 'string', field: 'message', name: i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.tableColumn.message', - { defaultMessage: 'Inference error' } + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.message', + { defaultMessage: 'Error message' } ), textOnly: true, }, @@ -48,7 +48,7 @@ export const InferenceErrors: React.FC = () => { dataType: 'number', field: 'doc_count', name: i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.tableColumn.docCount', + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.docCount', { defaultMessage: 'Approx. document count' } ), }, @@ -63,15 +63,11 @@ export const InferenceErrors: React.FC = () => { title={ <h2> {i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.title', - { defaultMessage: 'Ingestion logs' } + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.title', + { defaultMessage: 'Inference errors' } )} </h2> } - subtitle={i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.subtitle', - { defaultMessage: 'Errors and dropped data failures' } - )} > {isLoading ? ( <EuiLoadingSpinner /> @@ -82,7 +78,7 @@ export const InferenceErrors: React.FC = () => { items={inferenceErrors} rowHeader="message" noItemsMessage={i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineLogs.emptyMessage', + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.emptyMessage', { defaultMessage: 'This index has no inference errors' } )} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history.tsx index 5f0de19f064ed..9b33a1a0df0e6 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history.tsx @@ -9,13 +9,7 @@ import React, { useEffect } from 'react'; import { useActions, useValues } from 'kea'; -import { - EuiBasicTable, - EuiBasicTableColumn, - EuiLink, - EuiSpacer, - EuiLoadingSpinner, -} from '@elastic/eui'; +import { EuiBasicTable, EuiBasicTableColumn, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -71,17 +65,6 @@ export const InferenceHistory: React.FC = () => { 'The following inference processors were found in the _ingest.processors field of documents on this index.', } )} - footerDocLink={ - // TODO: insert real doc link - <EuiLink href="#" target="_blank" color="subdued"> - {i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.docLink', - { - defaultMessage: 'Learn more about inference history', - } - )} - </EuiLink> - } > {isLoading ? ( <EuiLoadingSpinner /> @@ -90,6 +73,10 @@ export const InferenceHistory: React.FC = () => { columns={historyColumns} items={inferenceHistory ?? []} rowHeader="pipeline" + noItemsMessage={i18n.translate( + 'xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.emptyMessage', + { defaultMessage: 'This index has no inference history' } + )} /> )} </DataPanel> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ingest_pipelines/ingest_pipeline_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ingest_pipelines/ingest_pipeline_modal.tsx index 291108a251e37..d7bfe52a803e1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ingest_pipelines/ingest_pipeline_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ingest_pipelines/ingest_pipeline_modal.tsx @@ -28,6 +28,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { IngestPipelineParams } from '../../../../../../../common/types/connectors'; +import { docLinks } from '../../../../../shared/doc_links'; import { CurlRequest } from '../../components/curl_request/curl_request'; @@ -124,7 +125,7 @@ export const IngestPipelineModal: React.FC<IngestPipelineModalProps> = ({ </EuiFlexItem> <EuiSpacer /> <EuiFlexItem> - <EuiLink href="TODO TODO TODO: Insert actual docslink" external> + <EuiLink href={docLinks.ingestPipelines} external> {i18n.translate( 'xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalIngestLinkLabel', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.scss b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.scss index cd3c318635932..30554c94d5cd5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.scss +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.scss @@ -15,4 +15,11 @@ height: 100%; } } + + .enterpriseSearchInferencePipelineModalFooter { + .euiButtonEmpty__content { + padding-left: $euiSizeM; + padding-right: $euiSizeM; + } + } } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx index bc8d8d7962ca3..96e942718444e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_pipeline_modal.tsx @@ -215,7 +215,7 @@ export const ModalFooter: React.FC< break; } return ( - <EuiModalFooter> + <EuiModalFooter className="enterpriseSearchInferencePipelineModalFooter"> <EuiFlexGroup> <EuiFlexItem grow={false}> {previousStep !== undefined ? ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx index 14e3f06c97a05..feb4ca8c87a4e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx @@ -33,6 +33,7 @@ import { IndexViewLogic } from '../../index_view_logic'; import { EMPTY_PIPELINE_CONFIGURATION, MLInferenceLogic } from './ml_inference_logic'; import { MlModelSelectOption } from './model_select_option'; import { PipelineSelectOption } from './pipeline_select_option'; +import { TargetFieldHelpText } from './target_field_help_text'; import { MODEL_REDACTED_VALUE, MODEL_SELECT_PLACEHOLDER } from './utils'; const MODEL_SELECT_PLACEHOLDER_VALUE = 'model_placeholder$$'; @@ -117,6 +118,7 @@ export const ConfigurePipeline: React.FC = () => { ]; const inputsDisabled = configuration.existingPipeline !== false; + const selectedModel = supportedMLModels.find((model) => model.model_id === modelID); return ( <> @@ -173,6 +175,7 @@ export const ConfigurePipeline: React.FC = () => { existingPipeline: e.target.value === 'true', }) } + value={configuration.existingPipeline?.toString() ?? ''} /> </EuiFormRow> </EuiFlexItem> @@ -209,12 +212,21 @@ export const ConfigurePipeline: React.FC = () => { )} helpText={ !nameError && - i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.name.helpText', - { - defaultMessage: - 'Pipeline names are unique within a deployment and can only contain letters, numbers, underscores, and hyphens.', - } + configuration.existingPipeline === false && ( + <EuiText size="xs"> + {i18n.translate( + 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.name.helpText', + { + defaultMessage: + 'Pipeline names are unique within a deployment and can only contain letters, numbers, underscores, and hyphens. This will create a pipeline named {pipelineName}.', + values: { + pipelineName: `ml-inference-${ + pipelineName.length > 0 ? pipelineName : '<name>' + }`, + }, + } + )} + </EuiText> ) } error={nameError && formErrors.pipelineName} @@ -312,29 +324,26 @@ export const ConfigurePipeline: React.FC = () => { <EuiFlexItem> <EuiFormRow label={i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.destinationField.label', + 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.targetField.label', { - defaultMessage: 'Destination field (optional)', + defaultMessage: 'Target field (optional)', } )} helpText={ formErrors.destinationField === undefined && - i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.destinationField.helpText', - { - defaultMessage: - 'Your field name will be prefixed with "ml.inference.", if not set it will be defaulted to "ml.inference.{pipelineName}"', - values: { - pipelineName, - }, - } + configuration.existingPipeline !== true && ( + <TargetFieldHelpText + pipelineName={pipelineName} + targetField={destinationField} + model={selectedModel} + /> ) } error={formErrors.destinationField} isInvalid={formErrors.destinationField !== undefined} > <EuiFieldText - data-telemetry-id={`entSearchContent-${ingestionMethod}-pipelines-configureInferencePipeline-destionationField`} + data-telemetry-id={`entSearchContent-${ingestionMethod}-pipelines-configureInferencePipeline-targetField`} disabled={inputsDisabled} placeholder="custom_field_name" value={destinationField} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx index f782c827a9728..b8b5c0c3c508e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx @@ -11,21 +11,14 @@ import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiTextColor, EuiTitle } import { i18n } from '@kbn/i18n'; import { MLInferencePipelineOption } from './ml_inference_logic'; -import { EXISTING_PIPELINE_DISABLED_MISSING_SOURCE_FIELD } from './utils'; +import { EXISTING_PIPELINE_DISABLED_MISSING_SOURCE_FIELD, MODEL_REDACTED_VALUE } from './utils'; export interface PipelineSelectOptionProps { pipeline: MLInferencePipelineOption; } -const REDACTED_MODE_ID_DISPLAY = i18n.translate( - 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.redactedModel', - { - defaultMessage: 'Trained model not available in this space', - } -); - export const PipelineSelectOption: React.FC<PipelineSelectOptionProps> = ({ pipeline }) => { - const modelIdDisplay = pipeline.modelId.length > 0 ? pipeline.modelId : REDACTED_MODE_ID_DISPLAY; + const modelIdDisplay = pipeline.modelId.length > 0 ? pipeline.modelId : MODEL_REDACTED_VALUE; return ( <EuiFlexGroup direction="column" gutterSize="xs"> {pipeline.disabled && ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/target_field_help_text.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/target_field_help_text.tsx new file mode 100644 index 0000000000000..2332f4c7222de --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/target_field_help_text.tsx @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiText } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react'; + +import { + getMlModelTypesForModelConfig, + SUPPORTED_PYTORCH_TASKS, +} from '../../../../../../../common/ml_inference_pipeline'; +import { TrainedModel } from '../../../../api/ml_models/ml_trained_models_logic'; +import { getMLType } from '../../../shared/ml_inference/utils'; + +export interface TargetFieldHelpTextProps { + model?: TrainedModel; + pipelineName: string; + targetField: string; +} + +export const TargetFieldHelpText: React.FC<TargetFieldHelpTextProps> = ({ + pipelineName, + targetField, + model, +}) => { + const baseText = targetField + ? i18n.translate( + 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.targetField.helpText.userProvided', + { + defaultMessage: + 'This names the field that holds the inference result. It will be prefixed with "ml.inference", ml.inference.{targetField}', + values: { + targetField, + }, + } + ) + : i18n.translate( + 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.targetField.helpText.default', + { + defaultMessage: + 'This names the field that holds the inference result. It will be prefixed with "ml.inference", if not set it will be defaulted to "ml.inference.{pipelineName}"', + values: { + pipelineName: pipelineName || '<Pipeline Name>', + }, + } + ); + const fieldName = targetField || pipelineName || '<Pipeline Name>'; + const modelType = model ? getMLType(getMlModelTypesForModelConfig(model)) : ''; + if (modelType === SUPPORTED_PYTORCH_TASKS.TEXT_CLASSIFICATION) { + return ( + <EuiText size="xs"> + <p>{baseText}</p> + <p> + <FormattedMessage + id="xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.targetField.helpText.textClassificationModel" + defaultMessage='Additionally the predicted_value will be copied to "{fieldName}", if the prediction_probability is greater than {probabilityThreshold}' + values={{ + fieldName, + probabilityThreshold: <FormattedNumber value={0.5} />, + }} + /> + </p> + </EuiText> + ); + } + if (modelType === SUPPORTED_PYTORCH_TASKS.TEXT_EMBEDDING) { + return ( + <EuiText size="xs"> + <p>{baseText}</p> + <p> + {i18n.translate( + 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.targetField.helpText.textEmbeddingModel', + { + defaultMessage: 'Additionally the predicted_value will be copied to "{fieldName}"', + values: { + fieldName, + }, + } + )} + </p> + </EuiText> + ); + } + return <EuiText size="xs">{baseText}</EuiText>; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/utils.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/utils.ts index 537a3bc43699c..e83cd35992f77 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/utils.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/utils.ts @@ -74,5 +74,5 @@ export const MODEL_SELECT_PLACEHOLDER = i18n.translate( export const MODEL_REDACTED_VALUE = i18n.translate( 'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.model.redactedValue', - { defaultMessage: 'Model is unavailable' } + { defaultMessage: "This model isn't available in the Kibana space" } ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index fe5089e92b93e..7e5a7c2284f13 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -33,7 +33,7 @@ import { baseBreadcrumbs } from '../search_indices'; import { getHeaderActions } from './components/header_actions/header_actions'; import { ConnectorConfiguration } from './connector/connector_configuration'; import { ConnectorSchedulingComponent } from './connector/connector_scheduling'; -import { ConnectorFiltering } from './connector/filtering/connector_filtering'; +import { ConnectorSyncRules } from './connector/sync_rules/connector_rules'; import { AutomaticCrawlScheduler } from './crawler/automatic_crawl_scheduler/automatic_crawl_scheduler'; import { CrawlCustomSettingsFlyout } from './crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout'; import { SearchIndexDomainManagement } from './crawler/domain_management/domain_management'; @@ -52,7 +52,7 @@ export enum SearchIndexTabId { PIPELINES = 'pipelines', // connector indices CONFIGURATION = 'configuration', - FILTERS = 'filters', + SYNC_RULES = 'sync_rules', SCHEDULING = 'scheduling', // crawler indices DOMAIN_MANAGEMENT = 'domain_management', @@ -128,10 +128,10 @@ export const SearchIndex: React.FC = () => { ...(hasFilteringFeature ? [ { - content: <ConnectorFiltering />, - id: SearchIndexTabId.FILTERS, - name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.filtersTabLabel', { - defaultMessage: 'Filters', + content: <ConnectorSyncRules />, + id: SearchIndexTabId.SYNC_RULES, + name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.syncRulesTabLabel', { + defaultMessage: 'Sync rules', }), }, ] diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/__snapshots__/filtering_panel.test.tsx.snap b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/__snapshots__/filtering_panel.test.tsx.snap index 474f60bd853f6..7993d123e8812 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/__snapshots__/filtering_panel.test.tsx.snap +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/__snapshots__/filtering_panel.test.tsx.snap @@ -3,7 +3,7 @@ exports[`FilteringPanel renders 1`] = ` <Fragment> <FlyoutPanel - title="Filtering" + title="Sync rules" > <FilteringRulesTable filteringRules={Array []} @@ -16,7 +16,7 @@ exports[`FilteringPanel renders 1`] = ` exports[`FilteringPanel renders advanced snippet 1`] = ` <Fragment> <FlyoutPanel - title="Filtering" + title="Sync rules" > <FilteringRulesTable filteringRules={ @@ -58,7 +58,7 @@ exports[`FilteringPanel renders advanced snippet 1`] = ` </FlyoutPanel> <EuiSpacer /> <FlyoutPanel - title="Advanced filtering rules" + title="Advanced sync rules" > <EuiPanel hasShadow={false} @@ -80,7 +80,7 @@ exports[`FilteringPanel renders advanced snippet 1`] = ` exports[`FilteringPanel renders filtering rules list 1`] = ` <Fragment> <FlyoutPanel - title="Filtering" + title="Sync rules" > <FilteringRulesTable filteringRules={ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/filtering_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/filtering_panel.tsx index 08e07259b14ad..f5807525dbabe 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/filtering_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/filtering_panel.tsx @@ -29,8 +29,8 @@ export const FilteringPanel: React.FC<FilteringPanelProps> = ({ return ( <> <FlyoutPanel - title={i18n.translate('xpack.enterpriseSearch.content.index.syncJobs.filteringTitle', { - defaultMessage: 'Filtering', + title={i18n.translate('xpack.enterpriseSearch.content.index.syncJobs.syncRulesTitle', { + defaultMessage: 'Sync rules', })} > <FilteringRulesTable filteringRules={filteringRules} showOrder={false} /> @@ -40,9 +40,9 @@ export const FilteringPanel: React.FC<FilteringPanelProps> = ({ <EuiSpacer /> <FlyoutPanel title={i18n.translate( - 'xpack.enterpriseSearch.content.index.syncJobs.filteringAdvancedTitle', + 'xpack.enterpriseSearch.content.index.syncJobs.syncRulesAdvancedTitle', { - defaultMessage: 'Advanced filtering rules', + defaultMessage: 'Advanced sync rules', } )} > diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts index f92b4b0fc36ac..3c86579b48e94 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts @@ -83,6 +83,7 @@ class DocLinks { public searchUIAppSearch: string; public searchUIElasticsearch: string; public start: string; + public syncRules: string; public workplaceSearchApiKeys: string; public workplaceSearchBox: string; public workplaceSearchConfluenceCloud: string; @@ -195,6 +196,7 @@ class DocLinks { this.searchUIAppSearch = ''; this.searchUIElasticsearch = ''; this.start = ''; + this.syncRules = ''; this.workplaceSearchApiKeys = ''; this.workplaceSearchBox = ''; this.workplaceSearchConfluenceCloud = ''; @@ -309,6 +311,7 @@ class DocLinks { this.searchUIAppSearch = docLinks.links.searchUI.appSearch; this.searchUIElasticsearch = docLinks.links.searchUI.elasticsearch; this.start = docLinks.links.enterpriseSearch.start; + this.syncRules = docLinks.links.enterpriseSearch.syncRules; this.workplaceSearchApiKeys = docLinks.links.workplaceSearch.apiKeys; this.workplaceSearchBox = docLinks.links.workplaceSearch.box; this.workplaceSearchConfluenceCloud = docLinks.links.workplaceSearch.confluenceCloud; diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.test.ts index ed4544cdeb2eb..21e1b1cf06f3c 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.test.ts @@ -39,7 +39,7 @@ describe('addConnector lib function', () => { must: [ { term: { - connector_id: 'connectorId', + 'connector.id': 'connectorId', }, }, { @@ -63,7 +63,7 @@ describe('addConnector lib function', () => { must: [ { term: { - connector_id: 'connectorId', + 'connector.id': 'connectorId', }, }, { diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.ts index 91b439f072d94..e7baf077b540a 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/post_cancel_syncs.ts @@ -21,7 +21,7 @@ export const cancelSyncs = async ( must: [ { term: { - connector_id: connectorId, + 'connector.id': connectorId, }, }, { @@ -45,7 +45,7 @@ export const cancelSyncs = async ( must: [ { term: { - connector_id: connectorId, + 'connector.id': connectorId, }, }, { diff --git a/x-pack/plugins/enterprise_search/server/lib/stats/get_sync_jobs.ts b/x-pack/plugins/enterprise_search/server/lib/stats/get_sync_jobs.ts index 99d62926eddd2..64d1adc45ff16 100644 --- a/x-pack/plugins/enterprise_search/server/lib/stats/get_sync_jobs.ts +++ b/x-pack/plugins/enterprise_search/server/lib/stats/get_sync_jobs.ts @@ -24,8 +24,14 @@ export const fetchSyncJobsStats = async (client: IScopedClusterClient): Promise< const orphanedJobsCountResponse = await client.asCurrentUser.count({ index: CONNECTORS_JOBS_INDEX, query: { - terms: { - 'connector.id': ids, + bool: { + must_not: [ + { + terms: { + 'connector.id': ids, + }, + }, + ], }, }, }); @@ -51,7 +57,7 @@ export const fetchSyncJobsStats = async (client: IScopedClusterClient): Promise< }, { range: { - last_seen: { + started_at: { lt: moment().subtract(1, 'day').toISOString(), }, }, @@ -62,10 +68,10 @@ export const fetchSyncJobsStats = async (client: IScopedClusterClient): Promise< }); const errorResponse = await client.asCurrentUser.count({ - index: CONNECTORS_JOBS_INDEX, + index: CONNECTORS_INDEX, query: { term: { - status: SyncStatus.ERROR, + last_sync_status: SyncStatus.ERROR, }, }, }); @@ -109,7 +115,7 @@ export const fetchSyncJobsStats = async (client: IScopedClusterClient): Promise< { range: { last_seen: { - gt: moment().subtract(30, 'minutes').toISOString(), + lt: moment().subtract(30, 'minutes').toISOString(), }, }, }, diff --git a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap index 37b116f7611e8..5ab73d95c15de 100644 --- a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap +++ b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap @@ -169,6 +169,10 @@ Array [ "id": "filesManagement", "subFeatures": undefined, }, + Object { + "id": "filesSharedImage", + "subFeatures": undefined, + }, Object { "id": "savedObjectsManagement", "subFeatures": undefined, @@ -457,6 +461,10 @@ Array [ "id": "filesManagement", "subFeatures": undefined, }, + Object { + "id": "filesSharedImage", + "subFeatures": undefined, + }, Object { "id": "savedObjectsManagement", "subFeatures": undefined, @@ -773,6 +781,7 @@ Array [ "privilege": Object { "api": Array [ "files:manageFiles", + "files:defaultImage", ], "app": Array [ "kibana", @@ -784,7 +793,8 @@ Array [ }, "savedObject": Object { "all": Array [ - "files", + "file", + "fileShare", ], "read": Array [], }, @@ -796,6 +806,7 @@ Array [ "privilege": Object { "api": Array [ "files:manageFiles", + "files:defaultImage", ], "app": Array [ "kibana", @@ -808,7 +819,49 @@ Array [ "savedObject": Object { "all": Array [], "read": Array [ - "files", + "file", + "fileShare", + ], + }, + "ui": Array [], + }, + "privilegeId": "read", + }, +] +`; + +exports[`buildOSSFeatures with a basic license returns the filesSharedImage feature augmented with appropriate sub feature privileges 1`] = ` +Array [ + Object { + "privilege": Object { + "api": Array [ + "files:defaultImage", + ], + "app": Array [ + "kibana", + ], + "savedObject": Object { + "all": Array [ + "file", + ], + "read": Array [], + }, + "ui": Array [], + }, + "privilegeId": "all", + }, + Object { + "privilege": Object { + "api": Array [ + "files:defaultImage", + ], + "app": Array [ + "kibana", + ], + "savedObject": Object { + "all": Array [], + "read": Array [ + "file", ], }, "ui": Array [], @@ -1332,6 +1385,7 @@ Array [ "privilege": Object { "api": Array [ "files:manageFiles", + "files:defaultImage", ], "app": Array [ "kibana", @@ -1343,7 +1397,8 @@ Array [ }, "savedObject": Object { "all": Array [ - "files", + "file", + "fileShare", ], "read": Array [], }, @@ -1355,6 +1410,7 @@ Array [ "privilege": Object { "api": Array [ "files:manageFiles", + "files:defaultImage", ], "app": Array [ "kibana", @@ -1367,7 +1423,49 @@ Array [ "savedObject": Object { "all": Array [], "read": Array [ - "files", + "file", + "fileShare", + ], + }, + "ui": Array [], + }, + "privilegeId": "read", + }, +] +`; + +exports[`buildOSSFeatures with a enterprise license returns the filesSharedImage feature augmented with appropriate sub feature privileges 1`] = ` +Array [ + Object { + "privilege": Object { + "api": Array [ + "files:defaultImage", + ], + "app": Array [ + "kibana", + ], + "savedObject": Object { + "all": Array [ + "file", + ], + "read": Array [], + }, + "ui": Array [], + }, + "privilegeId": "all", + }, + Object { + "privilege": Object { + "api": Array [ + "files:defaultImage", + ], + "app": Array [ + "kibana", + ], + "savedObject": Object { + "all": Array [], + "read": Array [ + "file", ], }, "ui": Array [], diff --git a/x-pack/plugins/features/server/oss_features.ts b/x-pack/plugins/features/server/oss_features.ts index 120c8a5652d09..076ef4941c530 100644 --- a/x-pack/plugins/features/server/oss_features.ts +++ b/x-pack/plugins/features/server/oss_features.ts @@ -441,11 +441,11 @@ export const buildOSSFeatures = ({ kibana: ['filesManagement'], }, savedObject: { - all: ['files'], + all: ['file', 'fileShare'], read: [], }, ui: [], - api: ['files:manageFiles'], + api: ['files:manageFiles', 'files:defaultImage'], }, read: { app: ['kibana'], @@ -454,10 +454,43 @@ export const buildOSSFeatures = ({ }, savedObject: { all: [], - read: ['files'], + read: ['file', 'fileShare'], }, ui: [], - api: ['files:manageFiles'], + api: ['files:manageFiles', 'files:defaultImage'], + }, + }, + }, + { + id: 'filesSharedImage', + name: i18n.translate('xpack.features.filesSharedImagesFeatureName', { + defaultMessage: 'Shared images', + }), + order: 1600, + category: DEFAULT_APP_CATEGORIES.management, + app: ['kibana'], + catalogue: [], + privilegesTooltip: i18n.translate('xpack.features.filesSharedImagesPrivilegesTooltip', { + defaultMessage: 'Required to access images stored in Kibana.', + }), + privileges: { + all: { + app: ['kibana'], + savedObject: { + all: ['file'], + read: [], + }, + ui: [], + api: ['files:defaultImage'], + }, + read: { + app: ['kibana'], + savedObject: { + all: [], + read: ['file'], + }, + ui: [], + api: ['files:defaultImage'], }, }, }, diff --git a/x-pack/plugins/features/server/plugin.test.ts b/x-pack/plugins/features/server/plugin.test.ts index cc366456b4d87..e1eac3ebbd481 100644 --- a/x-pack/plugins/features/server/plugin.test.ts +++ b/x-pack/plugins/features/server/plugin.test.ts @@ -67,6 +67,7 @@ describe('Features Plugin', () => { "advancedSettings", "indexPatterns", "filesManagement", + "filesSharedImage", "savedObjectsManagement", ] `); diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/confirm_fleet_server_connection.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/confirm_fleet_server_connection.tsx index f09d529b7f531..de6ff3f95fbf9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/confirm_fleet_server_connection.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/confirm_fleet_server_connection.tsx @@ -47,6 +47,7 @@ const ConfirmFleetServerConnectionStepContent: React.FunctionComponent<{ const handleContinueClick = () => { fleetStatus.forceDisplayInstructions = false; + flyoutContext.closeFleetServerFlyout(); flyoutContext.openEnrollmentFlyout(); }; @@ -61,7 +62,11 @@ const ConfirmFleetServerConnectionStepContent: React.FunctionComponent<{ <EuiSpacer size="m" /> - <EuiButton color="primary" onClick={handleContinueClick}> + <EuiButton + color="primary" + onClick={handleContinueClick} + data-test-subj="fleetServerFlyoutContinueEnrollingButton" + > <FormattedMessage id="xpack.fleet.fleetServerFlyout.continueEnrollingButton" defaultMessage="Continue enrolling Elastic Agent" diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx index ec19ee509a5a0..a1a606a1832af 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx @@ -5,6 +5,7 @@ * 2.0. */ +/* eslint-disable @elastic/eui/href-or-on-click */ import React from 'react'; import type { EuiStepProps } from '@elastic/eui'; @@ -14,7 +15,7 @@ import { EuiCode, EuiForm, EuiFormErrorText, - EuiLink, + EuiButtonEmpty, EuiSpacer, EuiText, EuiFormRow, @@ -26,7 +27,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { MultiRowInput } from '../../../sections/settings/components/multi_row_input'; -import { useLink } from '../../../hooks'; +import { useLink, useFlyoutContext } from '../../../hooks'; import type { QuickStartCreateForm } from '../hooks'; import { FleetServerHostSelect } from '../components'; @@ -51,6 +52,7 @@ const GettingStartedStepContent: React.FunctionComponent<QuickStartCreateForm> = submit, }) => { const { getHref } = useLink(); + const flyoutContext = useFlyoutContext(); if (status === 'success') { return ( @@ -71,12 +73,16 @@ const GettingStartedStepContent: React.FunctionComponent<QuickStartCreateForm> = values={{ hostUrl: <EuiCode>{selectedFleetServerHost?.host_urls[0]}</EuiCode>, fleetSettingsLink: ( - <EuiLink href={getHref('settings')}> + <EuiButtonEmpty + href={getHref('settings')} + onClick={() => flyoutContext.closeFleetServerFlyout()} + flush="left" + > <FormattedMessage id="xpack.fleet.fleetServerSetup.fleetSettingsLink" defaultMessage="Fleet Settings" /> - </EuiLink> + </EuiButtonEmpty> ), }} /> diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx index 179f61db9a5b7..a4c2fb335e9a5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx @@ -18,6 +18,7 @@ import { EuiFieldNumber, EuiFieldText, EuiSuperSelect, + EuiToolTip, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; @@ -71,6 +72,10 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> = // agent monitoring checkbox group can appear multiple times in the DOM, ids have to be unique to work correctly const monitoringCheckboxIdSuffix = Date.now(); + const hasManagedPackagePolicy = + 'package_policies' in agentPolicy && + agentPolicy?.package_policies?.some((packagePolicy) => packagePolicy.is_managed); + return ( <> <EuiDescribedFormGroup @@ -474,16 +479,28 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> = > {(deleteAgentPolicyPrompt) => { return ( - <EuiButton - data-test-subj="agentPolicyForm.downloadSource.deleteBtn" - color="danger" - onClick={() => deleteAgentPolicyPrompt(agentPolicy.id!, onDelete)} + <EuiToolTip + content={ + hasManagedPackagePolicy ? ( + <FormattedMessage + id="xpack.fleet.policyForm.deletePolicyActionText.disabled" + defaultMessage="Agent policy with managed package policies cannot be deleted." + /> + ) : undefined + } > - <FormattedMessage - id="xpack.fleet.policyForm.deletePolicyActionText" - defaultMessage="Delete policy" - /> - </EuiButton> + <EuiButton + data-test-subj="agentPolicyForm.downloadSource.deleteBtn" + color="danger" + onClick={() => deleteAgentPolicyPrompt(agentPolicy.id!, onDelete)} + isDisabled={hasManagedPackagePolicy} + > + <FormattedMessage + id="xpack.fleet.policyForm.deletePolicyActionText" + defaultMessage="Delete policy" + /> + </EuiButton> + </EuiToolTip> ); }} </AgentPolicyDeleteProvider> diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_config.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_config.tsx index 73787b3a5afe9..dff5d719dc36d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_config.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_config.tsx @@ -6,7 +6,6 @@ */ import React, { useState, Fragment, memo, useMemo } from 'react'; -import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlexGrid, @@ -23,10 +22,6 @@ import { isAdvancedVar, validationHasErrors } from '../../../services'; import { PackagePolicyInputVarField } from './package_policy_input_var_field'; -const FlexItemWithMaxWidth = styled(EuiFlexItem)` - max-width: calc(50% - ${(props) => props.theme.eui.euiSizeL}); -`; - export const PackagePolicyInputConfig: React.FunctionComponent<{ hasInputStreams: boolean; packageInputVars?: RegistryVarsEntry[]; @@ -101,7 +96,7 @@ export const PackagePolicyInputConfig: React.FunctionComponent<{ </EuiFlexItem> </EuiFlexGroup> </EuiFlexItem> - <FlexItemWithMaxWidth> + <EuiFlexItem> <EuiFlexGroup direction="column" gutterSize="m"> {requiredVars.map((varDef) => { const { name: varName, type: varType } = varDef; @@ -191,7 +186,7 @@ export const PackagePolicyInputConfig: React.FunctionComponent<{ </Fragment> ) : null} </EuiFlexGroup> - </FlexItemWithMaxWidth> + </EuiFlexItem> </EuiFlexGrid> ); } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx index 716636bbb24bf..184deb98abd63 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx @@ -42,11 +42,8 @@ import { PackagePolicyEditorDatastreamMappings } from '../../datastream_mappings import { PackagePolicyInputVarField } from './package_policy_input_var_field'; import { useDataStreamId } from './hooks'; -const FlexItemWithMaxWidth = styled(EuiFlexItem)` - max-width: calc(50% - ${(props) => props.theme.eui.euiSizeL}); -`; - const ScrollAnchor = styled.div` + display: none; scroll-margin-top: ${(props) => parseFloat(props.theme.eui.euiHeaderHeightCompensation) * 2}px; `; @@ -78,7 +75,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>( const defaultDataStreamId = useDataStreamId(); const containerRef = useRef<HTMLDivElement>(null); - const isDefaultDatstream = + const isDefaultDatastream = !!defaultDataStreamId && !!packagePolicyInputStream.id && packagePolicyInputStream.id === defaultDataStreamId; @@ -86,13 +83,13 @@ export const PackagePolicyInputStreamConfig = memo<Props>( const isInputOnlyPackage = packageInfo.type === 'input'; useEffect(() => { - if (isDefaultDatstream && containerRef.current) { + if (isDefaultDatastream && containerRef.current) { containerRef.current.scrollIntoView(); } - }, [isDefaultDatstream, containerRef]); + }, [isDefaultDatastream, containerRef]); // Showing advanced options toggle state - const [isShowingAdvanced, setIsShowingAdvanced] = useState<boolean>(isDefaultDatstream); + const [isShowingAdvanced, setIsShowingAdvanced] = useState<boolean>(isDefaultDatastream); // Errors state const hasErrors = forceShowErrors && validationHasErrors(inputStreamValidationResults); @@ -180,7 +177,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>( return ( <> - <EuiFlexGrid columns={2} id={isDefaultDatstream ? 'test123' : 'asas'}> + <EuiFlexGrid columns={2}> <ScrollAnchor ref={containerRef} /> <EuiFlexItem> <EuiFlexGroup gutterSize="none" alignItems="flexStart"> @@ -227,7 +224,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>( </EuiFlexItem> </EuiFlexGroup> </EuiFlexItem> - <FlexItemWithMaxWidth> + <EuiFlexItem> <EuiFlexGroup direction="column" gutterSize="m"> {requiredVars.map((varDef) => { if (!packagePolicyInputStream?.vars) return null; @@ -415,7 +412,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>( ) : null} </Fragment> </EuiFlexGroup> - </FlexItemWithMaxWidth> + </EuiFlexItem> </EuiFlexGrid> </> ); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx index 0eccf5a8cec33..4b9c82bc248f5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx @@ -41,170 +41,172 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{ return ( <EuiPanel> <EuiDescriptionList compressed> - {[ - { - title: i18n.translate('xpack.fleet.agentDetails.statusLabel', { - defaultMessage: 'Status', - }), - description: <AgentHealth agent={agent} showOfflinePreviousStatus={true} />, - }, - { - title: i18n.translate('xpack.fleet.agentDetails.lastActivityLabel', { - defaultMessage: 'Last activity', - }), - description: agent.last_checkin ? ( - <FormattedRelative value={new Date(agent.last_checkin)} /> - ) : ( - '-' - ), - }, - { - title: i18n.translate('xpack.fleet.agentDetails.lastCheckinMessageLabel', { - defaultMessage: 'Last checkin message', - }), - description: agent.last_checkin_message ? agent.last_checkin_message : '-', - }, - { - title: i18n.translate('xpack.fleet.agentDetails.hostIdLabel', { - defaultMessage: 'Agent ID', - }), - description: agent.id, - }, - { - title: i18n.translate('xpack.fleet.agentDetails.agentPolicyLabel', { - defaultMessage: 'Agent policy', - }), - description: agentPolicy ? ( - <AgentPolicySummaryLine policy={agentPolicy} agent={agent} /> - ) : ( - agent.policy_id || '-' - ), - }, - { - title: i18n.translate('xpack.fleet.agentDetails.versionLabel', { - defaultMessage: 'Agent version', - }), - description: - typeof agent.local_metadata?.elastic?.agent?.version === 'string' ? ( - <EuiFlexGroup gutterSize="s" alignItems="center" style={{ minWidth: 0 }}> - <EuiFlexItem grow={false} className="eui-textNoWrap"> - {agent.local_metadata.elastic.agent.version} - </EuiFlexItem> - {isAgentUpgradeable(agent, kibanaVersion) ? ( - <EuiFlexItem grow={false}> - <EuiToolTip - position="right" - content={i18n.translate('xpack.fleet.agentList.agentUpgradeLabel', { - defaultMessage: 'Upgrade available', - })} - > - <EuiIcon type="alert" color="warning" /> - </EuiToolTip> - </EuiFlexItem> - ) : null} - </EuiFlexGroup> + <EuiFlexGroup direction="column" gutterSize="m"> + {[ + { + title: i18n.translate('xpack.fleet.agentDetails.statusLabel', { + defaultMessage: 'Status', + }), + description: <AgentHealth agent={agent} showOfflinePreviousStatus={true} />, + }, + { + title: i18n.translate('xpack.fleet.agentDetails.lastActivityLabel', { + defaultMessage: 'Last activity', + }), + description: agent.last_checkin ? ( + <FormattedRelative value={new Date(agent.last_checkin)} /> ) : ( '-' ), - }, - { - title: i18n.translate('xpack.fleet.agentDetails.hostNameLabel', { - defaultMessage: 'Host name', - }), - description: - typeof agent.local_metadata?.host?.hostname === 'string' - ? agent.local_metadata.host.hostname - : '-', - }, - { - title: i18n.translate('xpack.fleet.agentDetails.logLevel', { - defaultMessage: 'Logging level', - }), - description: - typeof agent.local_metadata?.elastic?.agent?.log_level === 'string' - ? agent.local_metadata.elastic.agent.log_level - : '-', - }, - { - title: i18n.translate('xpack.fleet.agentDetails.releaseLabel', { - defaultMessage: 'Agent release', - }), - description: - typeof agent.local_metadata?.elastic?.agent?.snapshot === 'boolean' - ? agent.local_metadata.elastic.agent.snapshot === true - ? 'snapshot' - : 'stable' - : '-', - }, - { - title: i18n.translate('xpack.fleet.agentDetails.platformLabel', { - defaultMessage: 'Platform', - }), - description: - typeof agent.local_metadata?.os?.platform === 'string' - ? agent.local_metadata.os.platform - : '-', - }, - { - title: i18n.translate('xpack.fleet.agentDetails.monitorLogsLabel', { - defaultMessage: 'Monitor logs', - }), - description: - Array.isArray(agentPolicy?.monitoring_enabled) && - agentPolicy?.monitoring_enabled?.includes('logs') ? ( - <FormattedMessage - id="xpack.fleet.agentList.monitorLogsEnabledText" - defaultMessage="Enabled" - /> - ) : ( - <FormattedMessage - id="xpack.fleet.agentList.monitorLogsDisabledText" - defaultMessage="Disabled" - /> - ), - }, - { - title: i18n.translate('xpack.fleet.agentDetails.monitorMetricsLabel', { - defaultMessage: 'Monitor metrics', - }), - description: - Array.isArray(agentPolicy?.monitoring_enabled) && - agentPolicy?.monitoring_enabled?.includes('metrics') ? ( - <FormattedMessage - id="xpack.fleet.agentList.monitorMetricsEnabledText" - defaultMessage="Enabled" - /> + }, + { + title: i18n.translate('xpack.fleet.agentDetails.lastCheckinMessageLabel', { + defaultMessage: 'Last checkin message', + }), + description: agent.last_checkin_message ? agent.last_checkin_message : '-', + }, + { + title: i18n.translate('xpack.fleet.agentDetails.hostIdLabel', { + defaultMessage: 'Agent ID', + }), + description: agent.id, + }, + { + title: i18n.translate('xpack.fleet.agentDetails.agentPolicyLabel', { + defaultMessage: 'Agent policy', + }), + description: agentPolicy ? ( + <AgentPolicySummaryLine policy={agentPolicy} agent={agent} /> ) : ( - <FormattedMessage - id="xpack.fleet.agentList.monitorMetricsDisabledText" - defaultMessage="Disabled" - /> + agent.policy_id || '-' ), - }, - { - title: i18n.translate('xpack.fleet.agentDetails.tagsLabel', { - defaultMessage: 'Tags', - }), - description: (agent.tags ?? []).length > 0 ? <Tags tags={agent.tags ?? []} /> : '-', - }, - ].map(({ title, description }) => { - const tooltip = - typeof description === 'string' && description.length > 20 ? description : ''; - return ( - <EuiFlexGroup> - <FlexItemWithMinWidth grow={3}> - <EuiDescriptionListTitle>{title}</EuiDescriptionListTitle> - </FlexItemWithMinWidth> - <FlexItemWithMinWidth grow={7}> - <EuiToolTip position="top" content={tooltip}> - <EuiDescriptionListDescription className="eui-textTruncate"> - {description} - </EuiDescriptionListDescription> - </EuiToolTip> - </FlexItemWithMinWidth> - </EuiFlexGroup> - ); - })} + }, + { + title: i18n.translate('xpack.fleet.agentDetails.versionLabel', { + defaultMessage: 'Agent version', + }), + description: + typeof agent.local_metadata?.elastic?.agent?.version === 'string' ? ( + <EuiFlexGroup gutterSize="s" alignItems="center" style={{ minWidth: 0 }}> + <EuiFlexItem grow={false} className="eui-textNoWrap"> + {agent.local_metadata.elastic.agent.version} + </EuiFlexItem> + {isAgentUpgradeable(agent, kibanaVersion) ? ( + <EuiFlexItem grow={false}> + <EuiToolTip + position="right" + content={i18n.translate('xpack.fleet.agentList.agentUpgradeLabel', { + defaultMessage: 'Upgrade available', + })} + > + <EuiIcon type="alert" color="warning" /> + </EuiToolTip> + </EuiFlexItem> + ) : null} + </EuiFlexGroup> + ) : ( + '-' + ), + }, + { + title: i18n.translate('xpack.fleet.agentDetails.hostNameLabel', { + defaultMessage: 'Host name', + }), + description: + typeof agent.local_metadata?.host?.hostname === 'string' + ? agent.local_metadata.host.hostname + : '-', + }, + { + title: i18n.translate('xpack.fleet.agentDetails.logLevel', { + defaultMessage: 'Logging level', + }), + description: + typeof agent.local_metadata?.elastic?.agent?.log_level === 'string' + ? agent.local_metadata.elastic.agent.log_level + : '-', + }, + { + title: i18n.translate('xpack.fleet.agentDetails.releaseLabel', { + defaultMessage: 'Agent release', + }), + description: + typeof agent.local_metadata?.elastic?.agent?.snapshot === 'boolean' + ? agent.local_metadata.elastic.agent.snapshot === true + ? 'snapshot' + : 'stable' + : '-', + }, + { + title: i18n.translate('xpack.fleet.agentDetails.platformLabel', { + defaultMessage: 'Platform', + }), + description: + typeof agent.local_metadata?.os?.platform === 'string' + ? agent.local_metadata.os.platform + : '-', + }, + { + title: i18n.translate('xpack.fleet.agentDetails.monitorLogsLabel', { + defaultMessage: 'Monitor logs', + }), + description: + Array.isArray(agentPolicy?.monitoring_enabled) && + agentPolicy?.monitoring_enabled?.includes('logs') ? ( + <FormattedMessage + id="xpack.fleet.agentList.monitorLogsEnabledText" + defaultMessage="Enabled" + /> + ) : ( + <FormattedMessage + id="xpack.fleet.agentList.monitorLogsDisabledText" + defaultMessage="Disabled" + /> + ), + }, + { + title: i18n.translate('xpack.fleet.agentDetails.monitorMetricsLabel', { + defaultMessage: 'Monitor metrics', + }), + description: + Array.isArray(agentPolicy?.monitoring_enabled) && + agentPolicy?.monitoring_enabled?.includes('metrics') ? ( + <FormattedMessage + id="xpack.fleet.agentList.monitorMetricsEnabledText" + defaultMessage="Enabled" + /> + ) : ( + <FormattedMessage + id="xpack.fleet.agentList.monitorMetricsDisabledText" + defaultMessage="Disabled" + /> + ), + }, + { + title: i18n.translate('xpack.fleet.agentDetails.tagsLabel', { + defaultMessage: 'Tags', + }), + description: (agent.tags ?? []).length > 0 ? <Tags tags={agent.tags ?? []} /> : '-', + }, + ].map(({ title, description }) => { + const tooltip = + typeof description === 'string' && description.length > 20 ? description : ''; + return ( + <EuiFlexGroup> + <FlexItemWithMinWidth grow={3}> + <EuiDescriptionListTitle>{title}</EuiDescriptionListTitle> + </FlexItemWithMinWidth> + <FlexItemWithMinWidth grow={7}> + <EuiToolTip position="top" content={tooltip}> + <EuiDescriptionListDescription className="eui-textTruncate"> + {description} + </EuiDescriptionListDescription> + </EuiToolTip> + </FlexItemWithMinWidth> + </EuiFlexGroup> + ); + })} + </EuiFlexGroup> </EuiDescriptionList> </EuiPanel> ); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_proxies_table/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_proxies_table/index.tsx index f4bfb93f80e5e..9482078607094 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_proxies_table/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_proxies_table/index.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; -import { EuiBasicTable, EuiButtonIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiBasicTable, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; import type { EuiBasicTableColumn } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -43,6 +43,19 @@ export const FleetProxiesTable: React.FunctionComponent<FleetProxiesTableProps> {fleetProxy.name} </p> </NameFlexItemWithMaxWidth> + {fleetProxy.is_preconfigured && ( + <EuiFlexItem grow={false}> + <EuiIconTip + content={i18n.translate('xpack.fleet.settings.fleetProxiesTable.managedTooltip', { + defaultMessage: + 'This proxy is managed outside of Fleet. Please refer to your kibana config file for more info.', + })} + type="lock" + size="m" + color="subdued" + /> + </EuiFlexItem> + )} </EuiFlexGroup> ), width: '288px', @@ -60,7 +73,7 @@ export const FleetProxiesTable: React.FunctionComponent<FleetProxiesTableProps> { width: '68px', render: (fleetProxy: FleetProxy) => { - const isDeleteVisible = true; + const isDeleteVisible = !fleetProxy.is_preconfigured; return ( <EuiFlexGroup gutterSize="s" justifyContent="flexEnd"> diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/index.tsx index 462862e5b4004..52b1a7ccbf641 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/index.tsx @@ -25,6 +25,7 @@ import { EuiFormRow, EuiSwitch, EuiComboBox, + EuiCallOut, } from '@elastic/eui'; import { MultiRowInput } from '../multi_row_input'; @@ -76,6 +77,23 @@ export const FleetServerHostsFlyout: React.FunctionComponent<FleetServerHostsFly </EuiTitle> </EuiFlyoutHeader> <EuiFlyoutBody> + <EuiCallOut + size="m" + color="warning" + iconType="alert" + title={ + <FormattedMessage + id="xpack.fleet.settings.fleetServerHostsFlyout.warningCalloutTitle" + defaultMessage="Changing these settings can break your agent connections" + /> + } + > + <FormattedMessage + id="xpack.fleet.settings.fleetServerHostsFlyout.warningCalloutDescription" + defaultMessage="Invalid settings can break the connection between Elastic Agent and Fleet Server. If this happens, you will need to re-enroll your agents." + /> + </EuiCallOut> + <EuiSpacer size="m" /> <EuiForm onSubmit={form.submit}> <TextInput label={ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/settings_page/fleet_proxies_section.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/settings_page/fleet_proxies_section.tsx index f2294058b7fba..302736cffdaea 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/settings_page/fleet_proxies_section.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/settings_page/fleet_proxies_section.tsx @@ -6,7 +6,15 @@ */ import React from 'react'; -import { EuiTitle, EuiText, EuiSpacer, EuiButtonEmpty } from '@elastic/eui'; +import { + EuiTitle, + EuiText, + EuiSpacer, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiBetaBadge, +} from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { useLink } from '../../../../hooks'; @@ -26,15 +34,21 @@ export const FleetProxiesSection: React.FunctionComponent<FleetProxiesSectionPro return ( <> - <EuiTitle size="s"> - <h4> - <FormattedMessage - id="xpack.fleet.settings.fleetProxiesSection.title" - defaultMessage="Proxies" - /> - </h4> - </EuiTitle> - <EuiSpacer size="xs" /> + <EuiFlexGroup gutterSize="xs"> + <EuiFlexItem grow={false}> + <EuiTitle size="s"> + <h4> + <FormattedMessage + id="xpack.fleet.settings.fleetProxiesSection.title" + defaultMessage="Proxies" + /> + </h4> + </EuiTitle> + </EuiFlexItem> + <EuiFlexItem grow={false}> + <EuiBetaBadge label="beta" /> + </EuiFlexItem> + </EuiFlexGroup> <EuiText color="subdued" size="m"> <FormattedMessage id="xpack.fleet.settings.fleetProxiesSection.subtitle" diff --git a/x-pack/plugins/fleet/server/collectors/agent_collectors.ts b/x-pack/plugins/fleet/server/collectors/agent_collectors.ts index 4828967462116..7861e7ac606a4 100644 --- a/x-pack/plugins/fleet/server/collectors/agent_collectors.ts +++ b/x-pack/plugins/fleet/server/collectors/agent_collectors.ts @@ -7,8 +7,9 @@ import type { SavedObjectsClient, ElasticsearchClient } from '@kbn/core/server'; -import type { FleetConfigType } from '../../common/types'; +import { AGENTS_INDEX } from '../../common'; import * as AgentService from '../services/agents'; +import { appContextService } from '../services'; export interface AgentUsage { total_enrolled: number; @@ -20,7 +21,6 @@ export interface AgentUsage { } export const getAgentUsage = async ( - config: FleetConfigType, soClient?: SavedObjectsClient, esClient?: ElasticsearchClient ): Promise<AgentUsage> => { @@ -47,3 +47,84 @@ export const getAgentUsage = async ( updating, }; }; + +export interface AgentData { + agent_versions: string[]; + agent_checkin_status: { + error: number; + degraded: number; + }; + agents_per_policy: number[]; +} + +const DEFAULT_AGENT_DATA = { + agent_versions: [], + agent_checkin_status: { error: 0, degraded: 0 }, + agents_per_policy: [], +}; + +export const getAgentData = async ( + esClient: ElasticsearchClient, + abortController: AbortController +): Promise<AgentData> => { + try { + const transformLastCheckinStatusBuckets = (resp: any) => + ((resp?.aggregations?.last_checkin_status as any).buckets ?? []).reduce( + (acc: any, bucket: any) => { + if (acc[bucket.key] !== undefined) acc[bucket.key] = bucket.doc_count; + return acc; + }, + { error: 0, degraded: 0 } + ); + const response = await esClient.search( + { + index: AGENTS_INDEX, + query: { + bool: { + filter: [ + { + term: { + active: 'true', + }, + }, + ], + }, + }, + size: 0, + aggs: { + versions: { + terms: { field: 'agent.version' }, + }, + last_checkin_status: { + terms: { field: 'last_checkin_status' }, + }, + policies: { + terms: { field: 'policy_id' }, + }, + }, + }, + { signal: abortController.signal } + ); + const versions = ((response?.aggregations?.versions as any).buckets ?? []).map( + (bucket: any) => bucket.key + ); + const statuses = transformLastCheckinStatusBuckets(response); + + const agentsPerPolicy = ((response?.aggregations?.policies as any).buckets ?? []).map( + (bucket: any) => bucket.doc_count + ); + + return { + agent_versions: versions, + agent_checkin_status: statuses, + agents_per_policy: agentsPerPolicy, + }; + } catch (error) { + if (error.statusCode === 404) { + appContextService.getLogger().debug('Index .fleet-agents does not exist yet.'); + } else { + throw error; + } + return DEFAULT_AGENT_DATA; + } +}; diff --git a/x-pack/plugins/fleet/server/collectors/agent_policies.ts b/x-pack/plugins/fleet/server/collectors/agent_policies.ts new file mode 100644 index 0000000000000..bd8075b09fd06 --- /dev/null +++ b/x-pack/plugins/fleet/server/collectors/agent_policies.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ElasticsearchClient } from '@kbn/core/server'; + +import { AGENT_POLICY_INDEX } from '../../common'; +import { ES_SEARCH_LIMIT } from '../../common/constants'; +import { appContextService } from '../services'; + +export interface AgentPoliciesUsage { + count: number; + output_types: string[]; +} + +const DEFAULT_AGENT_POLICIES_USAGE = { + count: 0, + output_types: [], +}; + +export const getAgentPoliciesUsage = async ( + esClient: ElasticsearchClient, + abortController: AbortController +): Promise<AgentPoliciesUsage> => { + try { + const res = await esClient.search( + { + index: AGENT_POLICY_INDEX, + size: ES_SEARCH_LIMIT, + track_total_hits: true, + rest_total_hits_as_int: true, + }, + { signal: abortController.signal } + ); + + const agentPolicies = res.hits.hits; + + const outputTypes = new Set<string>(); + agentPolicies.forEach((item) => { + const source = (item._source as any) ?? {}; + Object.keys(source.data.outputs).forEach((output) => { + outputTypes.add(source.data.outputs[output].type); + }); + }); + + return { + count: res.hits.total as number, + output_types: Array.from(outputTypes), + }; + } catch (error) { + if (error.statusCode === 404) { + appContextService.getLogger().debug('Index .fleet-policies does not exist yet.'); + } else { + throw error; + } + return DEFAULT_AGENT_POLICIES_USAGE; + } +}; diff --git a/x-pack/plugins/fleet/server/collectors/fleet_server_collector.ts b/x-pack/plugins/fleet/server/collectors/fleet_server_collector.ts index 4438b23c8a285..4d587e78563f6 100644 --- a/x-pack/plugins/fleet/server/collectors/fleet_server_collector.ts +++ b/x-pack/plugins/fleet/server/collectors/fleet_server_collector.ts @@ -7,6 +7,8 @@ import type { SavedObjectsClient, ElasticsearchClient } from '@kbn/core/server'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../constants'; + import { packagePolicyService } from '../services'; import { getAgentStatusForAgentPolicy } from '../services/agents'; import { listFleetServerHosts } from '../services/fleet_server_host'; @@ -84,3 +86,47 @@ export const getFleetServerUsage = async ( num_host_urls: numHostsUrls, }; }; + +export const getFleetServerConfig = async (soClient: SavedObjectsClient): Promise<any> => { + const res = await packagePolicyService.list(soClient, { + page: 1, + perPage: SO_SEARCH_LIMIT, + kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:fleet_server`, + }); + const getInputConfig = (item: any) => { + const config = (item.inputs[0] ?? {}).compiled_input; + if (config?.server) { + // whitelist only server limits, timeouts and runtime, sometimes fields are coming in "server.limits" format instead of nested object + const newConfig = Object.keys(config) + .filter((key) => key.startsWith('server')) + .reduce((acc: any, curr: string) => { + if (curr === 'server') { + acc.server = {}; + Object.keys(config.server) + .filter( + (key) => + key.startsWith('limits') || + key.startsWith('timeouts') || + key.startsWith('runtime') + ) + .forEach((serverKey: string) => { + acc.server[serverKey] = config.server[serverKey]; + return acc; + }); + } else { + acc[curr] = config[curr]; + } + return acc; + }, {}); + + return newConfig; + } else { + return {}; + } + }; + const policies = res.items.map((item) => ({ + input_config: getInputConfig(item), + })); + + return { policies }; +}; diff --git a/x-pack/plugins/fleet/server/collectors/register.ts b/x-pack/plugins/fleet/server/collectors/register.ts index a194ff9b560e5..2892de0685e2f 100644 --- a/x-pack/plugins/fleet/server/collectors/register.ts +++ b/x-pack/plugins/fleet/server/collectors/register.ts @@ -11,13 +11,14 @@ import type { CoreSetup } from '@kbn/core/server'; import type { FleetConfigType } from '..'; import { getIsAgentsEnabled } from './config_collectors'; -import { getAgentUsage } from './agent_collectors'; +import { getAgentUsage, getAgentData } from './agent_collectors'; import type { AgentUsage } from './agent_collectors'; import { getInternalClients } from './helpers'; import { getPackageUsage } from './package_collectors'; import type { PackageUsage } from './package_collectors'; -import { getFleetServerUsage } from './fleet_server_collector'; +import { getFleetServerUsage, getFleetServerConfig } from './fleet_server_collector'; import type { FleetServerUsage } from './fleet_server_collector'; +import { getAgentPoliciesUsage } from './agent_policies'; export interface Usage { agents_enabled: boolean; @@ -26,11 +27,33 @@ export interface Usage { fleet_server: FleetServerUsage; } -export const fetchUsage = async (core: CoreSetup, config: FleetConfigType) => { +export const fetchFleetUsage = async ( + core: CoreSetup, + config: FleetConfigType, + abortController: AbortController +) => { + const [soClient, esClient] = await getInternalClients(core); + if (!soClient || !esClient) { + return; + } + const usage = { + agents_enabled: getIsAgentsEnabled(config), + agents: await getAgentUsage(soClient, esClient), + fleet_server: await getFleetServerUsage(soClient, esClient), + packages: await getPackageUsage(soClient), + ...(await getAgentData(esClient, abortController)), + fleet_server_config: await getFleetServerConfig(soClient), + agent_policies: await getAgentPoliciesUsage(esClient, abortController), + }; + return usage; +}; + +// used by kibana daily collector +const fetchUsage = async (core: CoreSetup, config: FleetConfigType) => { const [soClient, esClient] = await getInternalClients(core); const usage = { agents_enabled: getIsAgentsEnabled(config), - agents: await getAgentUsage(config, soClient, esClient), + agents: await getAgentUsage(soClient, esClient), fleet_server: await getFleetServerUsage(soClient, esClient), packages: await getPackageUsage(soClient), }; @@ -41,7 +64,7 @@ export const fetchAgentsUsage = async (core: CoreSetup, config: FleetConfigType) const [soClient, esClient] = await getInternalClients(core); const usage = { agents_enabled: getIsAgentsEnabled(config), - agents: await getAgentUsage(config, soClient, esClient), + agents: await getAgentUsage(soClient, esClient), fleet_server: await getFleetServerUsage(soClient, esClient), }; return usage; diff --git a/x-pack/plugins/fleet/server/config.ts b/x-pack/plugins/fleet/server/config.ts index 0e685e8b45135..3c982ef9b516b 100644 --- a/x-pack/plugins/fleet/server/config.ts +++ b/x-pack/plugins/fleet/server/config.ts @@ -22,6 +22,7 @@ import { PreconfiguredAgentPoliciesSchema, PreconfiguredOutputsSchema, PreconfiguredFleetServerHostsSchema, + PreconfiguredFleetProxiesSchema, } from './types'; const DEFAULT_BUNDLED_PACKAGE_LOCATION = path.join(__dirname, '../target/bundled_packages'); @@ -117,6 +118,7 @@ export const config: PluginConfigDescriptor = { agentPolicies: PreconfiguredAgentPoliciesSchema, outputs: PreconfiguredOutputsSchema, fleetServerHosts: PreconfiguredFleetServerHostsSchema, + proxies: PreconfiguredFleetProxiesSchema, agentIdVerificationEnabled: schema.boolean({ defaultValue: true }), developer: schema.object({ disableRegistryVersionCheck: schema.boolean({ defaultValue: false }), diff --git a/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts b/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts new file mode 100644 index 0000000000000..5197b34fc89fe --- /dev/null +++ b/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts @@ -0,0 +1,256 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import path from 'path'; + +import * as kbnTestServer from '@kbn/core/test_helpers/kbn_server'; + +import { fetchFleetUsage } from '../collectors/register'; + +import { waitForFleetSetup } from './helpers'; + +const logFilePath = path.join(__dirname, 'logs.log'); + +describe('fleet usage telemetry', () => { + let core: any; + let esServer: kbnTestServer.TestElasticsearchUtils; + let kbnServer: kbnTestServer.TestKibanaUtils; + const registryUrl = 'http://localhost'; + + const startServers = async () => { + const { startES } = kbnTestServer.createTestServers({ + adjustTimeout: (t) => jest.setTimeout(t), + settings: { + es: { + license: 'trial', + }, + kbn: {}, + }, + }); + + esServer = await startES(); + const startKibana = async () => { + const root = kbnTestServer.createRootWithCorePlugins( + { + xpack: { + fleet: { + registryUrl, + agentPolicies: [ + { + name: 'Second preconfigured policy', + description: 'second policy', + is_default: false, + is_managed: true, + id: 'test-456789', + namespace: 'default', + monitoring_enabled: [], + package_policies: [], + }, + ], + }, + }, + logging: { + appenders: { + file: { + type: 'file', + fileName: logFilePath, + layout: { + type: 'json', + }, + }, + }, + loggers: [ + { + name: 'root', + appenders: ['file'], + }, + { + name: 'plugins.fleet', + level: 'info', + }, + ], + }, + }, + { oss: false } + ); + + await root.preboot(); + const coreSetup = await root.setup(); + const coreStart = await root.start(); + + return { + root, + coreSetup, + coreStart, + stop: async () => await root.shutdown(), + }; + }; + kbnServer = await startKibana(); + await waitForFleetSetup(kbnServer.root); + }; + + const stopServers = async () => { + if (kbnServer) { + await kbnServer.stop(); + } + + if (esServer) { + await esServer.stop(); + } + + await new Promise((res) => setTimeout(res, 10000)); + }; + + beforeAll(async () => { + await startServers(); + + const esClient = kbnServer.coreStart.elasticsearch.client.asInternalUser; + await esClient.bulk({ + index: '.fleet-agents', + body: [ + { + create: { + _id: 'agent1', + }, + }, + { + agent: { + version: '8.6.0', + }, + last_checkin_status: 'error', + last_checkin: '2022-11-21T12:26:24Z', + active: true, + policy_id: 'policy1', + }, + { + create: { + _id: 'agent2', + }, + }, + { + agent: { + version: '8.5.1', + }, + last_checkin_status: 'degraded', + last_checkin: '2022-11-21T12:27:24Z', + active: true, + policy_id: 'policy1', + }, + { + create: { + _id: 'inactive', + }, + }, + { + agent: { + version: '8.5.1', + }, + last_checkin_status: 'online', + last_checkin: '2021-11-21T12:27:24Z', + active: false, + policy_id: 'policy1', + }, + ], + refresh: 'wait_for', + }); + + await esClient.create({ + index: '.fleet-policies', + id: 'policy1', + body: { + data: { + id: 'fleet-server-policy', + outputs: { + default: { + type: 'elasticsearch', + }, + }, + }, + }, + refresh: 'wait_for', + }); + + const soClient = kbnServer.coreStart.savedObjects.createInternalRepository(); + await soClient.create('ingest-package-policies', { + name: 'fleet_server-1', + namespace: 'default', + package: { + name: 'fleet_server', + title: 'Fleet Server', + version: '1.2.0', + }, + enabled: true, + policy_id: 'fleet-server-policy', + inputs: [ + { + compiled_input: { + server: { + port: 8220, + host: '0.0.0.0', + 'limits.max_agents': 3000, + other: 'other', + }, + 'server.runtime': 'gc_percent:20', + ssl: 'ssl', + }, + }, + ], + }); + }); + + afterAll(async () => { + await stopServers(); + }); + + beforeEach(() => { + core = { getStartServices: jest.fn().mockResolvedValue([kbnServer.coreStart]) }; + }); + + it('should fetch usage telemetry', async () => { + const usage = await fetchFleetUsage(core, { agents: { enabled: true } }, new AbortController()); + + expect(usage).toEqual( + expect.objectContaining({ + agents_enabled: true, + agents: { + total_enrolled: 2, + healthy: 0, + unhealthy: 0, + offline: 2, + total_all_statuses: 3, + updating: 0, + }, + fleet_server: { + total_all_statuses: 0, + total_enrolled: 0, + healthy: 0, + unhealthy: 0, + offline: 0, + updating: 0, + num_host_urls: 0, + }, + packages: [], + agent_versions: ['8.5.1', '8.6.0'], + agent_checkin_status: { error: 1, degraded: 1 }, + agents_per_policy: [2], + fleet_server_config: { + policies: [ + { + input_config: { + server: { + 'limits.max_agents': 3000, + }, + 'server.runtime': 'gc_percent:20', + }, + }, + ], + }, + agent_policies: { count: 3, output_types: ['elasticsearch'] }, + }) + ); + }); +}); diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index 58043a2d3203b..cadb7859cc2e5 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -88,7 +88,11 @@ import { AgentServiceImpl, PackageServiceImpl, } from './services'; -import { registerFleetUsageCollector, fetchUsage, fetchAgentsUsage } from './collectors/register'; +import { + registerFleetUsageCollector, + fetchAgentsUsage, + fetchFleetUsage, +} from './collectors/register'; import { getAuthzFromRequest, makeRouterWithFleetAuthz } from './routes/security'; import { FleetArtifactsClient } from './services/artifacts'; import type { FleetRouter } from './types/request_context'; @@ -370,14 +374,9 @@ export class FleetPlugin // Register usage collection registerFleetUsageCollector(core, config, deps.usageCollection); - const fetch = async () => fetchUsage(core, config); - this.fleetUsageSender = new FleetUsageSender( - deps.taskManager, - core, - fetch, - this.kibanaVersion, - this.isProductionMode - ); + const fetch = async (abortController: AbortController) => + await fetchFleetUsage(core, config, abortController); + this.fleetUsageSender = new FleetUsageSender(deps.taskManager, core, fetch); registerFleetUsageLogger(deps.taskManager, async () => fetchAgentsUsage(core, config)); const router: FleetRouter = core.http.createRouter<FleetRequestHandlerContext>(); diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts index e1649576a7523..0a904d5b9fe2c 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts @@ -15,3 +15,4 @@ export { migratePackagePolicyToV820 } from './to_v8_2_0'; export { migratePackagePolicyToV830 } from './to_v8_3_0'; export { migratePackagePolicyToV840 } from './to_v8_4_0'; export { migratePackagePolicyToV850 } from './to_v8_5_0'; +export { migratePackagePolicyToV860 } from './to_v8_6_0'; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.test.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.test.ts new file mode 100644 index 0000000000000..4e0640c520df5 --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.test.ts @@ -0,0 +1,168 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectMigrationContext, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; + +import type { PackagePolicy } from '../../../../common'; + +import { migratePackagePolicyToV860 as migration } from './to_v8_6_0'; + +describe('8.6.0 Endpoint Package Policy migration', () => { + const policyDoc = ({ windowsAdvanced = {}, macAdvanced = {}, linuxAdvanced = {} }) => { + return { + id: 'mock-saved-object-id', + attributes: { + name: 'Some Policy Name', + package: { + name: 'endpoint', + title: '', + version: '', + }, + id: 'endpoint', + policy_id: '', + enabled: true, + namespace: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'endpoint', + enabled: true, + streams: [], + config: { + policy: { + value: { + windows: { + ...windowsAdvanced, + }, + mac: { + ...macAdvanced, + }, + linux: { + ...linuxAdvanced, + }, + }, + }, + }, + }, + ], + }, + type: ' nested', + }; + }; + + it('adds nothing to Policy, if advanced section is empty', () => { + const initialDoc = policyDoc({}); + + const migratedDoc = policyDoc({ + windowsAdvanced: undefined, + macAdvanced: undefined, + linuxAdvanced: undefined, + }); + + expect(migration(initialDoc, {} as SavedObjectMigrationContext)).toEqual(migratedDoc); + }); + + it('preserves advanced settings and adds nothing else if the bad key `event_filters` is not present', () => { + const initialDoc = policyDoc({ + windowsAdvanced: { advanced: { existingAdvanced: true } }, + macAdvanced: { advanced: { existingAdvanced: true } }, + linuxAdvanced: { advanced: { existingAdvanced: true } }, + }); + + const migratedDoc = policyDoc({ + windowsAdvanced: { advanced: { existingAdvanced: true } }, + macAdvanced: { advanced: { existingAdvanced: true } }, + linuxAdvanced: { advanced: { existingAdvanced: true } }, + }); + + expect(migration(initialDoc, {} as SavedObjectMigrationContext)).toEqual(migratedDoc); + }); + + it('preserves advanced settings and removes bad key `event_filters` if present', () => { + const initialDoc = policyDoc({ + windowsAdvanced: { advanced: { existingAdvanced: true, event_filters: { default: false } } }, + macAdvanced: { advanced: { existingAdvanced: true, event_filters: { default: false } } }, + linuxAdvanced: { advanced: { existingAdvanced: true, event_filters: { default: false } } }, + }); + + const migratedDoc = policyDoc({ + windowsAdvanced: { advanced: { existingAdvanced: true } }, + macAdvanced: { advanced: { existingAdvanced: true } }, + linuxAdvanced: { advanced: { existingAdvanced: true } }, + }); + + expect(migration(initialDoc, {} as SavedObjectMigrationContext)).toEqual(migratedDoc); + }); + + it('does not modify non-endpoint package policies', () => { + const doc: SavedObjectUnsanitizedDoc<PackagePolicy> = { + id: 'mock-saved-object-id', + attributes: { + name: 'Some Policy Name', + package: { + name: 'notEndpoint', + title: '', + version: '', + }, + id: 'notEndpoint', + policy_id: '', + enabled: true, + namespace: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'notEndpoint', + enabled: true, + streams: [], + config: {}, + }, + ], + }, + type: ' nested', + }; + + expect( + migration(doc, {} as SavedObjectMigrationContext) as SavedObjectUnsanitizedDoc<PackagePolicy> + ).toEqual({ + attributes: { + name: 'Some Policy Name', + package: { + name: 'notEndpoint', + title: '', + version: '', + }, + id: 'notEndpoint', + policy_id: '', + enabled: true, + namespace: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'notEndpoint', + enabled: true, + streams: [], + config: {}, + }, + ], + }, + type: ' nested', + id: 'mock-saved-object-id', + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.ts new file mode 100644 index 0000000000000..0f4770651b45d --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_6_0.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectMigrationFn, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import { cloneDeep } from 'lodash'; + +import type { PackagePolicy } from '../../../../common'; + +export const migratePackagePolicyToV860: SavedObjectMigrationFn<PackagePolicy, PackagePolicy> = ( + packagePolicyDoc +) => { + if (packagePolicyDoc.attributes.package?.name !== 'endpoint') { + return packagePolicyDoc; + } + + const updatedPackagePolicyDoc: SavedObjectUnsanitizedDoc<PackagePolicy> = + cloneDeep(packagePolicyDoc); + + const input = updatedPackagePolicyDoc.attributes.inputs[0]; + + if (input && input.config) { + const policy = input.config.policy.value; + + const migratedPolicy = { event_filters: undefined }; + + policy.windows.advanced = policy.windows.advanced + ? { ...policy.windows.advanced, ...migratedPolicy } + : undefined; + policy.mac.advanced = policy.mac.advanced + ? { ...policy.mac.advanced, ...migratedPolicy } + : undefined; + policy.linux.advanced = policy.linux.advanced + ? { ...policy.linux.advanced, ...migratedPolicy } + : undefined; + } + + return updatedPackagePolicyDoc; +}; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_6_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_6_0.ts index 019c9d6c947da..2f508ab36e4d2 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_6_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_6_0.ts @@ -11,6 +11,9 @@ import type { Settings } from '../../../common/types'; import type { Installation } from '../../../common'; import { FLEET_CLOUD_SECURITY_POSTURE_PACKAGE } from '../../../common/constants'; +import type { PackagePolicy } from '../../../common'; + +import { migratePackagePolicyToV860 as SecSolMigratePackagePolicyToV860 } from './security_solution'; export const migrateSettingsToV860: SavedObjectMigrationFn<Settings, Settings> = ( settingsDoc, @@ -32,3 +35,17 @@ export const migrateInstallationToV860: SavedObjectMigrationFn<Installation, Ins } return installationDoc; }; + +export const migratePackagePolicyToV840: SavedObjectMigrationFn<PackagePolicy, PackagePolicy> = ( + packagePolicyDoc, + migrationContext +) => { + let updatedPackagePolicyDoc = packagePolicyDoc; + + // Endpoint specific migrations + if (packagePolicyDoc.attributes.package?.name === 'endpoint') { + updatedPackagePolicyDoc = SecSolMigratePackagePolicyToV860(packagePolicyDoc, migrationContext); + } + + return updatedPackagePolicyDoc; +}; diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index 5ed4b0a290c93..3571612cae4d4 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -9,6 +9,8 @@ import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/serv import { SavedObjectsErrorHelpers } from '@kbn/core/server'; +import { PackagePolicyRestrictionRelatedError } from '../errors'; + import type { AgentPolicy, FullAgentPolicy, @@ -173,6 +175,30 @@ describe('agent policy', () => { { id: 'package-1' }, ]); }); + + it('should throw error for agent policy which has managed package poolicy', async () => { + mockedPackagePolicyService.findAllForAgentPolicy.mockReturnValue([ + { + id: 'package-1', + is_managed: true, + }, + ] as any); + try { + await agentPolicyService.delete(soClient, esClient, 'mocked'); + } catch (e) { + expect(e.message).toEqual( + new PackagePolicyRestrictionRelatedError( + `Cannot delete agent policy mocked that contains managed package policies` + ).message + ); + } + + await agentPolicyService.delete(soClient, esClient, 'mocked', { force: true }); + + expect(packagePolicyService.runDeleteExternalCallbacks).toHaveBeenCalledWith([ + { id: 'package-1' }, + ]); + }); }); describe('bumpRevision', () => { diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 44696a7f1a997..48b0209e4359d 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -58,6 +58,7 @@ import { AgentPolicyNameExistsError, HostedAgentPolicyRestrictionRelatedError, AgentPolicyNotFoundError, + PackagePolicyRestrictionRelatedError, } from '../errors'; import type { FullAgentConfigMap } from '../../common/types/models/agent_cm'; @@ -671,6 +672,14 @@ class AgentPolicyService { const packagePolicies = await packagePolicyService.findAllForAgentPolicy(soClient, id); if (packagePolicies.length) { + const hasManagedPackagePolicies = packagePolicies.some( + (packagePolicy) => packagePolicy.is_managed + ); + if (hasManagedPackagePolicies && !options?.force) { + throw new PackagePolicyRestrictionRelatedError( + `Cannot delete agent policy ${id} that contains managed package policies` + ); + } const deletedPackagePolicies: DeletePackagePoliciesResponse = await packagePolicyService.delete( soClient, diff --git a/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts b/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts deleted file mode 100644 index ada764fcff927..0000000000000 --- a/x-pack/plugins/fleet/server/services/fleet_usage_sender.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { - ConcreteTaskInstance, - TaskManagerStartContract, - TaskManagerSetupContract, -} from '@kbn/task-manager-plugin/server'; -import type { CoreSetup } from '@kbn/core/server'; - -import type { Usage } from '../collectors/register'; - -import { appContextService } from './app_context'; - -const EVENT_TYPE = 'fleet_usage'; - -export class FleetUsageSender { - private taskManager?: TaskManagerStartContract; - private taskId = 'Fleet-Usage-Sender-Task'; - private taskType = 'Fleet-Usage-Sender'; - - constructor( - taskManager: TaskManagerSetupContract, - core: CoreSetup, - fetchUsage: () => Promise<Usage>, - kibanaVersion: string, - isProductionMode: boolean - ) { - taskManager.registerTaskDefinitions({ - [this.taskType]: { - title: 'Fleet Usage Sender', - timeout: '1m', - maxAttempts: 1, - createTaskRunner: ({ taskInstance }: { taskInstance: ConcreteTaskInstance }) => { - return { - async run() { - appContextService.getLogger().info('Running Fleet Usage telemetry send task'); - - try { - const usageData = await fetchUsage(); - appContextService.getLogger().debug(JSON.stringify(usageData)); - core.analytics.reportEvent(EVENT_TYPE, usageData); - } catch (error) { - appContextService - .getLogger() - .error('Error occurred while sending Fleet Usage telemetry: ' + error); - } - }, - - async cancel() {}, - }; - }, - }, - }); - this.registerTelemetryEventType(core); - } - - public async start(taskManager: TaskManagerStartContract) { - this.taskManager = taskManager; - - appContextService.getLogger().info(`Task ${this.taskId} scheduled with interval 1h`); - await this.taskManager?.ensureScheduled({ - id: this.taskId, - taskType: this.taskType, - schedule: { - interval: '1h', - }, - scope: ['fleet'], - state: {}, - params: {}, - }); - } - - /** - * took schema from [here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/collectors/register.ts#L53) and adapted to EBT format - */ - private registerTelemetryEventType(core: CoreSetup): void { - core.analytics.registerEventType({ - eventType: EVENT_TYPE, - schema: { - agents_enabled: { type: 'boolean', _meta: { description: 'agents enabled' } }, - agents: { - properties: { - total_enrolled: { - type: 'long', - _meta: { - description: 'The total number of enrolled agents, in any state', - }, - }, - healthy: { - type: 'long', - _meta: { - description: 'The total number of enrolled agents in a healthy state', - }, - }, - unhealthy: { - type: 'long', - _meta: { - description: 'The total number of enrolled agents in an unhealthy state', - }, - }, - updating: { - type: 'long', - _meta: { - description: 'The total number of enrolled agents in an updating state', - }, - }, - offline: { - type: 'long', - _meta: { - description: 'The total number of enrolled agents currently offline', - }, - }, - total_all_statuses: { - type: 'long', - _meta: { - description: 'The total number of agents in any state, both enrolled and inactive', - }, - }, - }, - }, - fleet_server: { - properties: { - total_enrolled: { - type: 'long', - _meta: { - description: 'The total number of enrolled Fleet Server agents, in any state', - }, - }, - total_all_statuses: { - type: 'long', - _meta: { - description: - 'The total number of Fleet Server agents in any state, both enrolled and inactive.', - }, - }, - healthy: { - type: 'long', - _meta: { - description: 'The total number of enrolled Fleet Server agents in a healthy state.', - }, - }, - unhealthy: { - type: 'long', - _meta: { - description: - 'The total number of enrolled Fleet Server agents in an unhealthy state', - }, - }, - updating: { - type: 'long', - _meta: { - description: - 'The total number of enrolled Fleet Server agents in an updating state', - }, - }, - offline: { - type: 'long', - _meta: { - description: 'The total number of enrolled Fleet Server agents currently offline', - }, - }, - num_host_urls: { - type: 'long', - _meta: { - description: 'The number of Fleet Server hosts configured in Fleet settings.', - }, - }, - }, - }, - packages: { - type: 'array', - items: { - properties: { - name: { type: 'keyword' }, - version: { type: 'keyword' }, - enabled: { type: 'boolean' }, - }, - }, - }, - }, - }); - } -} diff --git a/x-pack/plugins/fleet/server/services/index.ts b/x-pack/plugins/fleet/server/services/index.ts index 6078e2696f3b9..133d5cf88d71c 100644 --- a/x-pack/plugins/fleet/server/services/index.ts +++ b/x-pack/plugins/fleet/server/services/index.ts @@ -63,4 +63,4 @@ export type { PackageService, PackageClient } from './epm'; // Fleet server policy config export { migrateSettingsToFleetServerHost } from './fleet_server_host'; -export { FleetUsageSender } from './fleet_usage_sender'; +export { FleetUsageSender } from './telemetry/fleet_usage_sender'; diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts new file mode 100644 index 0000000000000..cfc0beb1cddd2 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts @@ -0,0 +1,177 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import { isEqual } from 'lodash'; +import pMap from 'p-map'; + +import type { FleetConfigType } from '../../config'; +import type { FleetProxy } from '../../types'; +import { + bulkGetFleetProxies, + createFleetProxy, + deleteFleetProxy, + listFleetProxies, + updateFleetProxy, +} from '../fleet_proxies'; +import { listFleetServerHostsForProxyId } from '../fleet_server_host'; +import { agentPolicyService } from '../agent_policy'; +import { outputService } from '../output'; + +export function getPreconfiguredFleetProxiesFromConfig(config?: FleetConfigType) { + const { proxies: fleetProxiesFromConfig } = config; + + return fleetProxiesFromConfig.map((proxyConfig: any) => ({ + ...proxyConfig, + is_preconfigured: true, + })); +} + +function hasChanged(existingProxy: FleetProxy, preconfiguredFleetProxy: FleetProxy) { + return ( + (!existingProxy.is_preconfigured || + existingProxy.name !== existingProxy.name || + existingProxy.url !== preconfiguredFleetProxy.name || + !isEqual( + existingProxy.proxy_headers ?? null, + preconfiguredFleetProxy.proxy_headers ?? null + ) || + existingProxy.certificate_authorities) ?? + null !== preconfiguredFleetProxy.certificate_authorities ?? + (null || existingProxy.certificate) ?? + null !== preconfiguredFleetProxy.certificate ?? + (null || existingProxy.certificate_key) ?? + null !== preconfiguredFleetProxy.certificate_key ?? + null + ); +} + +async function createOrUpdatePreconfiguredFleetProxies( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + preconfiguredFleetProxies: FleetProxy[] +) { + const existingFleetProxies = await bulkGetFleetProxies( + soClient, + preconfiguredFleetProxies.map(({ id }) => id), + { ignoreNotFound: true } + ); + await Promise.all( + preconfiguredFleetProxies.map(async (preconfiguredFleetProxy) => { + const existingProxy = existingFleetProxies.find( + (fleetProxy) => fleetProxy.id === preconfiguredFleetProxy.id + ); + + const { id, ...data } = preconfiguredFleetProxy; + + const isCreate = !existingProxy; + const isUpdateWithNewData = existingProxy + ? hasChanged(existingProxy, preconfiguredFleetProxy) + : false; + + if (isCreate) { + await createFleetProxy( + soClient, + { + ...data, + is_preconfigured: true, + }, + { id, overwrite: true, fromPreconfiguration: true } + ); + } else if (isUpdateWithNewData) { + await updateFleetProxy( + soClient, + id, + { + ...data, + is_preconfigured: true, + }, + { fromPreconfiguration: true } + ); + // Bump all the agent policy that use that proxy + const [{ items: fleetServerHosts }, { items: outputs }] = await Promise.all([ + listFleetServerHostsForProxyId(soClient, id), + outputService.listAllForProxyId(soClient, id), + ]); + if ( + fleetServerHosts.some((host) => host.is_default) || + outputs.some((output) => output.is_default || output.is_default_monitoring) + ) { + await agentPolicyService.bumpAllAgentPolicies(soClient, esClient); + } else { + await pMap( + outputs, + (output) => + agentPolicyService.bumpAllAgentPoliciesForOutput(soClient, esClient, output.id), + { + concurrency: 20, + } + ); + await pMap( + fleetServerHosts, + (fleetServerHost) => + agentPolicyService.bumpAllAgentPoliciesForFleetServerHosts( + soClient, + esClient, + fleetServerHost.id + ), + { + concurrency: 20, + } + ); + } + } + }) + ); +} + +async function cleanPreconfiguredFleetProxies( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + preconfiguredFleetProxies: FleetProxy[] +) { + const existingFleetProxies = await listFleetProxies(soClient); + const existingPreconfiguredFleetProxies = existingFleetProxies.items.filter( + (o) => o.is_preconfigured === true + ); + + for (const existingFleetProxy of existingPreconfiguredFleetProxies) { + const hasBeenDelete = !preconfiguredFleetProxies.find(({ id }) => existingFleetProxy.id === id); + if (!hasBeenDelete) { + continue; + } + + const [{ items: fleetServerHosts }, { items: outputs }] = await Promise.all([ + listFleetServerHostsForProxyId(soClient, existingFleetProxy.id), + outputService.listAllForProxyId(soClient, existingFleetProxy.id), + ]); + const isUsed = fleetServerHosts.length > 0 || outputs.length > 0; + if (isUsed) { + await updateFleetProxy( + soClient, + existingFleetProxy.id, + { is_preconfigured: false }, + { + fromPreconfiguration: true, + } + ); + } else { + await deleteFleetProxy(soClient, existingFleetProxy.id, { + fromPreconfiguration: true, + }); + } + } +} + +export async function ensurePreconfiguredFleetProxies( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + preconfiguredFleetProxies: FleetProxy[] +) { + await createOrUpdatePreconfiguredFleetProxies(soClient, esClient, preconfiguredFleetProxies); + await cleanPreconfiguredFleetProxies(soClient, esClient, preconfiguredFleetProxies); +} diff --git a/x-pack/plugins/fleet/server/services/setup.test.ts b/x-pack/plugins/fleet/server/services/setup.test.ts index 8837ae3522ac1..996701c920387 100644 --- a/x-pack/plugins/fleet/server/services/setup.test.ts +++ b/x-pack/plugins/fleet/server/services/setup.test.ts @@ -19,6 +19,7 @@ import { setupFleet } from './setup'; jest.mock('./preconfiguration'); jest.mock('./preconfiguration/outputs'); +jest.mock('./preconfiguration/fleet_proxies'); jest.mock('./settings'); jest.mock('./output'); jest.mock('./download_source'); diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index e43efb44adb5f..2802fd34bc001 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -29,6 +29,10 @@ import { ensurePreconfiguredOutputs, getPreconfiguredOutputFromConfig, } from './preconfiguration/outputs'; +import { + ensurePreconfiguredFleetProxies, + getPreconfiguredFleetProxiesFromConfig, +} from './preconfiguration/fleet_proxies'; import { outputService } from './output'; import { downloadSourceService } from './download_source'; @@ -86,6 +90,13 @@ async function createSetupSideEffects( await migrateSettingsToFleetServerHost(soClient); logger.debug('Setting up Fleet download source'); const defaultDownloadSource = await downloadSourceService.ensureDefault(soClient); + // Need to be done before outputs and fleet server hosts as these object can reference a proxy + logger.debug('Setting up Proxy'); + await ensurePreconfiguredFleetProxies( + soClient, + esClient, + getPreconfiguredFleetProxiesFromConfig(appContextService.getConfig()) + ); logger.debug('Setting up Fleet Sever Hosts'); await ensurePreconfiguredFleetServerHosts( diff --git a/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts b/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts new file mode 100644 index 0000000000000..6e788e58fde57 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts @@ -0,0 +1,132 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { + ConcreteTaskInstance, + TaskManagerStartContract, + TaskManagerSetupContract, +} from '@kbn/task-manager-plugin/server'; +import { throwUnrecoverableError } from '@kbn/task-manager-plugin/server'; +import type { CoreSetup } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; + +import type { Usage } from '../../collectors/register'; + +import { appContextService } from '../app_context'; + +import { fleetUsagesSchema } from './fleet_usages_schema'; + +const EVENT_TYPE = 'fleet_usage'; + +export class FleetUsageSender { + private taskManager?: TaskManagerStartContract; + private taskVersion = '1.0.0'; + private taskType = 'Fleet-Usage-Sender'; + private wasStarted: boolean = false; + private interval = '1h'; + private timeout = '1m'; + private abortController = new AbortController(); + + constructor( + taskManager: TaskManagerSetupContract, + core: CoreSetup, + fetchUsage: (abortController: AbortController) => Promise<Usage | undefined> + ) { + taskManager.registerTaskDefinitions({ + [this.taskType]: { + title: 'Fleet Usage Sender', + timeout: this.timeout, + maxAttempts: 1, + createTaskRunner: ({ taskInstance }: { taskInstance: ConcreteTaskInstance }) => { + return { + run: async () => { + return withSpan({ name: this.taskType, type: 'telemetry' }, () => + this.runTask(taskInstance, core, () => fetchUsage(this.abortController)) + ); + }, + + cancel: async () => { + this.abortController.abort('task timed out'); + }, + }; + }, + }, + }); + this.registerTelemetryEventType(core); + } + + private runTask = async ( + taskInstance: ConcreteTaskInstance, + core: CoreSetup, + fetchUsage: () => Promise<Usage | undefined> + ) => { + if (!this.wasStarted) { + appContextService.getLogger().debug('[runTask()] Aborted. Task not started yet'); + return; + } + // Check that this task is current + if (taskInstance.id !== this.taskId) { + throwUnrecoverableError(new Error('Outdated task version for task: ' + taskInstance.id)); + return; + } + appContextService.getLogger().info('Running Fleet Usage telemetry send task'); + + try { + const usageData = await fetchUsage(); + if (!usageData) { + return; + } + appContextService.getLogger().debug(JSON.stringify(usageData)); + core.analytics.reportEvent(EVENT_TYPE, usageData); + } catch (error) { + appContextService + .getLogger() + .error('Error occurred while sending Fleet Usage telemetry: ' + error); + } + }; + + private get taskId() { + return `${this.taskType}-${this.taskVersion}`; + } + + public async start(taskManager: TaskManagerStartContract) { + this.taskManager = taskManager; + + if (!taskManager) { + appContextService.getLogger().error('missing required service during start'); + return; + } + + this.wasStarted = true; + + try { + appContextService.getLogger().info(`Task ${this.taskId} scheduled with interval 1h`); + + await this.taskManager.ensureScheduled({ + id: this.taskId, + taskType: this.taskType, + schedule: { + interval: this.interval, + }, + scope: ['fleet'], + state: {}, + params: {}, + }); + } catch (e) { + appContextService.getLogger().error(`Error scheduling task, received error: ${e}`); + } + } + + /** + * took schema from [here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/collectors/register.ts#L53) and adapted to EBT format + */ + private registerTelemetryEventType(core: CoreSetup): void { + core.analytics.registerEventType({ + eventType: EVENT_TYPE, + schema: fleetUsagesSchema, + }); + } +} diff --git a/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts new file mode 100644 index 0000000000000..9eeb867bd9b91 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts @@ -0,0 +1,168 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RootSchema } from '@kbn/analytics-client'; + +export const fleetUsagesSchema: RootSchema<any> = { + agents_enabled: { type: 'boolean', _meta: { description: 'agents enabled' } }, + agents: { + properties: { + total_enrolled: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents, in any state', + }, + }, + healthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in a healthy state', + }, + }, + unhealthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in an unhealthy state', + }, + }, + updating: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents in an updating state', + }, + }, + offline: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents currently offline', + }, + }, + total_all_statuses: { + type: 'long', + _meta: { + description: 'The total number of agents in any state, both enrolled and inactive', + }, + }, + }, + }, + fleet_server: { + properties: { + total_enrolled: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents, in any state', + }, + }, + total_all_statuses: { + type: 'long', + _meta: { + description: + 'The total number of Fleet Server agents in any state, both enrolled and inactive.', + }, + }, + healthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents in a healthy state.', + }, + }, + unhealthy: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents in an unhealthy state', + }, + }, + updating: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents in an updating state', + }, + }, + offline: { + type: 'long', + _meta: { + description: 'The total number of enrolled Fleet Server agents currently offline', + }, + }, + num_host_urls: { + type: 'long', + _meta: { + description: 'The number of Fleet Server hosts configured in Fleet settings.', + }, + }, + }, + }, + packages: { + type: 'array', + items: { + properties: { + name: { type: 'keyword' }, + version: { type: 'keyword' }, + enabled: { type: 'boolean' }, + }, + }, + }, + agent_versions: { + type: 'array', + items: { + type: 'keyword', + _meta: { description: 'The agent versions enrolled in this deployment.' }, + }, + }, + agents_per_policy: { + type: 'array', + items: { + type: 'long', + _meta: { description: 'Agent counts enrolled per agent policy.' }, + }, + }, + fleet_server_config: { + properties: { + policies: { + type: 'array', + items: { + properties: { + input_config: { type: 'pass_through' }, + }, + }, + }, + }, + }, + agent_policies: { + properties: { + count: { + type: 'long', + _meta: { + description: 'Number of agent policies', + }, + }, + output_types: { + type: 'array', + items: { + type: 'keyword', + _meta: { description: 'Output types of agent policies' }, + }, + }, + }, + }, + agent_checkin_status: { + properties: { + error: { + type: 'long', + _meta: { + description: 'Count of agent last checkin status error', + }, + }, + degraded: { + type: 'long', + _meta: { + description: 'Count of agent last checkin status degraded', + }, + }, + }, + }, +}; diff --git a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts index 3100fb04a46f1..13ba525ee420b 100644 --- a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts @@ -95,6 +95,24 @@ export const PreconfiguredFleetServerHostsSchema = schema.arrayOf( { defaultValue: [] } ); +export const PreconfiguredFleetProxiesSchema = schema.arrayOf( + schema.object({ + id: schema.string(), + name: schema.string(), + url: schema.string(), + proxy_headers: schema.maybe( + schema.recordOf( + schema.string(), + schema.oneOf([schema.string(), schema.boolean(), schema.number()]) + ) + ), + certificate_authorities: schema.maybe(schema.string()), + certificate: schema.maybe(schema.string()), + certificate_key: schema.maybe(schema.string()), + }), + { defaultValue: [] } +); + export const PreconfiguredAgentPoliciesSchema = schema.arrayOf( schema.object({ ...AgentPolicyBaseSchema, diff --git a/x-pack/plugins/infra/docs/arch.md b/x-pack/plugins/infra/docs/arch.md deleted file mode 100644 index 89b00cd19d1d9..0000000000000 --- a/x-pack/plugins/infra/docs/arch.md +++ /dev/null @@ -1,106 +0,0 @@ -# Adapter Based Architecture - -## Terms - -In this arch, we use 3 main terms to describe the code: - -- **Libs / Domain Libs** - Business logic & data formatting (though complex formatting might call utils) -- **Adapters** - code that directly calls 3rd party APIs and data sources, exposing clean easy to stub APIs -- **Composition Files** - composes adapters into libs based on where the code is running -- **Implementation layer** - The API such as rest endpoints on the server, and the state management / UI on the client - -## Arch Visual Example - -![Arch Visual Overview](/docs/assets/arch.png) - -## Code Guidelines - -### Libs & Domain Libs: - -This term is used to describe the location of business logic. Each use-case in your app should maintain its own lib. - -Now there are 2 types of libs. A "regular lib" would be something like a lib for interacting with Kibana APIs, with something like a parent app adapter. The other is a "domain lib", and would be something like a hosts, or logging lib that might have composed into it an Elasicsearch adapter. - -For the cases on this application, we might have a Logs, Hosts, Containers, Services, ParentApp, and Settings libs, just as an example. Libs should only have 1 Lib per use-case. - -Libs have, composed into them, adapters, as well as access to other libs. The inter-dependencies on other libs and adapters are explicitly expressed in the types of the lib's constructor arguments to provide static type checking and improve testability. In the following example AdapterInterface would define the required interface of an adapter composed into this lib. Likewise LibInterface would declare the inter-dependency this lib has on other libs: - -```ts -new (adapter: AdapterInterface, otherLibs: { lib1: Lib1Interface; lib2: Lib2Interface }): LibInterface -``` - -Libs must not contain code that depends on APIs and behavior specific to the runtime environment. Any such code should be extracted into an adapter. Any code that does not meet this requirement should be inside an adapter. - -### Adapters - -Adapters are the location of any code to interact with any data sources, or 3rd party API / dependency. An example of code that belongs to an adapter would be anything that interacts with Kibana, or Elasticsearch. This would also include things like, for instance, the browser's local storage. - -**The interface exposed by an adapter should be as domain-specific as possible to reduce the risk of leaking abstraction from the "adapted" technology. Therefore a method like `getHosts()` would be preferable to a `runQuery(filterArgs)` method.** This way the output can be well typed and easily stubbed out in an alternate adapter. This will result in vast improvements in testing reliability and code quality. - -Even adapters though should have required dependencies injected into them for as much as is reasonable. Though this is something that is up to the specific adapter as to what is best on a case-by-case basis. - -An app will in most cases have multiple types of each adapter. As an example, a Lib might have an Elasticsearch-backed adapter as well as an adapter backed by an in-memory store, both of which expose the same interface. This way you can compose a lib to use an in-memory adapter to functional or unit tests in order to have isolated tests that are cleaner / faster / more accurate. - -Adapters can at times be composed into another adapter. This behavior though should be kept to a strict minimum. - -**Acceptable:** - -- An Elasticsearch adapter being passed into Hosts, K8, and logging adapters. The Elasticsearch adapter would then never be exposed directly to a lib. - -**Unacceptable:** - -- A K8 adapter being composed into a hosts adapter, but then k8 also being exposed to a lib. - -The former is acceptable only to abstract shared code between adapters. It is clear that this is acceptable because only other adapters use this code. - -The latter being a "code smell" that indicates there is ether too much logic in your adapter that should be in a lib, or the adapters API is insufficient and should be reconsidered. - -### Composition files - -These files will import all libs and their required adapters to instantiate them in the correct order while passing in the respective dependencies. For a contrived but realistic example, a dev_ui composition file that composes an Elasticsearch adapter into Logs, Hosts, and Services libs, and a dev-ui adapter into ParentApp, and a local-storage adapter into Settings. Then another composition file for Kibana might compose other compatible adapters for use with the Kibana APIs. - -composition files simply export a compose method that returns the composed and initialized libs. - -## File structure - -An example structure might be... - -``` -|-- infra-ui - |-- common - | |-- types.ts - | - |-- server - | |-- lib - | | |-- adapters - | | | |-- hosts - | | | | |-- elasticsearch.ts - | | | | |-- fake_data.ts - | | | | - | | | |-- logs - | | | | |-- elasticsearch.ts - | | | | |-- fake_data.ts - | | | | - | | | |-- parent_app - | | | | |-- kibana_angular // if an adapter has more than one file... - | | | | | |-- index.html - | | | | | |-- index.ts - | | | | | - | | | | |-- ui_harness.ts - | | | | - | | |-- domains - | | | |-- hosts.ts - | | | |-- logs.ts - | | | - | | |-- compose - | | | |-- dev.ts - | | | |-- kibana.ts - | | | - | | |-- parent_app.ts // a non-domain lib - | | |-- lib.ts // a file containing lib type defs - |-- public - | | ## SAME STRUCTURE AS SERVER -``` - -Note that in the above adapters have a folder for each adapter type, then inside the implementation of the adapters. The implementation can be a single file, or a directory where index.js is the class that exposes the adapter. -`libs/compose/` contains the composition files diff --git a/x-pack/plugins/infra/docs/arch_client.md b/x-pack/plugins/infra/docs/arch_client.md deleted file mode 100644 index b40c9aaf1ff58..0000000000000 --- a/x-pack/plugins/infra/docs/arch_client.md +++ /dev/null @@ -1,132 +0,0 @@ -# Client Architecture - -All rules described in the [server-side architecture documentation](docs/arch.md) apply to the client as well. As shown below, the directory structure additionally accommodates the front-end-specific concepts like components and containers. - -## Apps - -The `apps` folder contains the entry point for the UI code, such as for use in Kibana or testing. - -## Components - -- Components should be stateless wherever possible with pages and containers holding state. -- Small (less than ~30 lines of JSX and less than ~120 lines total) components should simply get their own file. -- If a component gets too large to reason about, and/or needs multiple child components that are only used in this one place, place them all in a folder. -- All components, please use Styled-Components. This also applies to small tweaks to EUI, just use `styled(Component)` and the `attrs` method for always used props. For example: - -```jsx -export const Toolbar = styled(EuiPanel).attrs(() => ({ - paddingSize: 'none', - grow: false, -}))` - margin: -2px; -`; -``` - -However, components that tweak EUI should go into `/public/components/eui/${componentName}`. - -If using an EUI component that has not yet been typed, types should be placed into `/types/eui.d.ts` - -## Containers - -- HOC's based on Apollo. -- One folder per data type e.g. `host`. Folder name should be singular. -- One file per query type. - -## Pages - -- Ideally one file per page, if more files are needed, move into folder containing the page and a layout file. -- Pages are class based components. -- Should hold most state, and any additional route logic. -- Are the only files where components are wrapped by containers. For example: - -```jsx -// Simple usage -const FancyLogPage = withSearchResults(class FancyLogPage extends React.Component<FancyLogPageProps> { - render() { - return ( - <> - <Toolbar /> - <LogView searchResults={/* ... */} /> - <SearchBar /> - <> - ); - } -}); -``` - -OR, for more complex scenarios: - -```jsx -// Advanced usage -const ConnectedToolbar = compose( - withTimeMutation, - withCurrentTime -)(Toolbar); - -const ConnectedLogView = compose( - withLogEntries, - withSearchResults, -)(LogView); - -const ConnectedSearchBar = compose( - withSearchMutation -)(SearchBar); - -interface FancyLogPageProps {} - -class FancyLogPage extends React.Component<FancyLogPageProps> { - render() { - return ( - <> - <ConnectedToolbar /> - <ConnectedLogView /> - <ConnectedSearchBar /> - <> - ); - } -}; -``` - -## Transforms - -- If you need to do some complex data transforms, it is better to put them here than in a utility or lib. Simpler transforms are probably easier to keep in a container. -- One file per transform - -## File structure - -``` -|-- infra-ui - |-- common - | |-- types.ts - | - |-- public - | |-- components // - | | |-- eui // staging area for eui customizations before pushing upstream - | | |-- layout // any layout components should be placed in here - | | |-- button.tsx - | | |-- mega_table // Where mega table is used directly with a data prop, not a composable table - | | |-- index.ts - | | |-- row.tsx - | | |-- table.tsx - | | |-- cell.tsx - | | - | |-- containers - | | |-- host - | | | |-- index.ts - | | | |-- with_all_hosts.ts - | | | |-- transforms - | | | |-- hosts_to_waffel.ts - | | | - | | |-- pod - | | |-- index.ts - | | |-- with_all_pods.ts - | | - | |-- pages - | | |-- home.tsx // the initial page of a plugin is always the `home` page - | | |-- hosts.tsx - | | |-- logging.tsx - | | - | |-- utils // utils folder for what utils folders are for ;) - | | - | |-- lib // covered in [Our code and arch](docs/arch.md) -``` diff --git a/x-pack/plugins/infra/docs/assets/arch.png b/x-pack/plugins/infra/docs/assets/arch.png deleted file mode 100644 index 878c7d1aa16d4..0000000000000 Binary files a/x-pack/plugins/infra/docs/assets/arch.png and /dev/null differ diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx index ca52144367ea9..f26c8fe514380 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx @@ -132,8 +132,8 @@ export const NodeContextPopover = ({ size="xs" iconSide={'left'} iconType={'popout'} - href={nodeDetailMenuItemLinkProps.href} flush="both" + {...nodeDetailMenuItemLinkProps} > <FormattedMessage id="xpack.infra.infra.nodeDetails.openAsPage" diff --git a/x-pack/plugins/infra/scripts/gql_gen_client.json b/x-pack/plugins/infra/scripts/gql_gen_client.json deleted file mode 100644 index 87b8233dd1eeb..0000000000000 --- a/x-pack/plugins/infra/scripts/gql_gen_client.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "flattenTypes": true, - "generatorConfig": {}, - "primitives": { - "String": "string", - "Int": "number", - "Float": "number", - "Boolean": "boolean", - "ID": "string" - } -} diff --git a/x-pack/plugins/infra/scripts/gql_gen_server.json b/x-pack/plugins/infra/scripts/gql_gen_server.json deleted file mode 100644 index f8f916897c2d4..0000000000000 --- a/x-pack/plugins/infra/scripts/gql_gen_server.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "flattenTypes": true, - "generatorConfig": { - "contextType": "InfraContext", - "prepend": ["import { InfraContext } from '../lib/infra_types';"] - }, - "primitives": { - "String": "string", - "Int": "number", - "Float": "number", - "Boolean": "boolean", - "ID": "string" - } -} diff --git a/x-pack/plugins/infra/tsconfig.json b/x-pack/plugins/infra/tsconfig.json index c092210c7ba68..238681826ffc4 100644 --- a/x-pack/plugins/infra/tsconfig.json +++ b/x-pack/plugins/infra/tsconfig.json @@ -3,13 +3,12 @@ "compilerOptions": { "outDir": "./target/types", "emitDeclarationOnly": true, - "declaration": true, + "declaration": true }, "include": [ "../../../typings/**/*", "common/**/*", "public/**/*", - "scripts/**/*", "server/**/*", "types/**/*" ], diff --git a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions.ts b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions.ts index 4bd8a2f67d64d..68938fbee5211 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/annotations/actions.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/annotations/actions.ts @@ -43,7 +43,7 @@ export const createAnnotationActions = ({ defaultMessage: 'All the dimensions configured in this layer respect filters defined at kibana level.', }), - icon: !layer.ignoreGlobalFilters ? 'eyeClosed' : 'eye', + icon: !layer.ignoreGlobalFilters ? 'filterIgnore' : 'filter', isCompatible: true, 'data-test-subj': !layer.ignoreGlobalFilters ? 'lnsXY_annotationLayer_ignoreFilters' diff --git a/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts b/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts index 3f72ca0cf7617..de662486633e0 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/to_expression.ts @@ -209,13 +209,10 @@ export const buildXYExpression = ( .map((layer) => { return { ...layer, + ignoreGlobalFilters: layer.ignoreGlobalFilters, annotations: layer.annotations.map((c) => ({ ...c, label: uniqueLabels[c.id], - ...(c.type === 'query' - ? // Move the ignore flag at the event level - { ignoreGlobalFilters: layer.ignoreGlobalFilters } - : {}), })), }; }); @@ -369,6 +366,7 @@ export const buildXYExpression = ( ?.interval) || 'auto', groups: validAnnotationsLayers.map((layer) => ({ + ignoreGlobalFilters: layer.ignoreGlobalFilters, indexPatternId: layer.indexPatternId, annotations: layer.annotations.filter(isValidAnnotation), })), diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts index e1fe1d9c7f4cb..275ecb3c24f34 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts @@ -2895,7 +2895,7 @@ describe('xy_visualization', () => { displayName: 'Keep global filters', description: 'All the dimensions configured in this layer respect filters defined at kibana level.', - icon: 'eye', + icon: 'filter', isCompatible: true, 'data-test-subj': 'lnsXY_annotationLayer_keepFilters', }), diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts index 89fbdfd38fcf1..2ca0f9530bbe1 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/helpers.ts @@ -97,7 +97,6 @@ export const sanitizeProperties = (annotation: EventAnnotationConfig) => { 'textField', 'filter', 'extraFields', - 'ignoreGlobalFilters', ]); return lineAnnotation; } diff --git a/x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts b/x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts index 198e86ebd1e06..41b684b120da2 100644 --- a/x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts +++ b/x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts @@ -20,7 +20,10 @@ export const internalCreateExceptionListRoute = (router: ListsPluginRouter): voi router.post( { options: { - tags: ['access:lists-all'], + // Access control is set to `read` on purpose, as this route is internal and meant to + // ensure we have lists created (if not already) for Endpoint artifacts in order to support + // the UI. The Schema ensures that only endpoint artifact list IDs are allowed. + tags: ['access:lists-read'], }, path: INTERNAL_EXCEPTIONS_LIST_ENSURE_CREATED_URL, validate: { diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js index 0eb7f810932fb..b186192b64744 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js @@ -75,7 +75,7 @@ export class JobsListView extends Component { componentDidMount() { this._isMounted = true; - this.refreshJobSummaryList(true); + this.refreshJobSummaryList(); this.openAutoStartDatafeedModal(); } @@ -290,72 +290,74 @@ export class JobsListView extends Component { onRefreshClick = () => { this.setState({ isRefreshing: true }); - this.refreshJobSummaryList(true); + this.refreshJobSummaryList(); }; isDoneRefreshing = () => { this.setState({ isRefreshing: false }); }; - async refreshJobSummaryList(forceRefresh = false) { - if (this._isMounted && (forceRefresh === true || this.props.blockRefresh !== true)) { - // Set loading to true for jobs_list table for initial job loading - if (this.state.loading === null) { - this.setState({ loading: true }); - } + async refreshJobSummaryList() { + if (this._isMounted === false) { + return; + } - const expandedJobsIds = Object.keys(this.state.itemIdToExpandedRowMap); - try { - let jobsAwaitingNodeCount = 0; - const jobs = await ml.jobs.jobsSummary(expandedJobsIds); - const fullJobsList = {}; - const jobsSummaryList = jobs.map((job) => { - if (job.fullJob !== undefined) { - fullJobsList[job.id] = job.fullJob; - delete job.fullJob; - } - job.latestTimestampSortValue = job.latestTimestampMs || 0; - - if (job.awaitingNodeAssignment === true) { - jobsAwaitingNodeCount++; - } - return job; - }); - const filteredJobsSummaryList = filterJobs(jobsSummaryList, this.state.filterClauses); - this.setState( - { - jobsSummaryList, - filteredJobsSummaryList, - fullJobsList, - loading: false, - jobsAwaitingNodeCount, - }, - () => { - this.refreshSelectedJobs(); - } - ); + // Set loading to true for jobs_list table for initial job loading + if (this.state.loading === null) { + this.setState({ loading: true }); + } + + const expandedJobsIds = Object.keys(this.state.itemIdToExpandedRowMap); + try { + let jobsAwaitingNodeCount = 0; + const jobs = await ml.jobs.jobsSummary(expandedJobsIds); + const fullJobsList = {}; + const jobsSummaryList = jobs.map((job) => { + if (job.fullJob !== undefined) { + fullJobsList[job.id] = job.fullJob; + delete job.fullJob; + } + job.latestTimestampSortValue = job.latestTimestampMs || 0; + + if (job.awaitingNodeAssignment === true) { + jobsAwaitingNodeCount++; + } + return job; + }); + const filteredJobsSummaryList = filterJobs(jobsSummaryList, this.state.filterClauses); + this.setState( + { + jobsSummaryList, + filteredJobsSummaryList, + fullJobsList, + loading: false, + jobsAwaitingNodeCount, + }, + () => { + this.refreshSelectedJobs(); + } + ); + + Object.keys(this.updateFunctions).forEach((j) => { + this.updateFunctions[j](fullJobsList[j]); + }); - Object.keys(this.updateFunctions).forEach((j) => { - this.updateFunctions[j](fullJobsList[j]); - }); - - jobs.forEach((job) => { - if (job.blocked !== undefined && this.state.itemIdToExpandedRowMap[job.id]) { - this.toggleRow(job.id); - } - }); - - this.isDoneRefreshing(); - if (jobsSummaryList.some((j) => j.blocked !== undefined)) { - // if there are some jobs in a deleting state, start polling for - // deleting jobs so we can update the jobs list once the - // deleting tasks are over - this.checkBlockingJobTasks(forceRefresh); + jobs.forEach((job) => { + if (job.blocked !== undefined && this.state.itemIdToExpandedRowMap[job.id]) { + this.toggleRow(job.id); } - } catch (error) { - console.error(error); - this.setState({ loading: false }); + }); + + this.isDoneRefreshing(); + if (jobsSummaryList.some((j) => j.blocked !== undefined)) { + // if there are some jobs in a deleting state, start polling for + // deleting jobs so we can update the jobs list once the + // deleting tasks are over + this.checkBlockingJobTasks(true); } + } catch (error) { + console.error(error); + this.setState({ loading: false }); } } @@ -432,7 +434,7 @@ export class JobsListView extends Component { showResetJobModal={this.showResetJobModal} showCreateAlertFlyout={this.showCreateAlertFlyout} showStopDatafeedsConfirmModal={this.showStopDatafeedsConfirmModal} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <JobFilterBar setFilters={this.setFilters} @@ -452,7 +454,7 @@ export class JobsListView extends Component { showCloseJobsConfirmModal={this.showCloseJobsConfirmModal} showStartDatafeedModal={this.showStartDatafeedModal} showStopDatafeedsConfirmModal={this.showStopDatafeedsConfirmModal} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} jobsViewState={this.props.jobsViewState} onJobsViewStateUpdate={this.props.onJobsViewStateUpdate} selectedJobsCount={this.state.selectedJobs.length} @@ -466,40 +468,40 @@ export class JobsListView extends Component { <EditJobFlyout setShowFunction={this.setShowEditJobFlyoutFunction} unsetShowFunction={this.unsetShowEditJobFlyoutFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} allJobIds={jobIds} /> <JobListDatafeedChartFlyout setShowFunction={this.setShowDatafeedChartFlyoutFunction} unsetShowFunction={this.unsetShowDatafeedChartFlyoutFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <StopDatafeedsConfirmModal setShowFunction={this.setShowStopDatafeedsConfirmModalFunction} unsetShowFunction={this.unsetShowStopDatafeedsConfirmModalFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} allJobIds={jobIds} /> <CloseJobsConfirmModal setShowFunction={this.setShowCloseJobsConfirmModalFunction} unsetShowFunction={this.unsetShowCloseJobsConfirmModalFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <DeleteJobModal setShowFunction={this.setShowDeleteJobModalFunction} unsetShowFunction={this.unsetShowDeleteJobModalFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <ResetJobModal setShowFunction={this.setShowResetJobModalFunction} unsetShowFunction={this.unsetShowResetJobModalFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <StartDatafeedModal setShowFunction={this.setShowStartDatafeedModalFunction} unsetShowFunction={this.unsetShowDeleteJobModalFunction} getShowCreateAlertFlyoutFunction={this.getShowCreateAlertFlyoutFunction} - refreshJobs={() => this.refreshJobSummaryList(true)} + refreshJobs={() => this.refreshJobSummaryList()} /> <JobListMlAnomalyAlertFlyout setShowFunction={this.setShowCreateAlertFlyoutFunction} diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/jobs.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/jobs.tsx index d43f75ad55c1f..f6909b3d98f52 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/jobs.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/jobs.tsx @@ -19,7 +19,6 @@ import { HeaderMenuPortal } from '../../components/header_menu_portal'; import { JobsActionMenu } from '../components/jobs_action_menu'; interface JobsPageProps { - blockRefresh?: boolean; isMlEnabledInSpace?: boolean; lastRefresh?: number; } @@ -31,7 +30,7 @@ export const getDefaultAnomalyDetectionJobsListState = (): ListingPageUrlState = sortDirection: 'asc', }); -export const JobsPage: FC<JobsPageProps> = (props) => { +export const JobsPage: FC<JobsPageProps> = ({ isMlEnabledInSpace, lastRefresh }) => { const [pageState, setPageState] = usePageUrlState( ML_PAGES.ANOMALY_DETECTION_JOBS_MANAGE, getDefaultAnomalyDetectionJobsListState() @@ -48,7 +47,12 @@ export const JobsPage: FC<JobsPageProps> = (props) => { <HeaderMenuPortal> <JobsActionMenu /> </HeaderMenuPortal> - <JobsListView {...props} jobsViewState={pageState} onJobsViewStateUpdate={setPageState} /> + <JobsListView + isMlEnabledInSpace={isMlEnabledInSpace} + lastRefresh={lastRefresh} + jobsViewState={pageState} + onJobsViewStateUpdate={setPageState} + /> <HelpMenu docLink={helpLink} /> </> ); diff --git a/x-pack/plugins/ml/public/application/routing/router.tsx b/x-pack/plugins/ml/public/application/routing/router.tsx index 8807de5b0f173..abaac9bd05f9f 100644 --- a/x-pack/plugins/ml/public/application/routing/router.tsx +++ b/x-pack/plugins/ml/public/application/routing/router.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import React, { useEffect, FC } from 'react'; -import { useHistory, useLocation, Router, RouteProps } from 'react-router-dom'; -import { Location } from 'history'; +import React, { FC } from 'react'; +import { Router, type RouteProps } from 'react-router-dom'; +import { type Location } from 'history'; import type { AppMountParameters, @@ -74,26 +74,6 @@ export const PageLoader: FC<{ context: MlContextValue }> = ({ context, children ); }; -/** - * This component provides compatibility with the previous hash based - * URL format used by HashRouter. Even if we migrate all internal URLs - * to one without hashes, we should keep this redirect in place to - * support legacy bookmarks and as a fallback for unmigrated URLs - * from other plugins. - */ -const LegacyHashUrlRedirect: FC = ({ children }) => { - const history = useHistory(); - const location = useLocation(); - - useEffect(() => { - if (location.hash.startsWith('#/')) { - history.push(location.hash.replace('#', '')); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [location.hash]); - - return <>{children}</>; -}; /** * `MlRouter` is based on `BrowserRouter` and takes in `ScopedHistory` provided * by Kibana. `LegacyHashUrlRedirect` provides compatibility with legacy hash based URLs. @@ -104,12 +84,10 @@ export const MlRouter: FC<{ pageDeps: PageDependencies; }> = ({ pageDeps }) => ( <Router history={pageDeps.history}> - <LegacyHashUrlRedirect> - <UrlStateProvider> - <MlNotificationsContextProvider> - <MlPage pageDeps={pageDeps} /> - </MlNotificationsContextProvider> - </UrlStateProvider> - </LegacyHashUrlRedirect> + <UrlStateProvider> + <MlNotificationsContextProvider> + <MlPage pageDeps={pageDeps} /> + </MlNotificationsContextProvider> + </UrlStateProvider> </Router> ); diff --git a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx index e6025147c3226..9a4791e875fc9 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx @@ -59,8 +59,6 @@ const PageWrapper: FC<PageProps> = ({ deps }) => { const refreshValue = refresh.value ?? 0; const refreshPause = refresh.pause ?? true; - const blockRefresh = refreshValue === 0 || refreshPause === true; - useEffect(() => { const refreshInterval = refreshValue === 0 && refreshPause === true @@ -75,7 +73,7 @@ const PageWrapper: FC<PageProps> = ({ deps }) => { return ( <PageLoader context={context}> <MlAnnotationUpdatesContext.Provider value={annotationUpdatesService}> - <JobsPage blockRefresh={blockRefresh} lastRefresh={lastRefresh} /> + <JobsPage lastRefresh={lastRefresh} /> </MlAnnotationUpdatesContext.Provider> </PageLoader> ); diff --git a/x-pack/plugins/monitoring/server/routes/api/v1/elasticsearch/ccr.ts b/x-pack/plugins/monitoring/server/routes/api/v1/elasticsearch/ccr.ts index 726ed7b2500d1..962b6c3001ad1 100644 --- a/x-pack/plugins/monitoring/server/routes/api/v1/elasticsearch/ccr.ts +++ b/x-pack/plugins/monitoring/server/routes/api/v1/elasticsearch/ccr.ts @@ -6,8 +6,10 @@ */ import { get, groupBy } from 'lodash'; -import { prefixIndexPatternWithCcs } from '../../../../../common/ccs_utils'; -import { INDEX_PATTERN_ELASTICSEARCH } from '../../../../../common/constants'; +import { + getIndexPatterns, + getElasticsearchDataset, +} from '../../../../lib/cluster/get_index_patterns'; import { postElasticsearchCcrRequestParamsRT, postElasticsearchCcrRequestPayloadRT, @@ -140,6 +142,13 @@ function buildRequest( }, }, }, + { + term: { + 'data_stream.dataset': { + value: getElasticsearchDataset('ccr'), + }, + }, + }, ], }, }, @@ -215,7 +224,14 @@ export function ccrRoute(server: MonitoringCore) { async handler(req) { const config = server.config; const ccs = req.payload.ccs; - const esIndexPattern = prefixIndexPatternWithCcs(config, INDEX_PATTERN_ELASTICSEARCH, ccs); + const dataset = 'ccr'; + const moduleType = 'elasticsearch'; + const esIndexPattern = getIndexPatterns({ + config, + moduleType, + dataset, + ccs, + }); try { const { callWithRequest } = req.server.plugins.elasticsearch.getCluster('monitoring'); diff --git a/x-pack/plugins/observability/e2e/journeys/index.ts b/x-pack/plugins/observability/e2e/journeys/index.ts index 38b4c51a226ae..3f0bc8128434c 100644 --- a/x-pack/plugins/observability/e2e/journeys/index.ts +++ b/x-pack/plugins/observability/e2e/journeys/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './exploratory_view'; +// export * from './exploratory_view'; export * from './step_duration.journey'; -export * from './single_metric.journey'; +// export * from './single_metric.journey'; diff --git a/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx b/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx index 7e5b713c6a238..637f39eeedd68 100644 --- a/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx @@ -22,6 +22,7 @@ import moment from 'moment'; import React, { useContext } from 'react'; import { useHistory } from 'react-router-dom'; import { ThemeContext } from 'styled-components'; +import { useTimeZone } from '../../../../hooks/use_time_zone'; import { SectionContainer } from '..'; import { getDataHandler } from '../../../../data_handler'; import { useChartTheme } from '../../../../hooks/use_chart_theme'; @@ -46,19 +47,31 @@ export function UptimeSection({ bucketSize }: Props) { const { relativeStart, relativeEnd, absoluteStart, absoluteEnd, lastUpdated } = useDatePickerContext(); + const timeZone = useTimeZone(); + const { data, status } = useFetcher( () => { if (bucketSize && absoluteStart && absoluteEnd) { return getDataHandler('synthetics')?.fetchData({ absoluteTime: { start: absoluteStart, end: absoluteEnd }, relativeTime: { start: relativeStart, end: relativeEnd }, + timeZone, ...bucketSize, }); } }, // `forceUpdate` and `lastUpdated` should trigger a reload // eslint-disable-next-line react-hooks/exhaustive-deps - [bucketSize, relativeStart, relativeEnd, absoluteStart, absoluteEnd, forceUpdate, lastUpdated] + [ + bucketSize, + relativeStart, + relativeEnd, + absoluteStart, + absoluteEnd, + forceUpdate, + lastUpdated, + timeZone, + ] ); if (!hasDataMap.synthetics?.hasData) { diff --git a/x-pack/plugins/observability/public/components/shared/alert_status_indicator.tsx b/x-pack/plugins/observability/public/components/shared/alert_status_indicator.tsx index 078d5c29767af..8090e26d4596f 100644 --- a/x-pack/plugins/observability/public/components/shared/alert_status_indicator.tsx +++ b/x-pack/plugins/observability/public/components/shared/alert_status_indicator.tsx @@ -13,12 +13,13 @@ import { LIGHT_THEME } from '@elastic/charts'; interface AlertStatusIndicatorProps { alertStatus: AlertStatus; + textSize?: 'xs' | 's' | 'm' | 'inherit'; } -export function AlertStatusIndicator({ alertStatus }: AlertStatusIndicatorProps) { +export function AlertStatusIndicator({ alertStatus, textSize = 'xs' }: AlertStatusIndicatorProps) { if (alertStatus === ALERT_STATUS_ACTIVE) { return ( - <EuiHealth color={LIGHT_THEME.colors.vizColors[2]} textSize="xs"> + <EuiHealth color={LIGHT_THEME.colors.vizColors[2]} textSize={textSize}> {i18n.translate('xpack.observability.alertsTGrid.statusActiveDescription', { defaultMessage: 'Active', })} @@ -27,7 +28,7 @@ export function AlertStatusIndicator({ alertStatus }: AlertStatusIndicatorProps) } return ( - <EuiHealth color={LIGHT_THEME.colors.vizColors[1]} textSize="xs"> + <EuiHealth color={LIGHT_THEME.colors.vizColors[1]} textSize={textSize}> <EuiText color="subdued" size="relative"> {i18n.translate('xpack.observability.alertsTGrid.statusRecoveredDescription', { defaultMessage: 'Recovered', diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx index 09e17398220d8..c32717f7f9118 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { EuiLoadingSpinner } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import type { CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; @@ -14,6 +14,7 @@ import { EuiErrorBoundary } from '@elastic/eui'; import styled from 'styled-components'; import { DataView } from '@kbn/data-views-plugin/common'; import { FormulaPublicApi } from '@kbn/lens-plugin/public'; +import { i18n } from '@kbn/i18n'; import { useAppDataView } from './use_app_data_view'; import { ObservabilityPublicPluginsStart, useFetcher } from '../../../..'; import type { ExploratoryEmbeddableProps, ExploratoryEmbeddableComponentProps } from './embeddable'; @@ -70,6 +71,10 @@ export function getExploratoryViewEmbeddable( ); } + if (!dataViews[series?.dataType]) { + return <EmptyState height={props.customHeight} />; + } + return ( <EuiErrorBoundary> <EuiThemeProvider darkMode={isDarkMode}> @@ -103,3 +108,17 @@ const LoadingWrapper = styled.div<{ align-items: center; justify-content: center; `; + +function EmptyState({ height }: { height?: string }) { + return ( + <EuiFlexGroup alignItems="center" justifyContent="center" style={{ height: height ?? '100%' }}> + <EuiFlexItem grow={false}> + <span>{NO_DATA_LABEL}</span> + </EuiFlexItem> + </EuiFlexGroup> + ); +} + +const NO_DATA_LABEL = i18n.translate('xpack.observability.overview.exploratoryView.noData', { + defaultMessage: 'No data', +}); diff --git a/x-pack/plugins/observability/public/hooks/use_time_zone.ts b/x-pack/plugins/observability/public/hooks/use_time_zone.ts new file mode 100644 index 0000000000000..0e7a8cf7c6a7e --- /dev/null +++ b/x-pack/plugins/observability/public/hooks/use_time_zone.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useUiSetting } from '@kbn/kibana-react-plugin/public'; +import moment from 'moment-timezone'; + +export const useTimeZone = () => { + const timeZone = useUiSetting<string | undefined>('dateFormat:tz'); + + const localTZ = moment.tz.guess(); + + if (!timeZone || timeZone === 'Browser') { + return localTZ; + } + + return timeZone; +}; diff --git a/x-pack/plugins/observability/public/index.ts b/x-pack/plugins/observability/public/index.ts index eefdb546a060e..37ee74157ede3 100644 --- a/x-pack/plugins/observability/public/index.ts +++ b/x-pack/plugins/observability/public/index.ts @@ -80,6 +80,7 @@ export * from './typings'; export { useChartTheme } from './hooks/use_chart_theme'; export { useBreadcrumbs } from './hooks/use_breadcrumbs'; export { useTheme } from './hooks/use_theme'; +export { useTimeZone } from './hooks/use_time_zone'; export { createUseRulesLink } from './hooks/create_use_rules_link'; export { useLinkProps, shouldHandleLinkEvent } from './hooks/use_link_props'; export type { LinkDescriptor } from './hooks/use_link_props'; diff --git a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.test.tsx b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.test.tsx index 670a9e009cfa7..e29771ee169de 100644 --- a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.test.tsx +++ b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.test.tsx @@ -10,10 +10,6 @@ import * as useUiSettingHook from '@kbn/kibana-react-plugin/public/ui_settings/u import { render } from '../../../utils/test_helper'; import { AlertSummary } from './alert_summary'; import { asDuration } from '../../../../common/utils/formatters'; -import { kibanaStartMock } from '../../../utils/kibana_react.mock'; -import { useKibana } from '../../../utils/kibana_react'; -import { triggersActionsUiMock } from '@kbn/triggers-actions-ui-plugin/public/mocks'; -import { waitFor } from '@testing-library/react'; import { alertWithTags, alertWithNoData, tags } from '../mock/alert'; jest.mock('react-router-dom', () => ({ @@ -23,17 +19,6 @@ jest.mock('react-router-dom', () => ({ jest.mock('../../../utils/kibana_react'); -const useKibanaMock = useKibana as jest.Mock; - -const mockKibana = () => { - useKibanaMock.mockReturnValue({ - services: { - ...kibanaStartMock.startContract(), - triggersActionsUi: triggersActionsUiMock.createStart(), - }, - }); -}; - describe('Alert summary', () => { jest .spyOn(useUiSettingHook, 'useUiSetting') @@ -41,7 +26,6 @@ describe('Alert summary', () => { beforeEach(() => { jest.clearAllMocks(); - mockKibana(); }); it('should show alert data', async () => { @@ -54,7 +38,6 @@ describe('Alert summary', () => { expect( alertSummary.getByText('Sep 2, 2021 @ 09:08:51.750', { exact: false }) ).toBeInTheDocument(); - await waitFor(() => expect(alertSummary.queryByTestId('tagsOutPopover')).toBeInTheDocument()); expect(alertSummary.queryByText(tags[0])).toBeInTheDocument(); }); @@ -63,8 +46,5 @@ describe('Alert summary', () => { expect(alertSummary.queryByTestId('noAlertStatus')).toBeInTheDocument(); expect(alertSummary.queryByTestId('noAlertStatus')).toHaveTextContent('-'); - await waitFor(() => - expect(alertSummary.queryByTestId('tagsOutPopover')).not.toBeInTheDocument() - ); }); }); diff --git a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx index eada6a3925521..29df36d88aa51 100644 --- a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx +++ b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx @@ -5,7 +5,15 @@ * 2.0. */ import React from 'react'; -import { EuiText, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui'; +import { + EuiText, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiTitle, + EuiBadge, + EuiBadgeGroup, +} from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import { @@ -21,12 +29,10 @@ import { } from '@kbn/rule-data-utils'; import { asDuration } from '../../../../common/utils/formatters'; import { AlertSummaryProps } from '../types'; -import { useKibana } from '../../../utils/kibana_react'; import { AlertStatusIndicator } from '../../../components/shared/alert_status_indicator'; import { DEFAULT_DATE_FORMAT } from '../constants'; export function AlertSummary({ alert }: AlertSummaryProps) { - const { triggersActionsUi } = useKibana().services; const tags = alert?.fields[ALERT_RULE_TAGS]; return ( @@ -86,6 +92,7 @@ export function AlertSummary({ alert }: AlertSummaryProps) { <EuiSpacer size="s" /> {alert?.fields[ALERT_STATUS] ? ( <AlertStatusIndicator + textSize="s" alertStatus={ alert?.fields[ALERT_STATUS] === ALERT_STATUS_ACTIVE ? ALERT_STATUS_ACTIVE @@ -97,6 +104,7 @@ export function AlertSummary({ alert }: AlertSummaryProps) { )} </EuiFlexItem> </EuiFlexGroup> + <EuiSpacer size="m" /> <EuiFlexGroup> <EuiFlexItem> <EuiTitle size="xxs"> @@ -151,13 +159,17 @@ export function AlertSummary({ alert }: AlertSummaryProps) { </EuiTitle> <EuiSpacer size="s" /> <div> - <EuiSpacer size="s" /> - {tags && - tags.length > 0 && - triggersActionsUi.getRuleTagBadge<'tagsOutPopover'>({ - tagsOutPopover: true, - tags, - })} + {tags && tags.length > 0 ? ( + <EuiBadgeGroup> + {tags.map((tag, index) => ( + <EuiBadge data-test-subj={`ruleTagBadge-${tag}`} key={index} color="hollow"> + <EuiText size="s">{tag}</EuiText> + </EuiBadge> + ))} + </EuiBadgeGroup> + ) : ( + <div data-test-subj="noRuleTags">-</div> + )} </div> </EuiFlexItem> </EuiFlexGroup> diff --git a/x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts b/x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts index 8b19b4924829f..64a66dff66e42 100644 --- a/x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts +++ b/x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts @@ -31,6 +31,7 @@ export interface FetchDataParams { bucketSize: number; // Bucket size in seconds (string) intervalString: string; + timeZone?: string; } export interface HasDataParams { diff --git a/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts b/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts index d43c6f27e97ea..4b911c383d831 100644 --- a/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts +++ b/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts @@ -113,13 +113,17 @@ export class ObservabilityDataViews { const { runtimeFields } = getFieldFormatsForApp(app); - const dataView = await this.dataViews.create({ - title: appIndicesPattern, - id: getAppDataViewId(app, indices), - timeFieldName: '@timestamp', - fieldFormats: this.getFieldFormats(app), - name: DataTypesLabels[app], - }); + const dataView = await this.dataViews.create( + { + title: appIndicesPattern, + id: getAppDataViewId(app, indices), + timeFieldName: '@timestamp', + fieldFormats: this.getFieldFormats(app), + name: DataTypesLabels[app], + }, + false, + false + ); if (runtimeFields !== null) { runtimeFields.forEach(({ name, field }) => { diff --git a/x-pack/plugins/osquery/common/schemas/common/utils.ts b/x-pack/plugins/osquery/common/schemas/common/utils.ts index b6dec6a6f920d..2a9061507be46 100644 --- a/x-pack/plugins/osquery/common/schemas/common/utils.ts +++ b/x-pack/plugins/osquery/common/schemas/common/utils.ts @@ -84,7 +84,7 @@ export const convertShardsToArray = ( reduce( shards, (acc, value, key) => { - if (value) { + if (value != null) { acc.push({ policy: { key, diff --git a/x-pack/plugins/osquery/public/packs/form/index.tsx b/x-pack/plugins/osquery/public/packs/form/index.tsx index dc19739c32adf..e2a9a48612fcf 100644 --- a/x-pack/plugins/osquery/public/packs/form/index.tsx +++ b/x-pack/plugins/osquery/public/packs/form/index.tsx @@ -242,16 +242,19 @@ const PackFormComponent: React.FC<PackFormProps> = ({ <NameField euiFieldProps={euiFieldProps} /> </EuiFlexItem> </EuiFlexGroup> + <EuiSpacer size="m" /> <EuiFlexGroup> <EuiFlexItem> <DescriptionField euiFieldProps={euiFieldProps} /> </EuiFlexItem> </EuiFlexGroup> + <EuiSpacer size="m" /> <EuiFlexGroup> <PackTypeSelectable packType={packType} setPackType={changePackType} /> </EuiFlexGroup> + <EuiSpacer size="m" /> {packType === 'policy' && ( <> @@ -260,6 +263,7 @@ const PackFormComponent: React.FC<PackFormProps> = ({ <PolicyIdComboBoxField options={availableOptions} /> </EuiFlexItem> </EuiFlexGroup> + <EuiSpacer size="m" /> <EuiFlexGroup> <EuiFlexItem> @@ -274,6 +278,7 @@ const PackFormComponent: React.FC<PackFormProps> = ({ </StyledEuiAccordion> </EuiFlexItem> </EuiFlexGroup> + <EuiSpacer size="m" /> </> )} diff --git a/x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx b/x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx index c78d36f20aa19..ceb0ecab3fcdd 100644 --- a/x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx +++ b/x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useEffect } from 'react'; +import React, { useEffect, useMemo } from 'react'; import type { InternalFieldErrors } from 'react-hook-form'; import { useFieldArray, useForm, useFormContext } from 'react-hook-form'; import type { EuiComboBoxOptionOption } from '@elastic/eui'; @@ -40,15 +40,26 @@ const PackShardsFieldComponent = ({ options }: PackShardsFieldProps) => { const rootShards = watchRoot('shards'); + const initialShardsArray = useMemo(() => { + const initialConvertedShards = convertShardsToArray(rootShards, agentPoliciesById); + if (!isEmpty(initialConvertedShards)) { + if (initialConvertedShards[initialConvertedShards.length - 1].policy.key) { + return [...initialConvertedShards, defaultShardData]; + } + + return initialConvertedShards; + } + + return [defaultShardData]; + }, [agentPoliciesById, rootShards]); + const { control, watch, getFieldState, formState, resetField, setValue } = useForm<{ shardsArray: ShardsArray; }>({ mode: 'all', shouldUnregister: true, defaultValues: { - shardsArray: !isEmpty(convertShardsToArray(rootShards, agentPoliciesById)) - ? [...convertShardsToArray(rootShards, agentPoliciesById), defaultShardData] - : [defaultShardData], + shardsArray: initialShardsArray, }, }); const { fields, remove, append } = useFieldArray({ @@ -108,6 +119,7 @@ const PackShardsFieldComponent = ({ options }: PackShardsFieldProps) => { control={control} options={options} /> + <EuiSpacer size="xs" /> </div> ))} </> diff --git a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts index 43f36155ad846..b94a334397346 100644 --- a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts +++ b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts @@ -137,7 +137,11 @@ export const ruleRegistrySearchStrategyProvider = ( query, }, }; - return (siemRequest ? requestUserEs : internalUserEs).search({ params }, options, deps); + return (siemRequest ? requestUserEs : internalUserEs).search( + { id: request.id, params }, + options, + deps + ); }), map((response) => { // Do we have to loop over each hit? Yes. diff --git a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts index f46908902376f..c901cca33f450 100644 --- a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts +++ b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts @@ -235,6 +235,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEdit", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDelete", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEnable", + "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDisable", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/unsnooze", ] `); @@ -336,6 +337,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEdit", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDelete", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEnable", + "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDisable", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/unsnooze", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", @@ -397,6 +399,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEdit", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDelete", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEnable", + "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDisable", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/unsnooze", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/rule/get", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/rule/getRuleState", @@ -507,6 +510,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEdit", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDelete", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkEnable", + "alerting:1.0.0-zeta1:alert-type/my-feature/rule/bulkDisable", "alerting:1.0.0-zeta1:alert-type/my-feature/rule/unsnooze", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/rule/get", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/rule/getRuleState", diff --git a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts index 7ea90990a76e5..94b8c1a64290c 100644 --- a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts +++ b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts @@ -44,6 +44,7 @@ const writeOperations: Record<AlertingEntity, string[]> = { 'bulkEdit', 'bulkDelete', 'bulkEnable', + 'bulkDisable', 'unsnooze', ], alert: ['update'], diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index aec2bc40a4824..9a8be961fa881 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -90,14 +90,12 @@ export enum SecurityPageName { cloudSecurityPostureBenchmarks = 'cloud_security_posture-benchmarks', cloudSecurityPostureDashboard = 'cloud_security_posture-dashboard', cloudSecurityPostureFindings = 'cloud_security_posture-findings', - cloudSecurityPostureRules = 'cloud_security_posture-rules', dashboardsLanding = 'dashboards', detections = 'detections', detectionAndResponse = 'detection_response', endpoints = 'endpoints', eventFilters = 'event_filters', exceptions = 'exceptions', - sharedExceptionListDetails = 'shared-exception-list-details', exploreLanding = 'explore', hostIsolationExceptions = 'host_isolation_exceptions', hosts = 'hosts', @@ -150,6 +148,7 @@ export const ALERTS_PATH = '/alerts' as const; export const RULES_PATH = '/rules' as const; export const RULES_CREATE_PATH = `${RULES_PATH}/create` as const; export const EXCEPTIONS_PATH = '/exceptions' as const; +export const EXCEPTION_LIST_DETAIL_PATH = `${EXCEPTIONS_PATH}/details/:detailName` as const; export const HOSTS_PATH = '/hosts' as const; export const USERS_PATH = '/users' as const; export const KUBERNETES_PATH = '/kubernetes' as const; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts index a818e4d56d5b6..fd244d3d90c8e 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts @@ -5,23 +5,14 @@ * 2.0. */ -import { - ENDPOINT_TRUSTED_APPS_LIST_ID, - ENDPOINT_EVENT_FILTERS_LIST_ID, - ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, - ENDPOINT_BLOCKLISTS_LIST_ID, -} from '@kbn/securitysolution-list-constants'; +import { ENDPOINT_ARTIFACT_LIST_IDS } from '@kbn/securitysolution-list-constants'; export const BY_POLICY_ARTIFACT_TAG_PREFIX = 'policy:'; export const GLOBAL_ARTIFACT_TAG = `${BY_POLICY_ARTIFACT_TAG_PREFIX}all`; -export const ALL_ENDPOINT_ARTIFACT_LIST_IDS: readonly string[] = [ - ENDPOINT_TRUSTED_APPS_LIST_ID, - ENDPOINT_EVENT_FILTERS_LIST_ID, - ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, - ENDPOINT_BLOCKLISTS_LIST_ID, -]; +// TODO: refact all uses of `ALL_ENDPOINT_ARTIFACTS_LIST_IDS to sue new const from shared package +export const ALL_ENDPOINT_ARTIFACT_LIST_IDS = ENDPOINT_ARTIFACT_LIST_IDS; export const DEFAULT_EXCEPTION_LIST_ITEM_SEARCHABLE_FIELDS: Readonly<string[]> = [ `name`, diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts index 8305d2aa08ae1..6bd6bbdbda02b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts @@ -140,6 +140,7 @@ describe('Endpoint Authz service', () => { ['canReadPolicyManagement', 'readPolicyManagement'], ['canWriteActionsLogManagement', 'writeActionsLogManagement'], ['canReadActionsLogManagement', 'readActionsLogManagement'], + ['canAccessEndpointActionsLogManagement', 'readActionsLogManagement'], ['canIsolateHost', 'writeHostIsolation'], ['canUnIsolateHost', 'writeHostIsolation'], ['canKillProcess', 'writeProcessOperations'], @@ -166,6 +167,10 @@ describe('Endpoint Authz service', () => { ['canReadPolicyManagement', ['writePolicyManagement', 'readPolicyManagement']], ['canWriteActionsLogManagement', ['writeActionsLogManagement']], ['canReadActionsLogManagement', ['writeActionsLogManagement', 'readActionsLogManagement']], + [ + 'canAccessEndpointActionsLogManagement', + ['writeActionsLogManagement', 'readActionsLogManagement'], + ], ['canIsolateHost', ['writeHostIsolation']], ['canUnIsolateHost', ['writeHostIsolation']], ['canKillProcess', ['writeProcessOperations']], @@ -218,6 +223,7 @@ describe('Endpoint Authz service', () => { canWriteSecuritySolution: false, canReadSecuritySolution: false, canAccessFleet: false, + canAccessEndpointActionsLogManagement: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, canDeleteHostIsolationExceptions: false, diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts index f4a2c9894108d..5c83571b6373e 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts @@ -63,6 +63,8 @@ export function hasKibanaPrivilege( * @param hasHostIsolationExceptionsItems if set to `true`, then Host Isolation Exceptions related authz properties * may be adjusted to account for a license downgrade scenario */ + +// eslint-disable-next-line complexity export const calculateEndpointAuthz = ( licenseService: LicenseService, fleetAuthz: FleetAuthz, @@ -223,6 +225,7 @@ export const calculateEndpointAuthz = ( canReadPolicyManagement, canWriteActionsLogManagement, canReadActionsLogManagement: canReadActionsLogManagement && isEnterpriseLicense, + canAccessEndpointActionsLogManagement: canReadActionsLogManagement && isPlatinumPlusLicense, // Response Actions canIsolateHost: canIsolateHost && isPlatinumPlusLicense, canUnIsolateHost: canIsolateHost, @@ -250,6 +253,7 @@ export const getEndpointAuthzInitialState = (): EndpointAuthz => { return { ...defaultEndpointPermissions(), canAccessFleet: false, + canAccessEndpointActionsLogManagement: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, canWriteEndpointList: false, diff --git a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts index fbfa97ad73328..e693e6d0e4cff 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts @@ -24,6 +24,8 @@ export interface EndpointAuthz extends EndpointPermissions { canAccessFleet: boolean; /** If user has permissions to access Endpoint management (includes check to ensure they also have access to fleet) */ canAccessEndpointManagement: boolean; + /** If user has permissions to access Actions Log management and also has a platinum license (used for endpoint details flyout) */ + canAccessEndpointActionsLogManagement: boolean; /** if user has permissions to create Artifacts by Policy */ canCreateArtifactsByPolicy: boolean; /** if user has write permissions to endpoint list */ diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts index 727c7257b6682..04e08d5de572a 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts @@ -20,6 +20,11 @@ import { RULE_SWITCH, SEVERITY, } from '../../screens/alerts_detection_rules'; +import { + ABOUT_CONTINUE_BTN, + RULE_DESCRIPTION_INPUT, + RULE_NAME_INPUT, +} from '../../screens/create_new_rule'; import { ADDITIONAL_LOOK_BACK_DETAILS, @@ -44,6 +49,7 @@ import { TAGS_DETAILS, TIMELINE_TEMPLATE_DETAILS, DATA_VIEW_DETAILS, + EDIT_RULE_SETTINGS_LINK, } from '../../screens/rule_details'; import { goToRuleDetails } from '../../tasks/alerts_detection_rules'; @@ -51,6 +57,7 @@ import { createTimeline } from '../../tasks/api_calls/timelines'; import { postDataView } from '../../tasks/common'; import { createAndEnableRule, + createRuleWithoutEnabling, fillAboutRuleAndContinue, fillDefineCustomRuleAndContinue, fillScheduleRuleAndContinue, @@ -158,5 +165,24 @@ describe('Custom query rules', () => { .should('match', /^[1-9].+$/); cy.get(ALERT_GRID_CELL).contains(this.rule.name); }); + it('Creates and edits a new rule with a data view', function () { + visit(RULE_CREATION); + fillDefineCustomRuleAndContinue(this.rule); + cy.get(RULE_NAME_INPUT).clear({ force: true }).type(this.rule.name, { force: true }); + cy.get(RULE_DESCRIPTION_INPUT) + .clear({ force: true }) + .type(this.rule.description, { force: true }); + + cy.get(ABOUT_CONTINUE_BTN).should('exist').click({ force: true }); + + fillScheduleRuleAndContinue(this.rule); + createRuleWithoutEnabling(); + + goToRuleDetails(); + + cy.get(EDIT_RULE_SETTINGS_LINK).click({ force: true }); + + cy.get(RULE_NAME_HEADER).should('contain', 'Edit rule settings'); + }); }); }); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts index 7ee3a7e40647f..7a9ac21ca003c 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts @@ -33,7 +33,7 @@ describe('Import rules', () => { cy.wrap(response?.statusCode).should('eql', 200); cy.get(TOASTER).should( 'have.text', - 'Successfully imported 1 ruleSuccessfully imported 2 exceptions.' + 'Successfully imported 1 ruleSuccessfully imported 1 exception.' ); cy.get(RULES_TABLE).then(($table) => { @@ -75,7 +75,7 @@ describe('Import rules', () => { cy.wrap(response?.statusCode).should('eql', 200); cy.get(TOASTER).should( 'have.text', - 'Successfully imported 1 ruleSuccessfully imported 2 exceptions.' + 'Successfully imported 1 ruleSuccessfully imported 1 exception.' ); }); }); diff --git a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts index c57e2c603e461..1d59f2ce83ce1 100644 --- a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts @@ -32,6 +32,8 @@ export const COMBO_BOX_CLEAR_BTN = '[data-test-subj="comboBoxClearButton"]'; export const CREATE_AND_ENABLE_BTN = '[data-test-subj="create-enable"]'; +export const CREATE_WITHOUT_ENABLING_BTN = '[data-test-subj="create-enabled-false"]'; + export const CUSTOM_QUERY_INPUT = '[data-test-subj="queryInput"]'; export const CUSTOM_QUERY_BAR = '[data-test-subj="detectionEngineStepDefineRuleQueryBar"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index fc1f3b389bdf5..fe3809f1d3cc7 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -104,6 +104,7 @@ import { NEW_TERMS_INPUT_AREA, ACTIONS_THROTTLE_INPUT, CONTINUE_BUTTON, + CREATE_WITHOUT_ENABLING_BTN, } from '../screens/create_new_rule'; import { INDEX_SELECTOR, @@ -125,6 +126,13 @@ export const createAndEnableRule = () => { cy.get(BACK_TO_ALL_RULES_LINK).should('not.exist'); }; +export const createRuleWithoutEnabling = () => { + cy.get(CREATE_WITHOUT_ENABLING_BTN).click({ force: true }); + cy.get(CREATE_WITHOUT_ENABLING_BTN).should('not.exist'); + cy.get(BACK_TO_ALL_RULES_LINK).click({ force: true }); + cy.get(BACK_TO_ALL_RULES_LINK).should('not.exist'); +}; + export const fillAboutRule = ( rule: CustomRule | MachineLearningRule | ThresholdRule | ThreatIndicatorRule ) => { diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.ts index 8848f7bddc3d9..db8cf4f92ccaf 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.ts @@ -234,15 +234,6 @@ export const securitySolutionsDeepLinks: SecuritySolutionDeepLink[] = [ defaultMessage: 'Exception lists', }), ], - deepLinks: [ - { - id: SecurityPageName.sharedExceptionListDetails, - title: 'List Details', - path: '/exceptions/shared/:exceptionListId', - navLinkStatus: AppNavLinkStatus.hidden, - searchable: false, - }, - ], }, ], }, @@ -526,7 +517,6 @@ export const securitySolutionsDeepLinks: SecuritySolutionDeepLink[] = [ }, { ...getSecuritySolutionLink<SecurityPageName>('benchmarks'), - deepLinks: [getSecuritySolutionLink<SecurityPageName>('rules')], }, ], }, diff --git a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts index 392e89fbbec0b..1a02a9ad75a82 100644 --- a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts +++ b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts @@ -185,10 +185,6 @@ export const navTabs: SecurityNav = { ...getSecuritySolutionCSPNavTab<SecurityPageName>('benchmarks', APP_PATH), urlKey: 'administration', }, - [SecurityPageName.cloudSecurityPostureRules]: { - ...getSecuritySolutionCSPNavTab<SecurityPageName>('rules', APP_PATH), - urlKey: 'administration', - }, [SecurityPageName.entityAnalytics]: { id: SecurityPageName.entityAnalytics, name: i18n.ENTITY_ANALYTICS, diff --git a/x-pack/plugins/security_solution/public/cloud_security_posture/breadcrumbs.ts b/x-pack/plugins/security_solution/public/cloud_security_posture/breadcrumbs.ts new file mode 100644 index 0000000000000..16bd30db6680d --- /dev/null +++ b/x-pack/plugins/security_solution/public/cloud_security_posture/breadcrumbs.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChromeBreadcrumb } from '@kbn/core-chrome-browser'; +import type { GetSecuritySolutionUrl } from '../common/components/link_to'; +import type { RouteSpyState } from '../common/utils/route/types'; + +export const getTrailingBreadcrumbs = ( + params: RouteSpyState, + getSecuritySolutionUrl: GetSecuritySolutionUrl +): ChromeBreadcrumb[] => { + const breadcrumbs = []; + + if (params.state?.ruleName) { + breadcrumbs.push({ + text: params.state.ruleName, + }); + } + + return breadcrumbs; +}; diff --git a/x-pack/plugins/security_solution/public/cloud_security_posture/links.ts b/x-pack/plugins/security_solution/public/cloud_security_posture/links.ts index 8b3ba47b32ce4..def3b0ed9f5eb 100644 --- a/x-pack/plugins/security_solution/public/cloud_security_posture/links.ts +++ b/x-pack/plugins/security_solution/public/cloud_security_posture/links.ts @@ -44,14 +44,6 @@ export const manageLinks: LinkItem = { ), landingIcon: IconExceptionLists, ...commonLinkProperties, - links: [ - { - ...getSecuritySolutionLink<SecurityPageName>('rules'), - sideNavDisabled: true, - globalSearchDisabled: true, - ...commonLinkProperties, - }, - ], }; export const manageCategories: LinkCategories = [ diff --git a/x-pack/plugins/security_solution/public/cloud_security_posture/routes.tsx b/x-pack/plugins/security_solution/public/cloud_security_posture/routes.tsx index b4870d6e25448..f11bac97dfcf0 100644 --- a/x-pack/plugins/security_solution/public/cloud_security_posture/routes.tsx +++ b/x-pack/plugins/security_solution/public/cloud_security_posture/routes.tsx @@ -5,55 +5,50 @@ * 2.0. */ -import React, { memo } from 'react'; +import React from 'react'; import type { CloudSecurityPosturePageId } from '@kbn/cloud-security-posture-plugin/public'; import { CLOUD_SECURITY_POSTURE_BASE_PATH, type CspSecuritySolutionContext, } from '@kbn/cloud-security-posture-plugin/public'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { useIsGroupedNavigationEnabled } from '../common/components/navigation/helpers'; -import { MANAGE_PATH } from '../../common/constants'; import type { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; import { useKibana } from '../common/lib/kibana'; import { SecuritySolutionPageWrapper } from '../common/components/page_wrapper'; import { SpyRoute } from '../common/utils/route/spy_routes'; import { FiltersGlobal } from '../common/components/filters_global'; -import { MANAGE } from '../app/translations'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; // This exists only for the type signature cast -const CloudPostureSpyRoute = ({ pageName }: { pageName?: CloudSecurityPosturePageId }) => ( - <SpyRoute pageName={pageName as SecurityPageName | undefined} /> +const CloudPostureSpyRoute = ({ pageName, ...rest }: { pageName?: CloudSecurityPosturePageId }) => ( + <SpyRoute pageName={pageName as SecurityPageName | undefined} {...rest} /> ); -const CloudSecurityPosture = memo(() => { +const cspSecuritySolutionContext: CspSecuritySolutionContext = { + getFiltersGlobalComponent: () => FiltersGlobal, + getSpyRouteComponent: () => CloudPostureSpyRoute, +}; + +const CloudSecurityPosture = () => { const { cloudSecurityPosture } = useKibana().services; - const isGroupedNavigationEnabled = useIsGroupedNavigationEnabled(); const CloudSecurityPostureRouter = cloudSecurityPosture.getCloudSecurityPostureRouter(); - const securitySolutionContext: CspSecuritySolutionContext = { - getFiltersGlobalComponent: () => FiltersGlobal, - getSpyRouteComponent: () => CloudPostureSpyRoute, - getManageBreadcrumbEntry: () => - isGroupedNavigationEnabled ? { name: MANAGE, path: MANAGE_PATH } : undefined, - }; return ( <PluginTemplateWrapper> <TrackApplicationView viewId="cloud_security_posture"> <SecuritySolutionPageWrapper noPadding noTimeline> - <CloudSecurityPostureRouter securitySolutionContext={securitySolutionContext} /> + <CloudSecurityPostureRouter securitySolutionContext={cspSecuritySolutionContext} /> </SecuritySolutionPageWrapper> </TrackApplicationView> </PluginTemplateWrapper> ); -}); +}; CloudSecurityPosture.displayName = 'CloudSecurityPosture'; export const routes: SecuritySubPluginRoutes = [ { path: CLOUD_SECURITY_POSTURE_BASE_PATH, - render: () => <CloudSecurityPosture />, + component: CloudSecurityPosture, }, ]; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx index d486bbbac6aa9..59c99694e9228 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx @@ -30,7 +30,7 @@ import { WrappedByAutoSizer, useTheme, Wrapper, - ChartWrapper, + BarChartWrapper, } from './common'; import { DraggableLegend } from './draggable_legend'; import type { LegendItem } from './draggable_legend_item'; @@ -209,7 +209,7 @@ export const BarChartComponent: React.FC<BarChartComponentProps> = ({ <Wrapper> <HoverVisibilityContainer targetClassNames={[HISTOGRAM_ACTIONS_BUTTON_CLASS]}> {isValidSeriesExist && barChart && ( - <ChartWrapper gutterSize="none"> + <BarChartWrapper gutterSize="none"> <EuiFlexItem grow={true}> <WrappedByAutoSizer ref={measureRef} height={chartHeight}> <BarChartBase @@ -226,7 +226,7 @@ export const BarChartComponent: React.FC<BarChartComponentProps> = ({ <LegendFlexItem grow={false}> <DraggableLegend legendItems={legendItems} height={height} /> </LegendFlexItem> - </ChartWrapper> + </BarChartWrapper> )} {!isValidSeriesExist && ( <ChartPlaceHolder height={chartHeight} width={chartWidth} data={barChart} /> diff --git a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx index 0cdfebdb47d57..0e4a68b5912f9 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx @@ -154,3 +154,8 @@ export const Wrapper = styled.div` export const ChartWrapper = styled(EuiFlexGroup)` z-index: 0; `; + +export const BarChartWrapper = styled(EuiFlexGroup)` + z-index: 0; + padding-right: 20px; +`; diff --git a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour_step.tsx b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour_step.tsx index 6a27518ee10a5..c81752f89871f 100644 --- a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour_step.tsx +++ b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour_step.tsx @@ -99,7 +99,7 @@ export const SecurityTourStep = ({ children, onClick, step, tourId }: SecurityTo ...rest, content: ( <> - <EuiText size="xs"> + <EuiText size="s"> <p>{content}</p> </EuiText> {imageConfig && ( diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx index 5bf57218960b2..e46c2bca723f2 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx @@ -70,6 +70,8 @@ interface Response { } const MyEuiModal = styled(EuiModal)` + width: min(768px, calc(100vw - 16px)); + min-height: 41vh; .euiModal__flex { width: 60vw; } diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts index 84aec14891328..0cb13b5bcc4a8 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts @@ -133,6 +133,11 @@ const rulesBReadcrumb = { href: 'securitySolutionUI/rules', }; +const exceptionsBReadcrumb = { + text: 'Rule Exceptions', + href: 'securitySolutionUI/exceptions', +}; + const manageBreadcrumbs = { text: 'Manage', href: 'securitySolutionUI/administration', @@ -433,6 +438,32 @@ describe('Navigation Breadcrumbs', () => { }, ]); }); + + test('should return Exceptions breadcrumbs when supplied exception Details pageName', () => { + const mockListName = 'new shared list'; + const breadcrumbs = getBreadcrumbsForRoute( + { + ...getMockObject( + SecurityPageName.exceptions, + `/exceptions/details/${mockListName}`, + undefined + ), + state: { + listName: mockListName, + }, + }, + getSecuritySolutionUrl, + false + ); + expect(breadcrumbs).toEqual([ + securityBreadCrumb, + exceptionsBReadcrumb, + { + text: mockListName, + href: ``, + }, + ]); + }); }); describe('setBreadcrumbs()', () => { @@ -773,6 +804,31 @@ describe('Navigation Breadcrumbs', () => { }, ]); }); + test('should return Exceptions breadcrumbs when supplied exception Details pageName', () => { + const mockListName = 'new shared list'; + const breadcrumbs = getBreadcrumbsForRoute( + { + ...getMockObject( + SecurityPageName.exceptions, + `/exceptions/details/${mockListName}`, + undefined + ), + state: { + listName: mockListName, + }, + }, + getSecuritySolutionUrl, + false + ); + expect(breadcrumbs).toEqual([ + securityBreadCrumb, + exceptionsBReadcrumb, + { + text: mockListName, + href: ``, + }, + ]); + }); }); describe('setBreadcrumbs()', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts index afcaff3f3d065..287238f57a11c 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts @@ -13,6 +13,8 @@ import type { StartServices } from '../../../../types'; import { getTrailingBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../../hosts/pages/details/utils'; import { getTrailingBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../../network/pages/details'; import { getTrailingBreadcrumbs as getDetectionRulesBreadcrumbs } from '../../../../detections/pages/detection_engine/rules/utils'; +import { getTrailingBreadcrumbs as geExceptionsBreadcrumbs } from '../../../../exceptions/utils/pages.utils'; +import { getTrailingBreadcrumbs as getCSPBreadcrumbs } from '../../../../cloud_security_posture/breadcrumbs'; import { getTrailingBreadcrumbs as getUsersBreadcrumbs } from '../../../../users/pages/details/utils'; import { getTrailingBreadcrumbs as getKubernetesBreadcrumbs } from '../../../../kubernetes/pages/utils/breadcrumbs'; import { getTrailingBreadcrumbs as getAlertDetailBreadcrumbs } from '../../../../detections/pages/alert_details/utils/breadcrumbs'; @@ -81,13 +83,7 @@ export const getBreadcrumbsForRoute = ( ): ChromeBreadcrumb[] | null => { const spyState: RouteSpyState = omit('navTabs', object); - if ( - !spyState || - !object.navTabs || - !spyState.pageName || - isCaseRoutes(spyState) || - isCloudSecurityPostureManagedRoutes(spyState) - ) { + if (!spyState || !object.navTabs || !spyState.pageName || isCaseRoutes(spyState)) { return null; } @@ -131,6 +127,8 @@ const getTrailingBreadcrumbsForRoutes = ( return getDetectionRulesBreadcrumbs(spyState, getSecuritySolutionUrl); } + if (isExceptionRoutes(spyState)) return geExceptionsBreadcrumbs(spyState, getSecuritySolutionUrl); + if (isKubernetesRoutes(spyState)) { return getKubernetesBreadcrumbs(spyState, getSecuritySolutionUrl); } @@ -138,6 +136,10 @@ const getTrailingBreadcrumbsForRoutes = ( return getAlertDetailBreadcrumbs(spyState, getSecuritySolutionUrl); } + if (isCloudSecurityPostureBenchmarksRoutes(spyState)) { + return getCSPBreadcrumbs(spyState, getSecuritySolutionUrl); + } + return []; }; @@ -162,8 +164,11 @@ const isRulesRoutes = (spyState: RouteSpyState): spyState is AdministrationRoute spyState.pageName === SecurityPageName.rules || spyState.pageName === SecurityPageName.rulesCreate; -const isCloudSecurityPostureManagedRoutes = (spyState: RouteSpyState) => - spyState.pageName === SecurityPageName.cloudSecurityPostureRules; +const isExceptionRoutes = (spyState: RouteSpyState) => + spyState.pageName === SecurityPageName.exceptions; + +const isCloudSecurityPostureBenchmarksRoutes = (spyState: RouteSpyState) => + spyState.pageName === SecurityPageName.cloudSecurityPostureBenchmarks; const emptyLastBreadcrumbUrl = (breadcrumbs: ChromeBreadcrumb[]) => { const leadingBreadCrumbs = breadcrumbs.slice(0, -1); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts index 5a2d192b9fd48..5360be3df3271 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts @@ -90,7 +90,6 @@ export const securityNavKeys = [ SecurityPageName.cloudSecurityPostureDashboard, SecurityPageName.cloudSecurityPostureFindings, SecurityPageName.cloudSecurityPostureBenchmarks, - SecurityPageName.cloudSecurityPostureRules, SecurityPageName.entityAnalytics, ] as const; export type SecurityNavKey = typeof securityNavKeys[number]; diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts index ba3bb55afedc0..d5712bee73746 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts @@ -143,6 +143,7 @@ describe('When using useEndpointPrivileges hook', () => { getEndpointPrivilegesInitialStateMock({ canCreateArtifactsByPolicy: false, canIsolateHost: false, + canAccessEndpointActionsLogManagement: false, canWriteHostIsolationExceptions: false, canReadHostIsolationExceptions: hasHIE, canDeleteHostIsolationExceptions: hasHIE, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap index e6560a8f2c33d..3ca4042b34b95 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap @@ -167,7 +167,7 @@ Object { }, "visualization": Object { "axisTitlesVisibilitySettings": Object { - "x": true, + "x": false, "yLeft": false, "yRight": true, }, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts index ce7be2aa9f369..2cbb7635d04cf 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts @@ -15,7 +15,7 @@ export const kpiUserAuthenticationsAreaLensAttributes: LensAttributes = { state: { visualization: { axisTitlesVisibilitySettings: { - x: true, + x: false, yLeft: false, yRight: true, }, diff --git a/x-pack/plugins/security_solution/public/common/links/app_links.test.ts b/x-pack/plugins/security_solution/public/common/links/app_links.test.ts new file mode 100644 index 0000000000000..e3f2b1bd7830c --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/links/app_links.test.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { links } from './app_links'; +import type { LinkItem, AppLinkItems } from './types'; + +const traverse = (linksItems: AppLinkItems, fn: (link: LinkItem) => void) => { + linksItems.forEach((link) => { + fn(link); + if (link.links) { + traverse(link.links, fn); + } + }); +}; + +describe('Security app links', () => { + it('should only contain static paths', () => { + traverse(links, (link) => { + expect(link.path).not.toContain('/:'); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/links/links.test.ts b/x-pack/plugins/security_solution/public/common/links/links.test.ts index c7ab4bec3a537..0f2c90e7fe1a3 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.test.ts +++ b/x-pack/plugins/security_solution/public/common/links/links.test.ts @@ -82,7 +82,7 @@ const renderUseLinkExists = (id: SecurityPageName) => wrapper: TestProviders, }); -describe('Security app links', () => { +describe('Security links', () => { beforeEach(() => { mockLicense.hasAtLeast = licensePremiumMock; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx index b4112228c923f..7321bc06d75b4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx @@ -10,6 +10,7 @@ import type { CriteriaWithPagination } from '@elastic/eui'; import { EuiSpacer, EuiPanel, EuiText, EuiInMemoryTable, EuiLoadingContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { sortBy } from 'lodash'; import * as myI18n from './translations'; import type { Rule } from '../../../../rule_management/logic/types'; import { useFindRulesInMemory } from '../../../../rule_management_ui/components/rules_table/rules_table/use_find_rules_in_memory'; @@ -91,6 +92,15 @@ const ExceptionsAddToRulesTableComponent: React.FC<ExceptionsAddToRulesComponent [rules] ); + const sortedRulesBySelection = useMemo( + () => + sortBy(rules, [ + (rule) => { + return initiallySelectedRules?.find((initRule) => initRule.id === rule.id); + }, + ]), + [initiallySelectedRules, rules] + ); return ( <EuiPanel color="subdued" borderRadius="none" hasShadow={false}> <> @@ -98,8 +108,8 @@ const ExceptionsAddToRulesTableComponent: React.FC<ExceptionsAddToRulesComponent <EuiSpacer size="s" /> <EuiInMemoryTable<Rule> tableCaption="Rules table" + items={sortedRulesBySelection} itemId="id" - items={rules} loading={!isFetched} columns={getRulesTableColumn()} pagination={{ @@ -113,7 +123,6 @@ const ExceptionsAddToRulesTableComponent: React.FC<ExceptionsAddToRulesComponent } selection={ruleSelectionValue} search={searchOptions} - sorting isSelectable data-test-subj="addExceptionToRulesTable" /> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_conditions/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_conditions/index.tsx index c1f11b17cbbd9..372839eba9e40 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_conditions/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_conditions/index.tsx @@ -24,7 +24,7 @@ import type { ExceptionsBuilderReturnExceptionItem, } from '@kbn/securitysolution-list-utils'; import type { DataViewBase } from '@kbn/es-query'; -import styled, { css } from 'styled-components'; +import styled, { css, createGlobalStyle } from 'styled-components'; import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; import { hasEqlSequenceQuery, isEqlRule } from '../../../../../../common/detection_engine/utils'; import type { Rule } from '../../../../rule_management/logic/types'; @@ -56,6 +56,15 @@ const SectionHeader = styled(EuiTitle)` font-weight: ${({ theme }) => theme.eui.euiFontWeightSemiBold}; `} `; +// EuiCombox doesn't support change of z-index, or providing any class to portal +// This fix ovveride z-index for EuiFlyout, which conflict with EuiComboBox on this flyout +// fix x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx#L429 +// TODO: should be fixed on Component level +const EuiComboboxZIndexGlobalStyle = createGlobalStyle` + [data-test-subj="comboBoxOptionsList osSelectionDropdown-optionsList"] { + z-index: 6000 !important; + } +`; interface ExceptionsFlyoutConditionsComponentProps { /* Exception list item field value for "name" */ @@ -233,6 +242,7 @@ const ExceptionsConditionsComponent: React.FC<ExceptionsFlyoutConditionsComponen data-test-subj="osSelectionDropdown" /> </EuiFormRow> + <EuiComboboxZIndexGlobalStyle /> <EuiSpacer size="l" /> </> )} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_meta_form/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_meta_form/translations.ts index db3519ed98616..8a80694ded7dd 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_meta_form/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/item_meta_form/translations.ts @@ -10,13 +10,13 @@ import { i18n } from '@kbn/i18n'; export const RULE_EXCEPTION_NAME_LABEL = i18n.translate( 'xpack.securitySolution.rule_exceptions.itemMeta.nameLabel', { - defaultMessage: 'Rule exception name', + defaultMessage: 'Exception name', } ); export const RULE_EXCEPTION_NAME_PLACEHOLDER = i18n.translate( 'xpack.securitySolution.rule_exceptions.itemMeta.namePlaceholder', { - defaultMessage: 'Name your rule exception', + defaultMessage: 'Name your exception', } ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx index a0fa1f6683964..ecc4f7954460d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx @@ -160,11 +160,11 @@ describe('Alert table context menu', () => { ecsRowData: { ...ecsRowData, agent: { type: ['endpoint'] }, event: { kind: ['event'] } }, }; - describe('when users can access endpoint management', () => { + describe('when users has write event filters privilege', () => { beforeEach(() => { (useUserPrivileges as jest.Mock).mockReturnValue({ ...mockInitialUserPrivilegesState(), - endpointPrivileges: { loading: false, canAccessEndpointManagement: true }, + endpointPrivileges: { loading: false, canWriteEventFilters: true }, }); }); @@ -246,15 +246,15 @@ describe('Alert table context menu', () => { }); }); - describe('when users can NOT access endpoint management', () => { + describe("when users don't have write event filters privilege", () => { beforeEach(() => { (useUserPrivileges as jest.Mock).mockReturnValue({ ...mockInitialUserPrivilegesState(), - endpointPrivileges: { loading: false, canAccessEndpointManagement: false }, + endpointPrivileges: { loading: false, canWriteEventFilters: false }, }); }); - test('it disables AddEndpointEventFilter when timeline id is host events page but cannot acces endpoint management', () => { + test('it removes AddEndpointEventFilter option when timeline id is host events page but does not has write event filters privilege', () => { const wrapper = mount( <AlertContextMenu {...endpointEventProps} scopeId={TableId.hostsPageEvents} />, { @@ -262,12 +262,11 @@ describe('Alert table context menu', () => { } ); - wrapper.find(actionMenuButton).simulate('click'); - expect(wrapper.find(addEndpointEventFilterButton).first().exists()).toEqual(true); - expect(wrapper.find(addEndpointEventFilterButton).first().props().disabled).toEqual(true); + // Entire actionMenuButton is removed as there is no option available + expect(wrapper.find(actionMenuButton).first().exists()).toEqual(false); }); - test('it disables AddEndpointEventFilter when timeline id is user events page but cannot acces endpoint management', () => { + test('it removes AddEndpointEventFilter option when timeline id is user events page but does not has write event filters privilege', () => { const wrapper = mount( <AlertContextMenu {...endpointEventProps} scopeId={TableId.usersPageEvents} />, { @@ -275,9 +274,8 @@ describe('Alert table context menu', () => { } ); - wrapper.find(actionMenuButton).simulate('click'); - expect(wrapper.find(addEndpointEventFilterButton).first().exists()).toEqual(true); - expect(wrapper.find(addEndpointEventFilterButton).first().props().disabled).toEqual(true); + // Entire actionMenuButton is removed as there is no option available + expect(wrapper.find(actionMenuButton).first().exists()).toEqual(false); }); }); }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx index 31a548e2ced9c..9d8aac03daea3 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx @@ -90,11 +90,11 @@ const AlertContextMenuComponent: React.FC<AlertContextMenuProps & PropsFromRedux isInDetections, }); - const { loading: canAccessEndpointManagementLoading, canAccessEndpointManagement } = + const { loading: endpointPrivilegesLoading, canWriteEventFilters } = useUserPrivileges().endpointPrivileges; const canCreateEndpointEventFilters = useMemo( - () => !canAccessEndpointManagementLoading && canAccessEndpointManagement, - [canAccessEndpointManagement, canAccessEndpointManagementLoading] + () => !endpointPrivilegesLoading && canWriteEventFilters, + [canWriteEventFilters, endpointPrivilegesLoading] ); const alertStatus = get(0, ecsRowData?.kibana?.alert?.workflow_status) as Status | undefined; @@ -194,8 +194,7 @@ const AlertContextMenuComponent: React.FC<AlertContextMenuProps & PropsFromRedux }); const { eventFilterActionItems } = useEventFilterAction({ onAddEventFilterClick: handleOnAddEventFilterClick, - disabled: - !isEndpointEvent || !canCreateEndpointEventFilters || !scopeIdAllowsAddEndpointEventFilter, + disabled: !isEndpointEvent || !scopeIdAllowsAddEndpointEventFilter, tooltipMessage: !scopeIdAllowsAddEndpointEventFilter ? i18n.ACTION_ADD_EVENT_FILTER_DISABLED_TOOLTIP : undefined, @@ -227,7 +226,7 @@ const AlertContextMenuComponent: React.FC<AlertContextMenuProps & PropsFromRedux ] : [ ...addToCaseActionItems, - ...eventFilterActionItems, + ...(canCreateEndpointEventFilters ? eventFilterActionItems : []), ...(agentId ? osqueryActionItems : []), ], [ @@ -240,6 +239,7 @@ const AlertContextMenuComponent: React.FC<AlertContextMenuProps & PropsFromRedux osqueryActionItems, alertDetailsActionItems, eventFilterActionItems, + canCreateEndpointEventFilters, ] ); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx index 8201863171227..e8fec6d0e9186 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx @@ -11,6 +11,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiFormRow, + EuiLoadingSpinner, EuiSpacer, EuiButtonGroup, EuiText, @@ -502,7 +503,9 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({ ); const DataViewSelectorMemo = useMemo(() => { - return ( + return kibanaDataViews == null || Object.keys(kibanaDataViews).length === 0 ? ( + <EuiLoadingSpinner size="l" /> + ) : ( <UseField key="DataViewSelector" path="dataViewId" diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx index fe2c5d8fa4ee0..d233ebb67fb37 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx @@ -292,6 +292,7 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({ isDisabled={isLoading} isLoading={isLoading} onClick={() => handleSubmit(false)} + data-test-subj="create-enabled-false" > {I18n.COMPLETE_WITHOUT_ENABLING} </EuiButton> diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx index 6d93f5645b6e5..a168363e11afd 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx @@ -320,7 +320,11 @@ describe('take action dropdown', () => { setAlertDetailsDataMockToEvent(); }); - test('should enable the "Add Endpoint event filter" button if provided endpoint event', async () => { + test('should enable the "Add Endpoint event filter" button if provided endpoint event and has right privileges', async () => { + (useUserPrivileges as jest.Mock).mockReturnValue({ + ...mockInitialUserPrivilegesState(), + endpointPrivileges: { loading: false, canWriteEventFilters: true }, + }); wrapper = mount( <TestProviders> <TakeActionDropdown {...defaultProps} /> @@ -334,10 +338,10 @@ describe('take action dropdown', () => { }); }); - test('should disable the "Add Endpoint event filter" button if no endpoint management privileges', async () => { + test('should hide the "Add Endpoint event filter" button if no write event filters privileges', async () => { (useUserPrivileges as jest.Mock).mockReturnValue({ ...mockInitialUserPrivilegesState(), - endpointPrivileges: { loading: false, canAccessEndpointManagement: false }, + endpointPrivileges: { loading: false, canWriteEventFilters: false }, }); wrapper = mount( <TestProviders> @@ -346,9 +350,7 @@ describe('take action dropdown', () => { ); wrapper.find('button[data-test-subj="take-action-dropdown-btn"]').simulate('click'); await waitFor(() => { - expect( - wrapper.find('[data-test-subj="add-event-filter-menu-item"]').first().getDOMNode() - ).toBeDisabled(); + expect(wrapper.exists('[data-test-subj="add-event-filter-menu-item"]')).toBeFalsy(); }); }); @@ -473,10 +475,10 @@ describe('take action dropdown', () => { }); }); - it('should not display the button if user is not allowed to manage endpoints', async () => { + it('should not display the button if user is not allowed to write event filters', async () => { (useUserPrivileges as jest.Mock).mockReturnValue({ ...mockInitialUserPrivilegesState(), - endpointPrivileges: { loading: false, canAccessEndpointManagement: false }, + endpointPrivileges: { loading: false, canWriteEventFilters: false }, }); render(); diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx index 059a1c0c4b64f..c5f33d34b1997 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx @@ -75,12 +75,12 @@ export const TakeActionDropdown = React.memo( scopeId, }: TakeActionDropdownProps) => { const tGridEnabled = useIsExperimentalFeatureEnabled('tGridEnabled'); - const { loading: canAccessEndpointManagementLoading, canAccessEndpointManagement } = + const { loading: endpointPrivilegesLoading, canWriteEventFilters } = useUserPrivileges().endpointPrivileges; const canCreateEndpointEventFilters = useMemo( - () => !canAccessEndpointManagementLoading && canAccessEndpointManagement, - [canAccessEndpointManagement, canAccessEndpointManagementLoading] + () => !endpointPrivilegesLoading && canWriteEventFilters, + [canWriteEventFilters, endpointPrivilegesLoading] ); const { osquery } = useKibana().services; @@ -168,7 +168,6 @@ export const TakeActionDropdown = React.memo( const { eventFilterActionItems } = useEventFilterAction({ onAddEventFilterClick: handleOnAddEventFilterClick, - disabled: !isEndpointEvent || !canCreateEndpointEventFilters, }); const onMenuItemClick = useCallback(() => { @@ -210,12 +209,13 @@ export const TakeActionDropdown = React.memo( () => !isEvent && actionsData.ruleId ? [...statusActionItems, ...exceptionActionItems] - : isEndpointEvent + : isEndpointEvent && canCreateEndpointEventFilters ? eventFilterActionItems : [], [ eventFilterActionItems, isEndpointEvent, + canCreateEndpointEventFilters, exceptionActionItems, statusActionItems, isEvent, diff --git a/x-pack/plugins/security_solution/public/exceptions/api/list_api.ts b/x-pack/plugins/security_solution/public/exceptions/api/list_api.ts index ba7a24bb44285..50259cc641d31 100644 --- a/x-pack/plugins/security_solution/public/exceptions/api/list_api.ts +++ b/x-pack/plugins/security_solution/public/exceptions/api/list_api.ts @@ -51,6 +51,10 @@ export const getListRules = async (listId: string) => { const abortCtrl = new AbortController(); const { data: rules } = await fetchRules({ signal: abortCtrl.signal, + pagination: { + page: 1, + perPage: 10000, + }, }); abortCtrl.abort(); return rules.reduce((acc: Rule[], rule, index) => { diff --git a/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx b/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx index 8031de23ef4c4..bb8b855740ae4 100644 --- a/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/components/exceptions_list_card/index.tsx @@ -97,6 +97,9 @@ export const ExceptionsListCard = memo<ExceptionsListCardProps>( handleConfirmExceptionFlyout, handleCancelExceptionItemFlyout, goToExceptionDetail, + emptyViewerTitle, + emptyViewerBody, + emptyViewerButtonText, } = useExceptionsListCard({ exceptionsList, handleExport, @@ -187,6 +190,9 @@ export const ExceptionsListCard = memo<ExceptionsListCardProps>( onPaginationChange={onPaginationChange} onCreateExceptionListItem={onAddExceptionClick} lastUpdated={null} + emptyViewerTitle={emptyViewerTitle} + emptyViewerBody={emptyViewerBody} + emptyViewerButtonText={emptyViewerButtonText} /> </ExceptionPanel> </EuiAccordion> diff --git a/x-pack/plugins/security_solution/public/exceptions/components/list_exception_items/index.tsx b/x-pack/plugins/security_solution/public/exceptions/components/list_exception_items/index.tsx index 68bd02dd9f542..492ba500de894 100644 --- a/x-pack/plugins/security_solution/public/exceptions/components/list_exception_items/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/components/list_exception_items/index.tsx @@ -33,6 +33,7 @@ interface ListExceptionItemsProps { pagination: Pagination; emptyViewerTitle?: string; emptyViewerBody?: string; + emptyViewerButtonText?: string; viewerStatus: ViewerStatus | ''; ruleReferences: RuleReferences; hideUtility?: boolean; @@ -50,6 +51,7 @@ const ListExceptionItemsComponent: FC<ListExceptionItemsProps> = ({ pagination, emptyViewerTitle, emptyViewerBody, + emptyViewerButtonText, viewerStatus, ruleReferences, hideUtility = false, @@ -68,6 +70,7 @@ const ListExceptionItemsComponent: FC<ListExceptionItemsProps> = ({ exceptions={exceptions} emptyViewerTitle={emptyViewerTitle} emptyViewerBody={emptyViewerBody} + emptyViewerButtonText={emptyViewerButtonText} pagination={pagination} lastUpdated={lastUpdated} editActionLabel={i18n.EXCEPTION_ITEM_CARD_EDIT_LABEL} diff --git a/x-pack/plugins/security_solution/public/exceptions/components/list_with_search/index.tsx b/x-pack/plugins/security_solution/public/exceptions/components/list_with_search/index.tsx index 9deda24248fc8..27324a53e5cb8 100644 --- a/x-pack/plugins/security_solution/public/exceptions/components/list_with_search/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/components/list_with_search/index.tsx @@ -42,6 +42,7 @@ const ListWithSearchComponent: FC<ListWithSearchComponentProps> = ({ pagination, emptyViewerTitle, emptyViewerBody, + emptyViewerButtonText, viewerStatus, ruleReferences, showAddExceptionFlyout, @@ -94,7 +95,11 @@ const ListWithSearchComponent: FC<ListWithSearchComponentProps> = ({ /> )} <SearchBar - addExceptionButtonText={i18n.EXCEPTION_LIST_EMPTY_SEARCH_BAR_BUTTON} + addExceptionButtonText={ + listType === ExceptionListTypeEnum.ENDPOINT + ? i18n.EXCEPTION_LIST_EMPTY_SEARCH_BAR_BUTTON_ENDPOINT + : i18n.EXCEPTION_LIST_EMPTY_SEARCH_BAR_BUTTON + } listType={listType as ExceptionListTypeEnum} onSearch={onSearch} onAddExceptionClick={onAddExceptionClick} @@ -110,6 +115,7 @@ const ListWithSearchComponent: FC<ListWithSearchComponentProps> = ({ exceptions={exceptions} emptyViewerTitle={emptyViewerTitle} emptyViewerBody={emptyViewerBody} + emptyViewerButtonText={emptyViewerButtonText} pagination={pagination} lastUpdated={lastUpdated} onPaginationChange={onPaginationChange} diff --git a/x-pack/plugins/security_solution/public/exceptions/components/manage_rules/index.tsx b/x-pack/plugins/security_solution/public/exceptions/components/manage_rules/index.tsx index f4254123999c1..20a4fd280beec 100644 --- a/x-pack/plugins/security_solution/public/exceptions/components/manage_rules/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/components/manage_rules/index.tsx @@ -45,6 +45,7 @@ export const ManageRules: FC<ManageRulesProps> = memo( const complicatedFlyoutTitleId = useGeneratedHtmlId({ prefix: 'complicatedFlyoutTitle', }); + return ( <EuiFlyout hideCloseButton diff --git a/x-pack/plugins/security_solution/public/exceptions/hooks/use_exceptions_list.card/index.tsx b/x-pack/plugins/security_solution/public/exceptions/hooks/use_exceptions_list.card/index.tsx index bdef9b8dd4e22..3d7a0c500edac 100644 --- a/x-pack/plugins/security_solution/public/exceptions/hooks/use_exceptions_list.card/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/hooks/use_exceptions_list.card/index.tsx @@ -10,6 +10,8 @@ import type { ExceptionListItemSchema, NamespaceType, } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; + import { ViewerStatus } from '@kbn/securitysolution-exception-list-components'; import { useGeneratedHtmlId } from '@elastic/eui'; import { useGetSecuritySolutionLinkProps } from '../../../common/components/links'; @@ -85,6 +87,22 @@ export const useExceptionsListCard = ({ const listCannotBeEdited = checkIfListCannotBeEdited(exceptionsList); + const emptyViewerTitle = useMemo(() => { + return viewerStatus === ViewerStatus.EMPTY ? i18n.EXCEPTION_LIST_EMPTY_VIEWER_TITLE : ''; + }, [viewerStatus]); + + const emptyViewerBody = useMemo(() => { + return viewerStatus === ViewerStatus.EMPTY + ? i18n.EXCEPTION_LIST_EMPTY_VIEWER_BODY(exceptionsList.name) + : ''; + }, [exceptionsList.name, viewerStatus]); + + const emptyViewerButtonText = useMemo(() => { + return exceptionsList.type === ExceptionListTypeEnum.ENDPOINT + ? i18n.EXCEPTION_LIST_EMPTY_VIEWER_BUTTON_ENDPOINT + : i18n.EXCEPTION_LIST_EMPTY_VIEWER_BUTTON; + }, [exceptionsList.type]); + const menuActionItems = useMemo( () => [ { @@ -145,8 +163,8 @@ export const useExceptionsListCard = ({ // routes to x-pack/plugins/security_solution/public/exceptions/routes.tsx const { onClick: goToExceptionDetail } = useGetSecuritySolutionLinkProps()({ - deepLinkId: SecurityPageName.sharedExceptionListDetails, - path: `/exceptions/shared/${exceptionsList.list_id}`, + deepLinkId: SecurityPageName.exceptions, + path: `/details/${exceptionsList.list_id}`, }); return { listId, @@ -177,5 +195,8 @@ export const useExceptionsListCard = ({ handleConfirmExceptionFlyout, handleCancelExceptionItemFlyout, goToExceptionDetail, + emptyViewerTitle, + emptyViewerBody, + emptyViewerButtonText, }; }; diff --git a/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_detail_view/index.ts b/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_detail_view/index.ts index c885cabda32f0..0e574c8b19039 100644 --- a/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_detail_view/index.ts +++ b/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_detail_view/index.ts @@ -45,7 +45,7 @@ const exceptionReferenceModalInitialState: ReferenceModalState = { listNamespaceType: 'single', }; -export const useExceptionListDetails = () => { +export const useListDetailsView = () => { const toasts = useToasts(); const { services } = useKibana(); const { http, notifications } = services; @@ -53,8 +53,8 @@ export const useExceptionListDetails = () => { const { exportExceptionList, deleteExceptionList } = useApi(http); - const { exceptionListId } = useParams<{ - exceptionListId: string; + const { detailName: exceptionListId } = useParams<{ + detailName: string; }>(); const [{ loading: userInfoLoading, canUserCRUD, canUserREAD }] = useUserData(); @@ -114,7 +114,10 @@ export const useExceptionListDetails = () => { id: exceptionListId, http, }); - if (!result || !isAnExceptionListItem(result)) return setInvalidListId(true); + if (!result || !isAnExceptionListItem(result)) { + setIsLoading(false); + return setInvalidListId(true); + } setList(result); await initializeListRules(result); @@ -144,6 +147,7 @@ export const useExceptionListDetails = () => { type: list.type, name: listDetails.name, description: listDetails.description || list.description, + namespace_type: list.namespace_type, }, }); } catch (error) { diff --git a/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_with_search/index.ts b/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_with_search/index.ts index 14a51deedb493..5539fadf02d2c 100644 --- a/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_with_search/index.ts +++ b/x-pack/plugins/security_solution/public/exceptions/hooks/use_list_with_search/index.ts @@ -7,6 +7,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import type { ExceptionListItemSchema, ExceptionListSchema, @@ -68,6 +69,12 @@ export const useListWithSearchComponent = ( : ''; }, [list.name, viewerStatus]); + const emptyViewerButtonText = useMemo(() => { + return list.type === ExceptionListTypeEnum.ENDPOINT + ? i18n.EXCEPTION_LIST_EMPTY_VIEWER_BUTTON_ENDPOINT + : i18n.EXCEPTION_LIST_EMPTY_VIEWER_BUTTON; + }, [list.type]); + // #region Callbacks const onSearch = useCallback( @@ -108,6 +115,7 @@ export const useListWithSearchComponent = ( viewerStatus, emptyViewerTitle, emptyViewerBody, + emptyViewerButtonText, ruleReferences: exceptionListReferences, showAddExceptionFlyout, showEditExceptionFlyout, diff --git a/x-pack/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx b/x-pack/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx index 32544e23f5cb3..cd140a1160a44 100644 --- a/x-pack/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/pages/list_detail_view/index.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import React, { useMemo } from 'react'; import type { FC } from 'react'; import { @@ -13,13 +13,15 @@ import { ViewerStatus, } from '@kbn/securitysolution-exception-list-components'; import { EuiLoadingContent } from '@elastic/eui'; +import { SecurityPageName } from '../../../../common/constants'; +import { SpyRoute } from '../../../common/utils/route/spy_routes'; import { ReferenceErrorModal } from '../../../detections/components/value_lists_management_flyout/reference_error_modal'; import type { Rule } from '../../../detection_engine/rule_management/logic/types'; import { MissingPrivilegesCallOut } from '../../../detections/components/callouts/missing_privileges_callout'; import { NotFoundPage } from '../../../app/404'; import { AutoDownload } from '../../../common/components/auto_download/auto_download'; import { ListWithSearch, ManageRules, ListDetailsLinkAnchor } from '../../components'; -import { useExceptionListDetails } from '../../hooks'; +import { useListDetailsView } from '../../hooks'; import * as i18n from '../../translations'; export const ListsDetailViewComponent: FC = () => { @@ -51,55 +53,92 @@ export const ListsDetailViewComponent: FC = () => { handleDelete, handleCloseReferenceErrorModal, handleReferenceDelete, - } = useExceptionListDetails(); + } = useListDetailsView(); - if (viewerStatus === ViewerStatus.ERROR) - return <EmptyViewerState isReadOnly={isReadOnly} viewerStatus={viewerStatus} />; + const detailsViewContent = useMemo(() => { + if (viewerStatus === ViewerStatus.ERROR) + return <EmptyViewerState isReadOnly={isReadOnly} viewerStatus={viewerStatus} />; - if (isLoading) return <EuiLoadingContent lines={4} data-test-subj="loading" />; + if (isLoading) return <EuiLoadingContent lines={4} data-test-subj="loading" />; - if (invalidListId || !listName || !listDescription || !list) return <NotFoundPage />; - return ( - <> - <MissingPrivilegesCallOut /> - <ExceptionListHeader - name={listName} - description={listDescription} - listId={listId} - linkedRules={linkedRules} - isReadonly={isReadOnly} - canUserEditList={canUserEditList} - backOptions={headerBackOptions} - securityLinkAnchorComponent={ListDetailsLinkAnchor} - onEditListDetails={onEditListDetails} - onExportList={onExportList} - onDeleteList={handleDelete} - onManageRules={onManageRules} - /> + if (invalidListId || !listName || !list) return <NotFoundPage />; + return ( + <> + <MissingPrivilegesCallOut /> + <ExceptionListHeader + name={listName} + description={listDescription} + listId={listId} + linkedRules={linkedRules} + isReadonly={isReadOnly} + canUserEditList={canUserEditList} + backOptions={headerBackOptions} + securityLinkAnchorComponent={ListDetailsLinkAnchor} + onEditListDetails={onEditListDetails} + onExportList={onExportList} + onDeleteList={handleDelete} + onManageRules={onManageRules} + /> - <AutoDownload blob={exportedList} name={listId} /> - <ListWithSearch list={list} refreshExceptions={refreshExceptions} isReadOnly={isReadOnly} /> - <ReferenceErrorModal - cancelText={i18n.REFERENCE_MODAL_CANCEL_BUTTON} - confirmText={i18n.REFERENCE_MODAL_CONFIRM_BUTTON} - contentText={referenceModalState.contentText} - onCancel={handleCloseReferenceErrorModal} - onClose={handleCloseReferenceErrorModal} - onConfirm={handleReferenceDelete} - references={referenceModalState.rulesReferences} - showModal={showReferenceErrorModal} - titleText={i18n.REFERENCE_MODAL_TITLE} - /> - {showManageRulesFlyout ? ( - <ManageRules - linkedRules={linkedRules as Rule[]} - showButtonLoader={showManageButtonLoader} - saveIsDisabled={disableManageButton} - onSave={onSaveManageRules} - onCancel={onCancelManageRules} - onRuleSelectionChange={onRuleSelectionChange} + <AutoDownload blob={exportedList} name={listId} /> + <ListWithSearch list={list} refreshExceptions={refreshExceptions} isReadOnly={isReadOnly} /> + <ReferenceErrorModal + cancelText={i18n.REFERENCE_MODAL_CANCEL_BUTTON} + confirmText={i18n.REFERENCE_MODAL_CONFIRM_BUTTON} + contentText={referenceModalState.contentText} + onCancel={handleCloseReferenceErrorModal} + onClose={handleCloseReferenceErrorModal} + onConfirm={handleReferenceDelete} + references={referenceModalState.rulesReferences} + showModal={showReferenceErrorModal} + titleText={i18n.REFERENCE_MODAL_TITLE} /> - ) : null} + {showManageRulesFlyout ? ( + <ManageRules + linkedRules={linkedRules as Rule[]} + showButtonLoader={showManageButtonLoader} + saveIsDisabled={disableManageButton} + onSave={onSaveManageRules} + onCancel={onCancelManageRules} + onRuleSelectionChange={onRuleSelectionChange} + /> + ) : null} + </> + ); + }, [ + canUserEditList, + disableManageButton, + exportedList, + headerBackOptions, + invalidListId, + isLoading, + isReadOnly, + linkedRules, + list, + listDescription, + listId, + listName, + referenceModalState.contentText, + referenceModalState.rulesReferences, + refreshExceptions, + showManageButtonLoader, + showManageRulesFlyout, + showReferenceErrorModal, + viewerStatus, + onCancelManageRules, + onEditListDetails, + onExportList, + onManageRules, + onRuleSelectionChange, + onSaveManageRules, + handleCloseReferenceErrorModal, + handleDelete, + handleReferenceDelete, + ]); + return ( + <> + <SpyRoute pageName={SecurityPageName.exceptions} state={{ listName }} /> + {detailsViewContent} </> ); }; diff --git a/x-pack/plugins/security_solution/public/exceptions/routes.tsx b/x-pack/plugins/security_solution/public/exceptions/routes.tsx index 13cc29411f97c..dd94e51f6c33b 100644 --- a/x-pack/plugins/security_solution/public/exceptions/routes.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/routes.tsx @@ -10,7 +10,11 @@ import { Route } from '@kbn/kibana-react-plugin/public'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import * as i18n from './translations'; -import { EXCEPTIONS_PATH, SecurityPageName } from '../../common/constants'; +import { + EXCEPTIONS_PATH, + SecurityPageName, + EXCEPTION_LIST_DETAIL_PATH, +} from '../../common/constants'; import { SharedLists, ListsDetailView } from './pages'; import { SpyRoute } from '../common/utils/route/spy_routes'; @@ -29,9 +33,8 @@ const ExceptionsRoutes = () => ( const ExceptionsListDetailRoute = () => ( <PluginTemplateWrapper> - <TrackApplicationView viewId={SecurityPageName.sharedExceptionListDetails}> + <TrackApplicationView viewId={SecurityPageName.exceptions}> <ListsDetailView /> - <SpyRoute pageName={SecurityPageName.sharedExceptionListDetails} /> </TrackApplicationView> </PluginTemplateWrapper> ); @@ -42,7 +45,7 @@ const ExceptionsContainerComponent: React.FC = () => { return ( <Switch> <Route path={EXCEPTIONS_PATH} exact component={ExceptionsRoutes} /> - <Route path={'/exceptions/shared/:exceptionListId'} component={ExceptionsListDetailRoute} /> + <Route path={EXCEPTION_LIST_DETAIL_PATH} component={ExceptionsListDetailRoute} /> <Route component={NotFoundPage} /> </Switch> ); diff --git a/x-pack/plugins/security_solution/public/exceptions/translations/list_details_view.ts b/x-pack/plugins/security_solution/public/exceptions/translations/list_details_view.ts index 45600807749ff..d606bc7b47b21 100644 --- a/x-pack/plugins/security_solution/public/exceptions/translations/list_details_view.ts +++ b/x-pack/plugins/security_solution/public/exceptions/translations/list_details_view.ts @@ -21,6 +21,13 @@ export const EXCEPTION_LIST_EMPTY_VIEWER_BODY = (listName: string) => 'There is no exception in your [{listName}]. Create rule exceptions to this list.', }); +export const EXCEPTION_LIST_EMPTY_VIEWER_BUTTON_ENDPOINT = i18n.translate( + 'xpack.securitySolution.exception.list.empty.viewer_button_endpoint', + { + defaultMessage: 'Create endpoint exception', + } +); + export const EXCEPTION_LIST_EMPTY_VIEWER_BUTTON = i18n.translate( 'xpack.securitySolution.exception.list.empty.viewer_button', { @@ -28,6 +35,13 @@ export const EXCEPTION_LIST_EMPTY_VIEWER_BUTTON = i18n.translate( } ); +export const EXCEPTION_LIST_EMPTY_SEARCH_BAR_BUTTON_ENDPOINT = i18n.translate( + 'xpack.securitySolution.exception.list.search_bar_button_enpoint', + { + defaultMessage: 'Add endpoint exception to list', + } +); + export const EXCEPTION_LIST_EMPTY_SEARCH_BAR_BUTTON = i18n.translate( 'xpack.securitySolution.exception.list.search_bar_button', { diff --git a/x-pack/plugins/security_solution/public/exceptions/translations/shared_list.ts b/x-pack/plugins/security_solution/public/exceptions/translations/shared_list.ts index 8e070f24f3353..ecb95b373d279 100644 --- a/x-pack/plugins/security_solution/public/exceptions/translations/shared_list.ts +++ b/x-pack/plugins/security_solution/public/exceptions/translations/shared_list.ts @@ -163,7 +163,7 @@ export const referenceErrorMessage = (referenceCount: number) => export const EXCEPTION_LIST_SEARCH_PLACEHOLDER = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.all.exceptions.searchPlaceholder', { - defaultMessage: 'Search by name or list id', + defaultMessage: 'Search by name or list_id:id', } ); @@ -183,7 +183,7 @@ export const UPLOAD_BUTTON = i18n.translate( export const uploadSuccessMessage = (fileName: string) => i18n.translate('xpack.securitySolution.lists.exceptionListImportSuccess', { - defaultMessage: "Exception list '{fileName}' was imported", + defaultMessage: 'Exception list {fileName} was imported', values: { fileName }, }); @@ -337,14 +337,14 @@ export const CREATE_BUTTON = i18n.translate( export const getSuccessText = (listName: string) => i18n.translate('xpack.securitySolution.exceptions.createSharedExceptionListSuccessDescription', { - defaultMessage: 'list with name ${listName} was created!', + defaultMessage: 'List with name {listName} was created!', values: { listName }, }); export const SUCCESS_TITLE = i18n.translate( 'xpack.securitySolution.exceptions.createSharedExceptionListSuccessTitle', { - defaultMessage: 'created list', + defaultMessage: 'Created list', } ); diff --git a/x-pack/plugins/security_solution/public/exceptions/utils/pages.utils.ts b/x-pack/plugins/security_solution/public/exceptions/utils/pages.utils.ts new file mode 100644 index 0000000000000..9c1a3289aca6f --- /dev/null +++ b/x-pack/plugins/security_solution/public/exceptions/utils/pages.utils.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { ChromeBreadcrumb } from '@kbn/core/public'; +import { EXCEPTIONS_PATH } from '../../../common/constants'; +import type { GetSecuritySolutionUrl } from '../../common/components/link_to'; +import type { RouteSpyState } from '../../common/utils/route/types'; + +const isListDetailPage = (pathname: string) => + pathname.includes(EXCEPTIONS_PATH) && pathname.includes('/details'); + +export const getTrailingBreadcrumbs = ( + params: RouteSpyState, + getSecuritySolutionUrl: GetSecuritySolutionUrl +): ChromeBreadcrumb[] => { + let breadcrumb: ChromeBreadcrumb[] = []; + + if (isListDetailPage(params.pathName) && params.state?.listName) { + breadcrumb = [ + ...breadcrumb, + { + text: params.state.listName, + }, + ]; + } + return breadcrumb; +}; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx index dc7b9aef5c81f..ffba2f85bbf7c 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx @@ -27,6 +27,7 @@ import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../../../../common/endpoint/ import { useUserPrivileges as _useUserPrivileges } from '../../../common/components/user_privileges'; import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; import { waitFor } from '@testing-library/react'; +import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; let mockUseGetEndpointActionList: { isFetched?: boolean; @@ -138,8 +139,7 @@ jest.mock('../../hooks/response_actions/use_get_file_info', () => { const mockUseGetEndpointsList = useGetEndpointsList as jest.Mock; -// FLAKY https://github.com/elastic/kibana/issues/145635 -describe.skip('Response actions history', () => { +describe('Response actions history', () => { const useUserPrivilegesMock = _useUserPrivileges as jest.Mock< ReturnType<typeof _useUserPrivileges> >; @@ -195,6 +195,7 @@ describe.skip('Response actions history', () => { ...baseMockedActionList, }; jest.clearAllMocks(); + useUserPrivilegesMock.mockImplementation(getUserPrivilegesMockDefaultValue); }); describe('When index does not exist yet', () => { diff --git a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx index 58debbe6b4fd5..d03c6d9007236 100644 --- a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx +++ b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import type { MouseEvent, CSSProperties } from 'react'; +import type { MouseEvent, CSSProperties, ReactNode } from 'react'; import React, { useMemo } from 'react'; import type { EuiSelectableProps } from '@elastic/eui'; import { @@ -43,90 +43,107 @@ interface ManagementStep { const PolicyEmptyState = React.memo<{ loading: boolean; - onActionClick: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void; + onActionClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void; actionDisabled?: boolean; + actionHidden?: boolean; + additionalInfo?: ReactNode; policyEntryPoint?: boolean; -}>(({ loading, onActionClick, actionDisabled, policyEntryPoint = false }) => { - const docLinks = useKibana().services.docLinks; - return ( - <div data-test-subj="emptyPolicyTable"> - {loading ? ( - <EuiFlexGroup alignItems="center" justifyContent="center"> - <EuiFlexItem grow={false}> - <EuiLoadingSpinner size="xl" className="essentialAnimation" /> - </EuiFlexItem> - </EuiFlexGroup> - ) : ( - <EuiFlexGroup data-test-subj="policyOnboardingInstructions" alignItems="center"> - <EuiFlexItem grow={1}> - <EuiText> - <h1> - <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingTitle" - defaultMessage="Get started with Elastic Defend" - /> - </h1> - </EuiText> - <EuiSpacer size="m" /> - <EuiText size="s" color="subdued"> - <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingSectionOne" - defaultMessage="Protect your hosts with threat prevention, detection, and deep security data visibility." - /> - </EuiText> - <EuiSpacer size="m" /> - <EuiText size="s" color="subdued"> - {policyEntryPoint ? ( - <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingSectionTwo.fromPolicyPage" - defaultMessage="From this page, you’ll be able to view and manage the Elastic Defend Integration policies in your environment running Elastic Defend." - /> - ) : ( +}>( + ({ + loading, + onActionClick, + actionDisabled, + actionHidden, + additionalInfo, + policyEntryPoint = false, + }) => { + const docLinks = useKibana().services.docLinks; + return ( + <div data-test-subj="emptyPolicyTable"> + {loading ? ( + <EuiFlexGroup alignItems="center" justifyContent="center"> + <EuiFlexItem grow={false}> + <EuiLoadingSpinner size="xl" className="essentialAnimation" /> + </EuiFlexItem> + </EuiFlexGroup> + ) : ( + <EuiFlexGroup data-test-subj="policyOnboardingInstructions" alignItems="center"> + <EuiFlexItem grow={1}> + <EuiText> + <h1> + <FormattedMessage + id="xpack.securitySolution.endpoint.policyList.onboardingTitle" + defaultMessage="Get started with Elastic Defend" + /> + </h1> + </EuiText> + <EuiSpacer size="m" /> + <EuiText size="s" color="subdued"> <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingSectionTwo.fromEndpointPage" - defaultMessage="From this page, you’ll be able to view and manage the hosts in your environment running Elastic Defend." + id="xpack.securitySolution.endpoint.policyList.onboardingSectionOne" + defaultMessage="Protect your hosts with threat prevention, detection, and deep security data visibility." /> - )} - </EuiText> - <EuiSpacer size="m" /> - <EuiText size="s" color="subdued"> - <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingSectionThree" - defaultMessage="To get started, add the Elastic Defend integration to your Agents. For more information, " - /> - <EuiLink external href={`${docLinks.links.siem.guide}`}> + </EuiText> + <EuiSpacer size="m" /> + <EuiText size="s" color="subdued"> + {policyEntryPoint ? ( + <FormattedMessage + id="xpack.securitySolution.endpoint.policyList.onboardingSectionTwo.fromPolicyPage" + defaultMessage="From this page, you’ll be able to view and manage the Elastic Defend Integration policies in your environment running Elastic Defend." + /> + ) : ( + <FormattedMessage + id="xpack.securitySolution.endpoint.policyList.onboardingSectionTwo.fromEndpointPage" + defaultMessage="From this page, you’ll be able to view and manage the hosts in your environment running Elastic Defend." + /> + )} + </EuiText> + <EuiSpacer size="m" /> + <EuiText size="s" color="subdued"> <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.onboardingDocsLink" - defaultMessage="view the Elastic Security documentation" + id="xpack.securitySolution.endpoint.policyList.onboardingSectionThree" + defaultMessage="To get started, add the Elastic Defend integration to your Agents. For more information, " /> - </EuiLink> - </EuiText> - <EuiSpacer size="l" /> - <EuiFlexGroup> - <EuiFlexItem grow={false}> - <EuiButton - fill - iconType="plusInCircle" - onClick={onActionClick} - isDisabled={actionDisabled} - data-test-subj="onboardingStartButton" - > + <EuiLink external href={`${docLinks.links.siem.guide}`}> <FormattedMessage - id="xpack.securitySolution.endpoint.policyList.actionButtonText" - defaultMessage="Add Elastic Defend" + id="xpack.securitySolution.endpoint.policyList.onboardingDocsLink" + defaultMessage="view the Elastic Security documentation" /> - </EuiButton> - </EuiFlexItem> - </EuiFlexGroup> - </EuiFlexItem> - <EuiFlexItem grow={2}> - <EuiIcon type={onboardingLogo} size="original" style={MAX_SIZE_ONBOARDING_LOGO} /> - </EuiFlexItem> - </EuiFlexGroup> - )} - </div> - ); -}); + </EuiLink> + </EuiText> + <EuiSpacer size="m" /> + {additionalInfo} + {!actionHidden && ( + <> + <EuiSpacer size="s" /> + <EuiFlexGroup> + <EuiFlexItem grow={false}> + <EuiButton + fill + iconType="plusInCircle" + onClick={onActionClick} + isDisabled={actionDisabled} + data-test-subj="onboardingStartButton" + > + <FormattedMessage + id="xpack.securitySolution.endpoint.policyList.actionButtonText" + defaultMessage="Add Elastic Defend" + /> + </EuiButton> + </EuiFlexItem> + </EuiFlexGroup> + </> + )} + </EuiFlexItem> + <EuiFlexItem grow={2}> + <EuiIcon type={onboardingLogo} size="original" style={MAX_SIZE_ONBOARDING_LOGO} /> + </EuiFlexItem> + </EuiFlexGroup> + )} + </div> + ); + } +); const EndpointsEmptyState = React.memo<{ loading: boolean; diff --git a/x-pack/plugins/security_solution/public/management/links.test.ts b/x-pack/plugins/security_solution/public/management/links.test.ts index 73834013a493d..f17fa4bc46c23 100644 --- a/x-pack/plugins/security_solution/public/management/links.test.ts +++ b/x-pack/plugins/security_solution/public/management/links.test.ts @@ -32,6 +32,11 @@ describe('links', () => { let getPlugins: (roles: string[]) => StartPlugins; let fakeHttpServices: jest.Mocked<HttpSetup>; + const getLinksWithout = (...excludedLinks: SecurityPageName[]) => ({ + ...links, + links: links.links?.filter((link) => !excludedLinks.includes(link.id)), + }); + beforeAll(() => { ExperimentalFeaturesService.init({ experimentalFeatures: { ...allowedExperimentalValues }, @@ -96,16 +101,14 @@ describe('links', () => { canUnIsolateHost: false, canAccessEndpointManagement: true, canReadActionsLogManagement: true, + canReadEndpointList: true, }); const filteredLinks = await getManagementFilteredLinks( coreMockStarted, getPlugins(['superuser']) ); - expect(filteredLinks).toEqual({ - ...links, - links: links.links?.filter((link) => link.id !== SecurityPageName.hostIsolationExceptions), - }); + expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.hostIsolationExceptions)); }); it('should return all but HIE when NO isolation permission due to license and NO host isolation exceptions entry', async () => { @@ -114,6 +117,7 @@ describe('links', () => { canUnIsolateHost: true, canAccessEndpointManagement: true, canReadActionsLogManagement: true, + canReadEndpointList: true, }); fakeHttpServices.get.mockResolvedValue({ total: 0 }); @@ -121,10 +125,7 @@ describe('links', () => { coreMockStarted, getPlugins(['superuser']) ); - expect(filteredLinks).toEqual({ - ...links, - links: links.links?.filter((link) => link.id !== SecurityPageName.hostIsolationExceptions), - }); + expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.hostIsolationExceptions)); }); it('should return all but HIE when HAS isolation permission AND has HIE entry but not superuser', async () => { @@ -133,6 +134,7 @@ describe('links', () => { canUnIsolateHost: true, canAccessEndpointManagement: false, canReadActionsLogManagement: true, + canReadEndpointList: true, }); fakeHttpServices.get.mockResolvedValue({ total: 1 }); @@ -140,10 +142,7 @@ describe('links', () => { coreMockStarted, getPlugins(['superuser']) ); - expect(filteredLinks).toEqual({ - ...links, - links: links.links?.filter((link) => link.id !== SecurityPageName.hostIsolationExceptions), - }); + expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.hostIsolationExceptions)); }); it('should return all when NO isolation permission due to license but HAS at least one host isolation exceptions entry', async () => { @@ -166,6 +165,7 @@ describe('links', () => { canIsolateHost: false, canUnIsolateHost: true, canReadActionsLogManagement: true, + canReadEndpointList: true, }); fakeHttpServices.get.mockRejectedValue(new Error()); @@ -173,10 +173,7 @@ describe('links', () => { coreMockStarted, getPlugins(['superuser']) ); - expect(filteredLinks).toEqual({ - ...links, - links: links.links?.filter((link) => link.id !== SecurityPageName.hostIsolationExceptions), - }); + expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.hostIsolationExceptions)); }); it('should not affect hiding Action Log if getting from HIE API throws error', async () => { @@ -184,20 +181,83 @@ describe('links', () => { canIsolateHost: false, canUnIsolateHost: true, canReadActionsLogManagement: false, + canReadEndpointList: true, }); fakeHttpServices.get.mockRejectedValue(new Error()); + const filteredLinks = await getManagementFilteredLinks( + coreMockStarted, + getPlugins(['superuser']) + ); + expect(filteredLinks).toEqual( + getLinksWithout( + SecurityPageName.hostIsolationExceptions, + SecurityPageName.responseActionsHistory + ) + ); + }); + }); + + // this can be removed after removing endpointRbacEnabled feature flag + describe('without endpointRbacEnabled', () => { + beforeAll(() => { + ExperimentalFeaturesService.init({ + experimentalFeatures: { ...allowedExperimentalValues, endpointRbacEnabled: false }, + }); + }); + + it('shows Trusted Applications for non-superuser, too', async () => { + (calculateEndpointAuthz as jest.Mock).mockReturnValue(getEndpointAuthzInitialStateMock()); + + const filteredLinks = await getManagementFilteredLinks(coreMockStarted, getPlugins([])); + + expect(filteredLinks).toEqual(links); + }); + }); + + // this can be the default after removing endpointRbacEnabled feature flag + describe('with endpointRbacEnabled', () => { + beforeAll(() => { + ExperimentalFeaturesService.init({ + experimentalFeatures: { ...allowedExperimentalValues, endpointRbacEnabled: true }, + }); + }); + + it('hides Trusted Applications for user without privilege', async () => { + (calculateEndpointAuthz as jest.Mock).mockReturnValue( + getEndpointAuthzInitialStateMock({ + canReadTrustedApplications: false, + canReadHostIsolationExceptions: true, + }) + ); + + const filteredLinks = await getManagementFilteredLinks(coreMockStarted, getPlugins([])); + + expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.trustedApps)); + }); + + it('shows Trusted Applications for user with privilege', async () => { + (calculateEndpointAuthz as jest.Mock).mockReturnValue(getEndpointAuthzInitialStateMock()); + + const filteredLinks = await getManagementFilteredLinks(coreMockStarted, getPlugins([])); + + expect(filteredLinks).toEqual(links); + }); + }); + describe('Endpoint List', () => { + it('should return all but endpoints link when no Endpoint List READ access', async () => { + (calculateEndpointAuthz as jest.Mock).mockReturnValue( + getEndpointAuthzInitialStateMock({ + canReadEndpointList: false, + }) + ); const filteredLinks = await getManagementFilteredLinks( coreMockStarted, getPlugins(['superuser']) ); expect(filteredLinks).toEqual({ ...links, - links: links.links?.filter( - (link) => - link.id !== SecurityPageName.hostIsolationExceptions && - link.id !== SecurityPageName.responseActionsHistory - ), + links: links.links?.filter((link) => link.id !== SecurityPageName.endpoints), }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index b168d88215a3a..fa564cc67a338 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -273,7 +273,12 @@ export const getManagementFilteredLinks = async ( ); } - const { canReadActionsLogManagement, canReadHostIsolationExceptions } = fleetAuthz + const { + canReadActionsLogManagement, + canReadHostIsolationExceptions, + canReadEndpointList, + canReadTrustedApplications, + } = fleetAuthz ? calculateEndpointAuthz( licenseService, fleetAuthz, @@ -284,6 +289,10 @@ export const getManagementFilteredLinks = async ( ) : getEndpointAuthzInitialState(); + if (!canReadEndpointList) { + linksToExclude.push(SecurityPageName.endpoints); + } + if (!canReadActionsLogManagement) { linksToExclude.push(SecurityPageName.responseActionsHistory); } @@ -292,5 +301,9 @@ export const getManagementFilteredLinks = async ( linksToExclude.push(SecurityPageName.hostIsolationExceptions); } + if (endpointRbacEnabled && !canReadTrustedApplications) { + linksToExclude.push(SecurityPageName.trustedApps); + } + return excludeLinks(linksToExclude); }; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx index 1d7c18016fc06..d5babbd8c6cc2 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx @@ -43,7 +43,7 @@ export const EndpointDetails = memo(() => { const policyInfo = useEndpointSelector(policyVersionInfo); const hostStatus = useEndpointSelector(hostStatusInfo); const show = useEndpointSelector(showView); - const { canReadActionsLogManagement } = useUserPrivileges().endpointPrivileges; + const { canAccessEndpointActionsLogManagement } = useUserPrivileges().endpointPrivileges; const ContentLoadingMarkup = useMemo( () => ( @@ -82,7 +82,7 @@ export const EndpointDetails = memo(() => { // show the response actions history tab // only when the user has the required permission - if (canReadActionsLogManagement) { + if (canAccessEndpointActionsLogManagement) { tabs.push({ id: EndpointDetailsTabsTypes.activityLog, name: i18.ACTIVITY_LOG.tabTitle, @@ -97,7 +97,7 @@ export const EndpointDetails = memo(() => { return tabs; }, [ - canReadActionsLogManagement, + canAccessEndpointActionsLogManagement, ContentLoadingMarkup, hostDetails, policyInfo, @@ -142,7 +142,7 @@ export const EndpointDetails = memo(() => { hostname={hostDetails.host.hostname} // show overview tab if forcing response actions history // tab via URL without permission - show={!canReadActionsLogManagement ? 'details' : show} + show={!canAccessEndpointActionsLogManagement ? 'details' : show} tabs={getTabs(hostDetails.agent.id)} /> )} diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index 4f0f7437ddc42..fab0facfb6551 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -44,7 +44,7 @@ export const useEndpointActionItems = ( canAccessResponseConsole, canIsolateHost, canUnIsolateHost, - canReadActionsLogManagement, + canAccessEndpointActionsLogManagement, } = useUserPrivileges().endpointPrivileges; return useMemo<ContextMenuItemNavByRouterProps[]>(() => { @@ -141,7 +141,7 @@ export const useEndpointActionItems = ( }, ] : []), - ...(options?.isEndpointList && canReadActionsLogManagement + ...(options?.isEndpointList && canAccessEndpointActionsLogManagement ? [ { 'data-test-subj': 'actionsLink', @@ -253,7 +253,7 @@ export const useEndpointActionItems = ( }, [ allCurrentUrlParams, canAccessResponseConsole, - canReadActionsLogManagement, + canAccessEndpointActionsLogManagement, endpointMetadata, fleetAgentPolicies, getAppUrl, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 0c3d0242672e0..49c13edbaadee 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -52,9 +52,13 @@ import { METADATA_UNITED_TRANSFORM, } from '../../../../../common/endpoint/constants'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; -import { initialUserPrivilegesState as mockInitialUserPrivilegesState } from '../../../../common/components/user_privileges/user_privileges_context'; +import { + initialUserPrivilegesState, + initialUserPrivilegesState as mockInitialUserPrivilegesState, +} from '../../../../common/components/user_privileges/user_privileges_context'; import { getUserPrivilegesMockDefaultValue } from '../../../../common/components/user_privileges/__mocks__'; import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; +import { getEndpointPrivilegesInitialStateMock } from '../../../../common/components/user_privileges/endpoint/mocks'; const mockUserPrivileges = useUserPrivileges as jest.Mock; // not sure why this can't be imported from '../../../../common/mock/formatted_relative'; @@ -820,6 +824,8 @@ describe('when on the endpoint list page', () => { endpointPrivileges: { ...mockInitialUserPrivilegesState().endpointPrivileges, canReadActionsLogManagement: false, + canReadEndpointList: true, + canAccessFleet: true, }, }); const renderResult = await renderAndWaitForData(); @@ -839,6 +845,8 @@ describe('when on the endpoint list page', () => { endpointPrivileges: { ...mockInitialUserPrivilegesState().endpointPrivileges, canReadActionsLogManagement: false, + canReadEndpointList: true, + canAccessFleet: true, }, }); reactTestingLibrary.act(() => { @@ -1231,6 +1239,14 @@ describe('when on the endpoint list page', () => { }); describe('required transform failed banner', () => { + beforeEach(() => { + mockUserPrivileges.mockReturnValue(getUserPrivilegesMockDefaultValue()); + }); + + afterEach(() => { + jest.clearAllMocks(); + mockUserPrivileges.mockReset(); + }); it('is not displayed when transform state is not failed', () => { const transforms: TransformStats[] = [ { @@ -1315,4 +1331,64 @@ describe('when on the endpoint list page', () => { expect(banner).toHaveTextContent(transforms[1].id); }); }); + describe('endpoint list onboarding screens with RBAC', () => { + beforeEach(() => { + setEndpointListApiMockImplementation(coreStart.http, { + endpointsResults: [], + endpointPackagePolicies: mockPolicyResultList({ total: 3 }).items, + }); + }); + afterEach(() => { + mockUserPrivileges.mockReset(); + }); + it('user has endpoint list ALL and fleet All and can view entire onboarding screen', async () => { + mockUserPrivileges.mockReturnValue({ + ...initialUserPrivilegesState(), + endpointPrivileges: getEndpointPrivilegesInitialStateMock({ + canWriteEndpointList: true, + canAccessFleet: true, + }), + }); + const renderResult = render(); + await reactTestingLibrary.act(async () => { + await middlewareSpy.waitForAction('serverReturnedPoliciesForOnboarding'); + }); + const onboardingSteps = await renderResult.findByTestId('onboardingSteps'); + expect(onboardingSteps).not.toBeNull(); + }); + it('user has endpoint list READ and fleet All and can view entire onboarding screen', async () => { + mockUserPrivileges.mockReturnValue({ + ...initialUserPrivilegesState(), + endpointPrivileges: getEndpointPrivilegesInitialStateMock({ + canReadEndpointList: true, + canAccessFleet: true, + }), + }); + const renderResult = render(); + await reactTestingLibrary.act(async () => { + await middlewareSpy.waitForAction('serverReturnedPoliciesForOnboarding'); + }); + const onboardingSteps = await renderResult.findByTestId('onboardingSteps'); + expect(onboardingSteps).not.toBeNull(); + }); + it('user has endpoint list ALL/READ and fleet NONE and can view a modified onboarding screen with no actions link to fleet', async () => { + mockUserPrivileges.mockReturnValue({ + ...initialUserPrivilegesState(), + endpointPrivileges: getEndpointPrivilegesInitialStateMock({ + canReadEndpointList: true, + canAccessFleet: false, + }), + }); + const renderResult = render(); + await reactTestingLibrary.act(async () => { + await middlewareSpy.waitForAction('serverReturnedPoliciesForOnboarding'); + }); + const onboardingSteps = await renderResult.findByTestId('policyOnboardingInstructions'); + expect(onboardingSteps).not.toBeNull(); + const noPrivilegesPage = await renderResult.findByTestId('noFleetAccess'); + expect(noPrivilegesPage).not.toBeNull(); + const startButton = renderResult.queryByTestId('onboardingStartButton'); + expect(startButton).toBeNull(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 8d23f5ad2f9c1..0986d8acaf013 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -31,7 +31,6 @@ import type { AgentPolicyDetailsDeployAgentAction, } from '@kbn/fleet-plugin/public'; import { pagePathGetters } from '@kbn/fleet-plugin/public'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; import { EndpointDetailsFlyout } from './details'; import * as selectors from '../store/selectors'; import { useEndpointSelector } from './hooks'; @@ -70,7 +69,8 @@ import { WARNING_TRANSFORM_STATES, APP_UI_ID } from '../../../../../common/const import type { BackToExternalAppButtonProps } from '../../../components/back_to_external_app_button/back_to_external_app_button'; import { BackToExternalAppButton } from '../../../components/back_to_external_app_button/back_to_external_app_button'; import { ManagementEmptyStateWrapper } from '../../../components/management_empty_state_wrapper'; - +import { useUserPrivileges } from '../../../../common/components/user_privileges'; +import { useKibana } from '../../../../common/lib/kibana'; const MAX_PAGINATED_ITEM = 9999; const TRANSFORM_URL = '/data/transform'; @@ -132,6 +132,11 @@ export const EndpointList = () => { endpointsTotalError, metadataTransformStats, } = useEndpointSelector(selector); + const { + canReadEndpointList, + canAccessFleet, + loading: endpointPrivilegesLoading, + } = useUserPrivileges().endpointPrivileges; const { search } = useFormatUrl(SecurityPageName.administration); const { search: searchParams } = useLocation(); const { getAppUrl } = useAppUrl(); @@ -173,6 +178,23 @@ export const EndpointList = () => { <BackToExternalAppButton {...backLinkOptions} data-test-subj="endpointListBackLink" /> ); + const missingFleetAccessInfo = useMemo(() => { + return ( + <EuiText size="s" color="subdued" data-test-subj="noFleetAccess"> + <FormattedMessage + id="xpack.securitySolution.endpoint.onboarding.enableFleetAccess" + defaultMessage="Deploying Agents for the first time requires Fleet access. For more information, " + /> + <EuiLink external href={`${services.docLinks.links.securitySolution.privileges}`}> + <FormattedMessage + id="xpack.securitySolution.endpoint.policyList.onboardingDocsLink" + defaultMessage="view the Elastic Security documentation" + /> + </EuiLink> + </EuiText> + ); + }, [services.docLinks.links.securitySolution.privileges]); + useEffect(() => { // if no endpoint policy, skip transform check if (!shouldCheckTransforms || !policyItems || !policyItems.length) { @@ -547,6 +569,16 @@ export const EndpointList = () => { rowProps={setTableRowProps} /> ); + } else if (canReadEndpointList && !canAccessFleet) { + return ( + <ManagementEmptyStateWrapper> + <PolicyEmptyState + loading={endpointPrivilegesLoading} + actionHidden + additionalInfo={missingFleetAccessInfo} + /> + </ManagementEmptyStateWrapper> + ); } else if (!policyItemsLoading && policyItems && policyItems.length > 0) { return ( <HostsEmptyState @@ -581,6 +613,10 @@ export const EndpointList = () => { handleSelectableOnChange, selectionOptions, handleCreatePolicyClick, + canAccessFleet, + canReadEndpointList, + endpointPrivilegesLoading, + missingFleetAccessInfo, ]); const hasListData = listData && listData.length > 0; @@ -633,7 +669,7 @@ export const EndpointList = () => { docsPage: ( <EuiLink data-test-subj="failed-transform-docs-link" - href={services?.docLinks?.links.endpoints.troubleshooting} + href={services.docLinks.links.endpoints.troubleshooting} target="_blank" > <FormattedMessage @@ -647,7 +683,7 @@ export const EndpointList = () => { <EuiSpacer size="s" /> </> ); - }, [metadataTransformStats, services?.docLinks?.links.endpoints.troubleshooting]); + }, [metadataTransformStats, services.docLinks.links.endpoints.troubleshooting]); const transformFailedCallout = useMemo(() => { if (!showTransformFailedCallout) { @@ -712,7 +748,7 @@ export const EndpointList = () => { appPath={`#${pagePathGetters.agent_list({ kuery: 'packages : "endpoint"', })}`} - href={`${services?.application?.getUrlForApp( + href={`${services.application.getUrlForApp( 'fleet' )}#${pagePathGetters.agent_list({ kuery: 'packages : "endpoint"', diff --git a/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx index 5a28c41b6ab4f..1b325821afd47 100644 --- a/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx @@ -13,6 +13,7 @@ import type { AppContextTestRender } from '../../../common/mock/endpoint'; import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useUserPrivileges } from '../../../common/components/user_privileges'; import { endpointPageHttpMock } from '../endpoint_hosts/mocks'; +import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; jest.mock('../../../common/components/user_privileges'); @@ -29,7 +30,7 @@ describe('when in the Administration tab', () => { }); afterEach(() => { - useUserPrivilegesMock.mockReset(); + useUserPrivilegesMock.mockImplementation(getUserPrivilegesMockDefaultValue); }); describe('when the user has no permissions', () => { @@ -100,7 +101,7 @@ describe('when in the Administration tab', () => { describe.skip('when the user has permissions', () => { it('should display the Management view if user has privileges', async () => { useUserPrivilegesMock.mockReturnValue({ - endpointPrivileges: { loading: false, canReadEndpointList: true }, + endpointPrivileges: { loading: false, canReadEndpointList: true, canAccessFleet: true }, }); expect(await render().findByTestId('endpointPage')).toBeTruthy(); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx index 55992f5ffac03..6548dd8b0d590 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx @@ -15,8 +15,11 @@ import { TrustedAppsList } from './trusted_apps_list'; import { exceptionsListAllHttpMocks } from '../../../mocks/exceptions_list_http_mocks'; import { SEARCHABLE_FIELDS } from '../constants'; import { parseQueryFilterToKQL } from '../../../common/utils'; +import { useUserPrivileges } from '../../../../common/components/user_privileges'; +import type { EndpointPrivileges } from '../../../../../common/endpoint/types'; jest.mock('../../../../common/components/user_privileges'); +const mockUserPrivileges = useUserPrivileges as jest.Mock; describe('When on the trusted applications page', () => { let render: () => ReturnType<AppContextTestRender['render']>; @@ -24,6 +27,7 @@ describe('When on the trusted applications page', () => { let history: AppContextTestRender['history']; let mockedContext: AppContextTestRender; let apiMocks: ReturnType<typeof exceptionsListAllHttpMocks>; + let mockedEndpointPrivileges: Partial<EndpointPrivileges>; beforeEach(() => { mockedContext = createAppRootMockRenderer(); @@ -35,6 +39,13 @@ describe('When on the trusted applications page', () => { act(() => { history.push(TRUSTED_APPS_PATH); }); + + mockedEndpointPrivileges = { canWriteTrustedApplications: true }; + mockUserPrivileges.mockReturnValue({ endpointPrivileges: mockedEndpointPrivileges }); + }); + + afterEach(() => { + mockUserPrivileges.mockReset(); }); it('should search using expected exception item fields', async () => { @@ -59,4 +70,60 @@ describe('When on the trusted applications page', () => { }) ); }); + + describe('RBAC Trusted Applications', () => { + describe('ALL privilege', () => { + beforeEach(() => { + mockedEndpointPrivileges.canWriteTrustedApplications = true; + }); + + it('should enable adding entries', async () => { + render(); + + await waitFor(() => + expect(renderResult.queryByTestId('trustedAppsListPage-pageAddButton')).toBeTruthy() + ); + }); + + it('should enable modifying/deleting entries', async () => { + render(); + + const actionsButton = await waitFor( + () => renderResult.getAllByTestId('trustedAppsListPage-card-header-actions-button')[0] + ); + userEvent.click(actionsButton); + + expect(renderResult.getByTestId('trustedAppsListPage-card-cardEditAction')).toBeTruthy(); + expect(renderResult.getByTestId('trustedAppsListPage-card-cardDeleteAction')).toBeTruthy(); + }); + }); + + describe('READ privilege', () => { + beforeEach(() => { + mockedEndpointPrivileges.canWriteTrustedApplications = false; + }); + + it('should disable adding entries', async () => { + render(); + + await waitFor(() => + expect(renderResult.queryByTestId('trustedAppsListPage-container')).toBeTruthy() + ); + + expect(renderResult.queryByTestId('trustedAppsListPage-pageAddButton')).toBeNull(); + }); + + it('should disable modifying/deleting entries', async () => { + render(); + + await waitFor(() => + expect(renderResult.queryByTestId('trustedAppsListPage-container')).toBeTruthy() + ); + + expect( + renderResult.queryByTestId('trustedAppsListPage-card-header-actions-button') + ).toBeNull(); + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx index 33912a5b795c4..4695f938249e9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx @@ -11,6 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import type { DocLinks } from '@kbn/doc-links'; import { EuiLink } from '@elastic/eui'; +import { useUserPrivileges } from '../../../../common/components/user_privileges'; import { useHttp } from '../../../../common/lib/kibana'; import type { ArtifactListPageProps } from '../../../components/artifact_list_page'; import { ArtifactListPage } from '../../../components/artifact_list_page'; @@ -108,6 +109,7 @@ const TRUSTED_APPS_PAGE_LABELS: ArtifactListPageProps['labels'] = { }; export const TrustedAppsList = memo(() => { + const { canWriteTrustedApplications } = useUserPrivileges().endpointPrivileges; const http = useHttp(); const trustedAppsApiClient = TrustedAppsApiClient.getInstance(http); @@ -119,6 +121,9 @@ export const TrustedAppsList = memo(() => { data-test-subj="trustedAppsListPage" searchableFields={SEARCHABLE_FIELDS} secondaryPageInfo={<TrustedAppsArtifactsDocsLink />} + allowCardDeleteAction={canWriteTrustedApplications} + allowCardEditAction={canWriteTrustedApplications} + allowCardCreateAction={canWriteTrustedApplications} /> ); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.test.tsx index b47741a219107..12ef348fcb903 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { render } from '@testing-library/react'; +import { fireEvent, render } from '@testing-library/react'; import React from 'react'; import { EntityAnalyticsAnomalies } from '.'; import type { AnomaliesCount } from '../../../../common/components/ml/anomaly/use_anomalies_search'; @@ -14,6 +14,15 @@ import { AnomalyEntity } from '../../../../common/components/ml/anomaly/use_anom import { TestProviders } from '../../../../common/mock'; import type { SecurityJob } from '../../../../common/components/ml_popover/types'; +// Query toggle only works if pageName.lenght > 0 +jest.mock('../../../../common/utils/route/use_route_spy', () => ({ + useRouteSpy: jest.fn().mockReturnValue([ + { + pageName: 'not_empty', + }, + ]), +})); + const mockUseNotableAnomaliesSearch = jest.fn().mockReturnValue({ isLoading: false, data: [], @@ -232,4 +241,34 @@ describe('EntityAnalyticsAnomalies', () => { expect(getByTestId('incompatible_jobs_warnings')).toBeInTheDocument(); }); + + it("doesn't render the warning message when header is collapsed", () => { + const jobCount: AnomaliesCount = { + job: { + isInstalled: true, + datafeedState: 'started', + jobState: 'opened', + isCompatible: false, + } as SecurityJob, + name: 'v3_windows_anomalous_script', + count: 0, + entity: AnomalyEntity.User, + }; + + mockUseNotableAnomaliesSearch.mockReturnValue({ + isLoading: false, + data: [jobCount], + refetch: jest.fn(), + }); + + const { queryByTestId, getByTestId } = render( + <TestProviders> + <EntityAnalyticsAnomalies /> + </TestProviders> + ); + + fireEvent.click(getByTestId('query-toggle-header')); + + expect(queryByTestId('incompatible_jobs_warnings')).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx index c3333a3e13957..96a14f2c63893 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx @@ -163,44 +163,50 @@ export const EntityAnalyticsAnomalies = () => { </EuiFlexGroup> </HeaderSection> - {incompatibleJobCount > 0 && ( + {toggleStatus && ( <> - <EuiCallOut - title={i18n.MODULE_NOT_COMPATIBLE_TITLE(incompatibleJobCount)} - data-test-subj="incompatible_jobs_warnings" - color="warning" - iconType="alert" - size="s" - > - <p> - <FormattedMessage - defaultMessage="We could not find any data, see {mlDocs} for more information on Machine Learning job requirements." - id="xpack.securitySolution.components.mlPopup.moduleNotCompatibleDescription" - values={{ - mlDocs: ( - <a href={`${docLinks.links.siem.ml}`} rel="noopener noreferrer" target="_blank"> - {i18n.ANOMALY_DETECTION_DOCS} - </a> - ), - }} - /> - </p> - </EuiCallOut> - - <EuiSpacer size="m" /> + {incompatibleJobCount > 0 && ( + <> + <EuiCallOut + title={i18n.MODULE_NOT_COMPATIBLE_TITLE(incompatibleJobCount)} + data-test-subj="incompatible_jobs_warnings" + color="warning" + iconType="alert" + size="s" + > + <p> + <FormattedMessage + defaultMessage="We could not find any data, see {mlDocs} for more information on Machine Learning job requirements." + id="xpack.securitySolution.components.mlPopup.moduleNotCompatibleDescription" + values={{ + mlDocs: ( + <a + href={`${docLinks.links.siem.ml}`} + rel="noopener noreferrer" + target="_blank" + > + {i18n.ANOMALY_DETECTION_DOCS} + </a> + ), + }} + /> + </p> + </EuiCallOut> + + <EuiSpacer size="m" /> + </> + )} + <MLJobsAwaitingNodeWarning jobIds={installedJobsIds} /> + <EuiInMemoryTable + responsive={false} + items={data} + columns={columns} + loading={isSearchLoading} + id={TABLE_QUERY_ID} + sorting={TABLE_SORTING} + /> </> )} - <MLJobsAwaitingNodeWarning jobIds={installedJobsIds} /> - {toggleStatus && ( - <EuiInMemoryTable - responsive={false} - items={data} - columns={columns} - loading={isSearchLoading} - id={TABLE_QUERY_ID} - sorting={TABLE_SORTING} - /> - )} </EuiPanel> ); }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx index e34227f0bfe8f..dce89dc199d9e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx @@ -19,8 +19,11 @@ import { GuidedOnboardingTourStep, SecurityTourStep, } from '../../../../../common/components/guided_onboarding_tour/tour_step'; +import { initialUserPrivilegesState as mockInitialUserPrivilegesState } from '../../../../../common/components/user_privileges/user_privileges_context'; +import { useUserPrivileges } from '../../../../../common/components/user_privileges'; import { SecurityStepId } from '../../../../../common/components/guided_onboarding_tour/tour_config'; +jest.mock('../../../../../common/components/user_privileges'); jest.mock('../../../../../common/components/guided_onboarding_tour'); jest.mock('../../../../../detections/components/user_info', () => ({ useUserData: jest.fn().mockReturnValue([{ canUserCRUD: true, hasIndexWrite: true }]), @@ -268,6 +271,12 @@ describe('Actions', () => { }); describe('Alert context menu enabled?', () => { + beforeEach(() => { + (useUserPrivileges as jest.Mock).mockReturnValue({ + ...mockInitialUserPrivilegesState(), + endpointPrivileges: { loading: false, canWriteEventFilters: true }, + }); + }); test('it disables for eventType=raw', () => { const wrapper = mount( <TestProviders> diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts index bd80df0c73413..6c6098e2c97f5 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts @@ -40,7 +40,13 @@ interface CallApiRouteInterface { authz?: Partial<EndpointAuthz>; } -const Platinum = licenseMock.createLicense({ license: { type: 'platinum', mode: 'platinum' } }); +const Enterprise = licenseMock.createLicense({ + license: { type: 'enterprise', mode: 'enterprise' }, +}); + +const Platinum = licenseMock.createLicense({ + license: { type: 'platinum', mode: 'platinum' }, +}); const Gold = licenseMock.createLicense({ license: { type: 'gold', mode: 'gold' } }); describe('Action List Route', () => { @@ -94,7 +100,7 @@ describe('Action List Route', () => { const ctx = createRouteHandlerContext(mockScopedClient, mockSavedObjectClient); - const withLicense = license ? license : Platinum; + const withLicense = license ? license : Enterprise; licenseEmitter.next(withLicense); ctx.securitySolution.getEndpointAuthz.mockResolvedValue({ @@ -102,7 +108,8 @@ describe('Action List Route', () => { // mimicking the behavior of the EndpointAuthz class // just so we can test the license check here // since getEndpointAuthzInitialStateMock sets all keys to true - canReadActionsLogManagement: licenseService.isPlatinumPlus(), + canReadActionsLogManagement: licenseService.isEnterprise(), + canAccessEndpointActionsLogManagement: licenseService.isPlatinumPlus(), }), ...authz, }); @@ -135,13 +142,27 @@ describe('Action List Route', () => { expect(mockResponse.ok).toBeCalled(); }); - it('does not allow user without `canReadActionsLogManagement` access for API requests', async () => { + it('allows user with `canAccessEndpointActionsLogManagement` access for API requests', async () => { await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, { - authz: { canReadActionsLogManagement: false }, + authz: { canAccessEndpointActionsLogManagement: true }, + }); + expect(mockResponse.ok).toBeCalled(); + }); + + it('does not allow user without `canReadActionsLogManagement` or `canAccessEndpointActionsLogManagement` access for API requests', async () => { + await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, { + authz: { canReadActionsLogManagement: false, canAccessEndpointActionsLogManagement: false }, }); expect(mockResponse.forbidden).toBeCalled(); }); + it('does allow user access to API requests if license is at least platinum', async () => { + await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, { + license: Platinum, + }); + expect(mockResponse.ok).toBeCalled(); + }); + it('does not allow user access to API requests if license is below platinum', async () => { await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, { license: Gold, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts index 6a932f9bb8af8..5423ca8866155 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts @@ -33,7 +33,7 @@ export function registerActionListRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canReadActionsLogManagement'] }, + { any: ['canReadActionsLogManagement', 'canAccessEndpointActionsLogManagement'] }, endpointContext.logFactory.get('endpointActionList'), actionListHandler(endpointContext) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts index 51326c8adbd12..b8f6166818807 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts @@ -38,7 +38,7 @@ jest.mock('../../services'); const mockGetActionList = getActionList as jest.Mock; const mockGetActionListByStatus = getActionListByStatus as jest.Mock; -describe(' Action List Handler', () => { +describe('Action List Handler', () => { let endpointAppContextService: EndpointAppContextService; let mockResponse: jest.Mocked<KibanaResponseFactory>; diff --git a/x-pack/plugins/security_solution/server/features.ts b/x-pack/plugins/security_solution/server/features.ts index 4711e978a25fe..08cd06890f298 100644 --- a/x-pack/plugins/security_solution/server/features.ts +++ b/x-pack/plugins/security_solution/server/features.ts @@ -12,6 +12,7 @@ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common'; import { createUICapabilities } from '@kbn/cases-plugin/common'; +import { EXCEPTION_LIST_NAMESPACE_AGNOSTIC } from '@kbn/securitysolution-list-constants'; import { APP_ID, CASES_FEATURE_ID, SERVER_APP_ID } from '../common/constants'; import { savedObjectTypes } from './saved_objects'; import type { ConfigType } from './config'; @@ -296,18 +297,24 @@ const subFeatures: SubFeatureConfig[] = [ groupType: 'mutually_exclusive', privileges: [ { - api: [`${APP_ID}-writeTrustedApplications`, `${APP_ID}-readTrustedApplications`], + api: [ + 'lists-all', + 'lists-read', + 'lists-summary', + `${APP_ID}-writeTrustedApplications`, + `${APP_ID}-readTrustedApplications`, + ], id: 'trusted_applications_all', includeIn: 'none', name: 'All', savedObject: { - all: [], + all: [EXCEPTION_LIST_NAMESPACE_AGNOSTIC], read: [], }, ui: ['writeTrustedApplications', 'readTrustedApplications'], }, { - api: [`${APP_ID}-readTrustedApplications`], + api: ['lists-read', 'lists-summary', `${APP_ID}-readTrustedApplications`], id: 'trusted_applications_read', includeIn: 'none', name: 'Read', @@ -341,6 +348,9 @@ const subFeatures: SubFeatureConfig[] = [ privileges: [ { api: [ + 'lists-all', + 'lists-read', + 'lists-summary', `${APP_ID}-writeHostIsolationExceptions`, `${APP_ID}-readHostIsolationExceptions`, ], @@ -348,13 +358,13 @@ const subFeatures: SubFeatureConfig[] = [ includeIn: 'none', name: 'All', savedObject: { - all: [], + all: [EXCEPTION_LIST_NAMESPACE_AGNOSTIC], read: [], }, ui: ['writeHostIsolationExceptions', 'readHostIsolationExceptions'], }, { - api: [`${APP_ID}-readHostIsolationExceptions`], + api: ['lists-read', 'lists-summary', `${APP_ID}-readHostIsolationExceptions`], id: 'host_isolation_exceptions_read', includeIn: 'none', name: 'Read', @@ -384,18 +394,24 @@ const subFeatures: SubFeatureConfig[] = [ groupType: 'mutually_exclusive', privileges: [ { - api: [`${APP_ID}-writeBlocklist`, `${APP_ID}-readBlocklist`], + api: [ + 'lists-all', + 'lists-read', + 'lists-summary', + `${APP_ID}-writeBlocklist`, + `${APP_ID}-readBlocklist`, + ], id: 'blocklist_all', includeIn: 'none', name: 'All', savedObject: { - all: [], + all: [EXCEPTION_LIST_NAMESPACE_AGNOSTIC], read: [], }, ui: ['writeBlocklist', 'readBlocklist'], }, { - api: [`${APP_ID}-readBlocklist`], + api: ['lists-read', 'lists-summary', `${APP_ID}-readBlocklist`], id: 'blocklist_read', includeIn: 'none', name: 'Read', @@ -425,18 +441,24 @@ const subFeatures: SubFeatureConfig[] = [ groupType: 'mutually_exclusive', privileges: [ { - api: [`${APP_ID}-writeEventFilters`, `${APP_ID}-readEventFilters`], + api: [ + 'lists-all', + 'lists-read', + 'lists-summary', + `${APP_ID}-writeEventFilters`, + `${APP_ID}-readEventFilters`, + ], id: 'event_filters_all', includeIn: 'none', name: 'All', savedObject: { - all: [], + all: [EXCEPTION_LIST_NAMESPACE_AGNOSTIC], read: [], }, ui: ['writeEventFilters', 'readEventFilters'], }, { - api: [`${APP_ID}-readEventFilters`], + api: ['lists-read', 'lists-summary', `${APP_ID}-readEventFilters`], id: 'event_filters_read', includeIn: 'none', name: 'Read', @@ -545,7 +567,7 @@ export const getKibanaPrivilegesFeaturePrivileges = ( all: [ 'alert', 'exception-list', - 'exception-list-agnostic', + EXCEPTION_LIST_NAMESPACE_AGNOSTIC, DATA_VIEW_SAVED_OBJECT_TYPE, ...savedObjectTypes, CLOUD_POSTURE_SAVED_OBJECT_RULE_TYPE, @@ -573,7 +595,7 @@ export const getKibanaPrivilegesFeaturePrivileges = ( all: [], read: [ 'exception-list', - 'exception-list-agnostic', + EXCEPTION_LIST_NAMESPACE_AGNOSTIC, DATA_VIEW_SAVED_OBJECT_TYPE, ...savedObjectTypes, CLOUD_POSTURE_SAVED_OBJECT_RULE_TYPE, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rule_exceptions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rule_exceptions.ts index 0829816a6a6d1..063e0898f356e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rule_exceptions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rule_exceptions.ts @@ -43,7 +43,9 @@ export const importRuleExceptions = async ({ const { errors, success, - success_count: successCount, + // return only count of exception list items, without count excpetions list + // to be consistent with UI, and users shouldn't know about backend structure + success_count_exception_list_items: successCount, } = await exceptionsClient.importExceptionListAndItemsAsArray({ exceptionsToImport: exceptions, overwrite, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts index f2ff6e5074fd8..2b73297881871 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts @@ -60,21 +60,18 @@ export class HostIsolationExceptionsValidator extends BaseValidator { return item.listId === ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID; } - // TODO: 8.7 rbac - // protected async validateHasWritePrivilege(): Promise<void> { - // return super.validateHasPrivilege('canWriteHostIsolationExceptions'); - // } + protected async validateHasWritePrivilege(): Promise<void> { + return this.validateHasPrivilege('canWriteHostIsolationExceptions'); + } - // TODO: 8.7 rbac - // protected async validateHasReadPrivilege(): Promise<void> { - // return super.validateHasPrivilege('canReadHostIsolationExceptions'); - // } + protected async validateHasReadPrivilege(): Promise<void> { + return this.validateHasPrivilege('canReadHostIsolationExceptions'); + } async validatePreCreateItem( item: CreateExceptionListItemOptions ): Promise<CreateExceptionListItemOptions> { - // TODO add this to 8.7 rbac await this.validateHasWritePrivilege(); - await this.validateCanIsolateHosts(); + await this.validateHasWritePrivilege(); await this.validateHostIsolationData(item); await this.validateByPolicyItem(item); @@ -86,9 +83,7 @@ export class HostIsolationExceptionsValidator extends BaseValidator { ): Promise<UpdateExceptionListItemOptions> { const updatedItem = _updatedItem as ExceptionItemLikeOptions; - // TODO add this to 8.7 rbac add - // await this.validateHasWritePrivilege(); - await this.validateCanIsolateHosts(); + await this.validateHasWritePrivilege(); await this.validateHostIsolationData(updatedItem); await this.validateByPolicyItem(updatedItem); @@ -96,39 +91,27 @@ export class HostIsolationExceptionsValidator extends BaseValidator { } async validatePreGetOneItem(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasReadPrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreSummary(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasReadPrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreDeleteItem(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasWritePrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasWritePrivilege(); } async validatePreExport(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasReadPrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreSingleListFind(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasReadPrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreMultiListFind(): Promise<void> { - // TODO: for 8.7 rbac replace with - // await this.validateHasReadPrivilege(); - await this.validateCanManageEndpointArtifacts(); + await this.validateHasReadPrivilege(); } async validatePreImport(): Promise<void> { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.test.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.test.ts new file mode 100644 index 0000000000000..2af9eb85db3fe --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.test.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { OpsgenieCloseAlertExample } from '../../../../server/connector_types/stack/opsgenie/test_schema'; +import { isPartialCloseAlertSchema } from './close_alert_schema'; + +describe('close_alert_schema', () => { + describe('isPartialCloseAlertSchema', () => { + it('returns true with an empty object', () => { + expect(isPartialCloseAlertSchema({})).toBeTruthy(); + }); + + it('returns false with undefined', () => { + expect(isPartialCloseAlertSchema(undefined)).toBeFalsy(); + }); + + it('returns false with an invalid field', () => { + expect(isPartialCloseAlertSchema({ invalidField: 'a' })).toBeFalsy(); + }); + + it('returns true with only the note field', () => { + expect(isPartialCloseAlertSchema({ note: 'a' })).toBeTruthy(); + }); + + it('returns true with the Opsgenie close alert example', () => { + expect(isPartialCloseAlertSchema(OpsgenieCloseAlertExample)).toBeTruthy(); + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.ts new file mode 100644 index 0000000000000..8c8a78ca0d920 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/close_alert_schema.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import * as rt from 'io-ts'; +import { decodeSchema } from './schema_utils'; + +/** + * This schema must match the CloseAlertParamsSchema in x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.ts + * except that it makes all fields partial. + */ +const CloseAlertSchema = rt.exact( + rt.partial({ + alias: rt.string, + user: rt.string, + source: rt.string, + note: rt.string, + }) +); + +type CloseAlertSchemaType = rt.TypeOf<typeof CloseAlertSchema>; + +export const isPartialCloseAlertSchema = (data: unknown): data is CloseAlertSchemaType => { + try { + decodeSchema(CloseAlertSchema, data); + return true; + } catch (error) { + return false; + } +}; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/index.tsx b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/index.tsx index 7b0a7de9722d7..856c7bfde3c55 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/index.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/index.tsx @@ -207,3 +207,5 @@ const CreateAlertComponent: React.FC<CreateAlertProps> = ({ CreateAlertComponent.displayName = 'CreateAlert'; export const CreateAlert = React.memo(CreateAlertComponent); + +export { isPartialCreateAlertSchema } from './schema'; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/json_editor.tsx b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/json_editor.tsx index 91147204e46f4..f29736492d0e7 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/json_editor.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/json_editor.tsx @@ -11,7 +11,8 @@ import { JsonEditorWithMessageVariables } from '@kbn/triggers-actions-ui-plugin/ import type { OpsgenieCreateAlertParams } from '../../../../../server/connector_types/stack'; import * as i18n from './translations'; import { CreateAlertProps } from '.'; -import { decodeCreateAlert, isDecodeError } from './schema'; +import { decodeCreateAlert } from './schema'; +import { isDecodeError } from '../schema_utils'; export type JsonEditorProps = Pick< CreateAlertProps, diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.test.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.test.ts index f2aec179e8676..9b96d70c65633 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.test.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.test.ts @@ -5,104 +5,137 @@ * 2.0. */ -import { decodeCreateAlert } from './schema'; +import { decodeCreateAlert, isPartialCreateAlertSchema } from './schema'; import { OpsgenieCreateAlertExample, ValidCreateAlertSchema, } from '../../../../../server/connector_types/stack/opsgenie/test_schema'; -describe('decodeCreateAlert', () => { - it('throws an error when the message field is not present', () => { - expect(() => decodeCreateAlert({ alias: '123' })).toThrowErrorMatchingInlineSnapshot( - `"[message]: expected value of type [string] but got [undefined]"` - ); - }); +describe('schema', () => { + describe('decodeCreateAlert', () => { + it('throws an error when the message field is not present', () => { + expect(() => decodeCreateAlert({ alias: '123' })).toThrowErrorMatchingInlineSnapshot( + `"[message]: expected value of type [string] but got [undefined]"` + ); + }); - it('throws an error when the message field is only spaces', () => { - expect(() => decodeCreateAlert({ message: ' ' })).toThrowErrorMatchingInlineSnapshot( - `"[message]: must be populated with a value other than just whitespace"` - ); - }); + it('throws an error when the message field is only spaces', () => { + expect(() => decodeCreateAlert({ message: ' ' })).toThrowErrorMatchingInlineSnapshot( + `"[message]: must be populated with a value other than just whitespace"` + ); + }); - it('throws an error when the message field is an empty string', () => { - expect(() => decodeCreateAlert({ message: '' })).toThrowErrorMatchingInlineSnapshot( - `"[message]: must be populated with a value other than just whitespace"` - ); - }); + it('throws an error when the message field is an empty string', () => { + expect(() => decodeCreateAlert({ message: '' })).toThrowErrorMatchingInlineSnapshot( + `"[message]: must be populated with a value other than just whitespace"` + ); + }); - it('throws an error when additional fields are present in the data that are not defined in the schema', () => { - expect(() => - decodeCreateAlert({ invalidField: 'hi', message: 'hi' }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in the data that are not defined in the schema', () => { + expect(() => + decodeCreateAlert({ invalidField: 'hi', message: 'hi' }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in responders with name field than in the schema', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - responders: [{ name: 'sam', type: 'team', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in responders with name field than in the schema', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + responders: [{ name: 'sam', type: 'team', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in responders with id field than in the schema', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - responders: [{ id: 'id', type: 'team', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in responders with id field than in the schema', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + responders: [{ id: 'id', type: 'team', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in visibleTo with name and type=team', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - visibleTo: [{ name: 'sam', type: 'team', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in visibleTo with name and type=team', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + visibleTo: [{ name: 'sam', type: 'team', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in visibleTo with id and type=team', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - visibleTo: [{ id: 'id', type: 'team', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in visibleTo with id and type=team', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + visibleTo: [{ id: 'id', type: 'team', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in visibleTo with id and type=user', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - visibleTo: [{ id: 'id', type: 'user', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in visibleTo with id and type=user', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + visibleTo: [{ id: 'id', type: 'user', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when additional fields are present in visibleTo with username and type=user', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - visibleTo: [{ username: 'sam', type: 'user', invalidField: 'scott' }], - }) - ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); - }); + it('throws an error when additional fields are present in visibleTo with username and type=user', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + visibleTo: [{ username: 'sam', type: 'user', invalidField: 'scott' }], + }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"invalidField\\""`); + }); - it('throws an error when details is a record of string to number', () => { - expect(() => - decodeCreateAlert({ - message: 'hi', - details: { id: 1 }, - }) - ).toThrowErrorMatchingInlineSnapshot(`"Invalid value \\"1\\" supplied to \\"details.id\\""`); + it('throws an error when details is a record of string to number', () => { + expect(() => + decodeCreateAlert({ + message: 'hi', + details: { id: 1 }, + }) + ).toThrowErrorMatchingInlineSnapshot(`"Invalid value \\"1\\" supplied to \\"details.id\\""`); + }); + + it.each([ + ['ValidCreateAlertSchema', ValidCreateAlertSchema], + ['OpsgenieCreateAlertExample', OpsgenieCreateAlertExample], + ])('validates the test object [%s] correctly', (objectName, testObject) => { + expect(() => decodeCreateAlert(testObject)).not.toThrow(); + }); }); - it.each([ - ['ValidCreateAlertSchema', ValidCreateAlertSchema], - ['OpsgenieCreateAlertExample', OpsgenieCreateAlertExample], - ])('validates the test object [%s] correctly', (objectName, testObject) => { - expect(() => decodeCreateAlert(testObject)).not.toThrow(); + describe('isPartialCreateAlertSchema', () => { + const { message, ...createAlertSchemaWithoutMessage } = ValidCreateAlertSchema; + const { message: ignoreMessage2, ...opsgenieCreateAlertExampleWithoutMessage } = + OpsgenieCreateAlertExample; + + it('returns true with an empty object', () => { + expect(isPartialCreateAlertSchema({})).toBeTruthy(); + }); + + it('returns false with undefined', () => { + expect(isPartialCreateAlertSchema(undefined)).toBeFalsy(); + }); + + it('returns true with only alias', () => { + expect(isPartialCreateAlertSchema({ alias: 'abc' })).toBeTruthy(); + }); + + it.each([ + ['ValidCreateAlertSchema', ValidCreateAlertSchema], + ['OpsgenieCreateAlertExample', OpsgenieCreateAlertExample], + ['createAlertSchemaWithoutMessage', createAlertSchemaWithoutMessage], + ['opsgenieCreateAlertExampleWithoutMessage', opsgenieCreateAlertExampleWithoutMessage], + ])('returns true with the test object [%s]', (objectName, testObject) => { + expect(isPartialCreateAlertSchema(testObject)).toBeTruthy(); + }); + + it('returns false with an additional property', () => { + expect(isPartialCreateAlertSchema({ anInvalidField: 'a' })).toBeFalsy(); + }); }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.ts index 2a76527c6c355..6f13886a32a62 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/schema.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { Either, fold } from 'fp-ts/lib/Either'; -import { pipe } from 'fp-ts/lib/pipeable'; +import { Either } from 'fp-ts/lib/Either'; import * as rt from 'io-ts'; -import { exactCheck } from '@kbn/securitysolution-io-ts-utils'; -import { identity } from 'fp-ts/lib/function'; -import { isEmpty, isObject } from 'lodash'; +import { isEmpty } from 'lodash'; +import { decodeSchema } from '../schema_utils'; import * as i18n from './translations'; const MessageNonEmptyString = new rt.Type<string, string, unknown>( @@ -37,6 +35,42 @@ const ResponderTypes = rt.union([ rt.literal('schedule'), ]); +const CreateAlertSchemaOptionalProps = rt.partial( + rt.type({ + alias: rt.string, + description: rt.string, + responders: rt.array( + rt.union([ + rt.strict({ name: rt.string, type: ResponderTypes }), + rt.strict({ id: rt.string, type: ResponderTypes }), + rt.strict({ username: rt.string, type: rt.literal('user') }), + ]) + ), + visibleTo: rt.array( + rt.union([ + rt.strict({ name: rt.string, type: rt.literal('team') }), + rt.strict({ id: rt.string, type: rt.literal('team') }), + rt.strict({ id: rt.string, type: rt.literal('user') }), + rt.strict({ username: rt.string, type: rt.literal('user') }), + ]) + ), + actions: rt.array(rt.string), + tags: rt.array(rt.string), + details: rt.record(rt.string, rt.string), + entity: rt.string, + source: rt.string, + priority: rt.union([ + rt.literal('P1'), + rt.literal('P2'), + rt.literal('P3'), + rt.literal('P4'), + rt.literal('P5'), + ]), + user: rt.string, + note: rt.string, + }).props +); + /** * This schema is duplicated from the server. The only difference is that it is using io-ts vs kbn-schema. * NOTE: This schema must be the same as defined here: x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.ts @@ -51,92 +85,38 @@ const ResponderTypes = rt.union([ */ const CreateAlertSchema = rt.intersection([ rt.strict({ message: MessageNonEmptyString }), - rt.exact( - rt.partial({ - alias: rt.string, - description: rt.string, - responders: rt.array( - rt.union([ - rt.strict({ name: rt.string, type: ResponderTypes }), - rt.strict({ id: rt.string, type: ResponderTypes }), - rt.strict({ username: rt.string, type: rt.literal('user') }), - ]) - ), - visibleTo: rt.array( - rt.union([ - rt.strict({ name: rt.string, type: rt.literal('team') }), - rt.strict({ id: rt.string, type: rt.literal('team') }), - rt.strict({ id: rt.string, type: rt.literal('user') }), - rt.strict({ username: rt.string, type: rt.literal('user') }), - ]) - ), - actions: rt.array(rt.string), - tags: rt.array(rt.string), - details: rt.record(rt.string, rt.string), - entity: rt.string, - source: rt.string, - priority: rt.union([ - rt.literal('P1'), - rt.literal('P2'), - rt.literal('P3'), - rt.literal('P4'), - rt.literal('P5'), - ]), - user: rt.string, - note: rt.string, - }) - ), + rt.exact(CreateAlertSchemaOptionalProps), ]); -export const formatErrors = (errors: rt.Errors): string[] => { - const err = errors.map((error) => { - if (error.message != null) { - return error.message; - } else { - const keyContext = error.context - .filter( - (entry) => entry.key != null && !Number.isInteger(+entry.key) && entry.key.trim() !== '' - ) - .map((entry) => entry.key) - .join('.'); +type CreateAlertSchemaType = rt.TypeOf<typeof CreateAlertSchema>; - const nameContext = error.context.find( - (entry) => entry.type != null && entry.type.name != null && entry.type.name.length > 0 - ); +/** + * This schema should match CreateAlertSchema except that all fields are optional and message is only enforced as a string. + * Enforcing message as only a string accommodates the following scenario: + * + * If a user deletes an action in the rule form at index 0, and the + * action at index 1 had the message field specified with all spaces, the message field is technically invalid but + * we want to allow it to pass the partial check so that the form is still populated with the invalid value. Otherwise the + * forum will be reset and the user would lose the information (although it is invalid) they had entered + */ +const PartialCreateAlertSchema = rt.exact( + rt.intersection([ + rt.partial(rt.type({ message: rt.string }).props), + CreateAlertSchemaOptionalProps, + ]) +); - const suppliedValue = - keyContext !== '' ? keyContext : nameContext != null ? nameContext.type.name : ''; - const value = isObject(error.value) ? JSON.stringify(error.value) : error.value; - return `Invalid value "${value}" supplied to "${suppliedValue}"`; - } - }); +type PartialCreateAlertSchemaType = rt.TypeOf<typeof PartialCreateAlertSchema>; - return [...new Set(err)]; +export const isPartialCreateAlertSchema = (data: unknown): data is PartialCreateAlertSchemaType => { + try { + decodeSchema(PartialCreateAlertSchema, data); + return true; + } catch (error) { + return false; + } }; -type CreateAlertSchemaType = rt.TypeOf<typeof CreateAlertSchema>; - export const decodeCreateAlert = (data: unknown): CreateAlertSchemaType => { - const onLeft = (errors: rt.Errors) => { - throw new DecodeError(formatErrors(errors)); - }; - - const onRight = (a: CreateAlertSchemaType): CreateAlertSchemaType => identity(a); - - return pipe( - CreateAlertSchema.decode(data), - (decoded) => exactCheck(data, decoded), - fold(onLeft, onRight) - ); + return decodeSchema(CreateAlertSchema, data); }; - -export class DecodeError extends Error { - constructor(public readonly decodeErrors: string[]) { - super(decodeErrors.join()); - this.name = this.constructor.name; - } -} - -export function isDecodeError(error: unknown): error is DecodeError { - return error instanceof DecodeError; -} diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/translations.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/translations.ts index d78e66cab0b14..64b5eb442f098 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/translations.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/create_alert/translations.ts @@ -37,13 +37,6 @@ export const DESCRIPTION_FIELD_LABEL = i18n.translate( } ); -export const MESSAGE_FIELD_IS_REQUIRED = i18n.translate( - 'xpack.stackConnectors.components.opsgenie.messageFieldRequired', - { - defaultMessage: '"message" field must be populated with a value other than just whitespace', - } -); - export const USE_JSON_EDITOR_LABEL = i18n.translate( 'xpack.stackConnectors.components.opsgenie.useJsonEditorLabel', { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/model.tsx b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/model.tsx index 87dedc180f561..fa538fdfcfe96 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/model.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/model.tsx @@ -11,6 +11,7 @@ import { ActionTypeModel as ConnectorTypeModel, GenericValidationResult, } from '@kbn/triggers-actions-ui-plugin/public'; +import { isEmpty } from 'lodash'; import { RULE_TAGS_TEMPLATE } from '../../../../common/opsgenie'; import { OpsgenieSubActions } from '../../../../common'; import type { @@ -74,13 +75,13 @@ const validateParams = async ( errors, }; - if ( - actionParams.subAction === OpsgenieSubActions.CreateAlert && - !actionParams?.subActionParams?.message?.length - ) { - errors['subActionParams.message'].push(translations.MESSAGE_IS_REQUIRED); + if (actionParams.subAction === OpsgenieSubActions.CreateAlert) { + if (!actionParams?.subActionParams?.message?.length) { + errors['subActionParams.message'].push(translations.MESSAGE_IS_REQUIRED); + } else if (isEmpty(actionParams?.subActionParams?.message?.trim())) { + errors['subActionParams.message'].push(translations.MESSAGE_NON_WHITESPACE); + } } - if ( actionParams.subAction === OpsgenieSubActions.CloseAlert && !actionParams?.subActionParams?.alias?.length diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.test.tsx index 7f20f15294878..e78d1af35e953 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.test.tsx @@ -195,7 +195,7 @@ describe('OpsgenieParamFields', () => { expect(screen.queryByText('Message')).not.toBeInTheDocument(); }); - it('preserves the previous alias value when switching between the create and close alert event actions', async () => { + it('does not call edit action when a component rerenders with subActionParams that match the new subAction', async () => { const { rerender } = render(<OpsgenieParamFields {...defaultCreateAlertProps} />); expect(screen.getByDisplayValue('hello')).toBeInTheDocument(); @@ -220,17 +220,78 @@ describe('OpsgenieParamFields', () => { expect(screen.queryByDisplayValue('hello')).not.toBeInTheDocument(); - expect(editAction).toBeCalledTimes(2); + expect(editAction).toBeCalledTimes(1); + }); - expect(editAction.mock.calls[1]).toMatchInlineSnapshot(` - Array [ - "subActionParams", - Object { - "alias": "a new alias", - }, - 0, - ] - `); + it('calls editAction with only the alias when the component is rerendered with mismatched closeAlert and params', async () => { + const { rerender } = render(<OpsgenieParamFields {...defaultCreateAlertProps} />); + + expect(screen.getByDisplayValue('hello')).toBeInTheDocument(); + expect(screen.getByDisplayValue('123')).toBeInTheDocument(); + + rerender( + <OpsgenieParamFields + {...{ + ...defaultCloseAlertProps, + actionParams: { + ...defaultCloseAlertProps.actionParams, + subActionParams: { + alias: 'a new alias', + message: 'a message', + }, + }, + }} + /> + ); + + expect(screen.queryByDisplayValue('hello')).not.toBeInTheDocument(); + + expect(editAction).toBeCalledTimes(1); + expect(editAction.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "subActionParams", + Object { + "alias": "a new alias", + }, + 0, + ] + `); + }); + + it('calls editAction with only the alias when the component is rerendered with mismatched createAlert and params', async () => { + const { rerender } = render(<OpsgenieParamFields {...defaultCloseAlertProps} />); + + expect(screen.queryByText('Message')).not.toBeInTheDocument(); + expect(screen.getByDisplayValue('456')).toBeInTheDocument(); + + rerender( + <OpsgenieParamFields + {...{ + ...defaultCreateAlertProps, + actionParams: { + ...defaultCreateAlertProps.actionParams, + subActionParams: { + message: 'a message', + alias: 'a new alias', + invalidField: 'a note', + }, + }, + }} + /> + ); + + expect(screen.queryByDisplayValue('456')).not.toBeInTheDocument(); + + expect(editAction).toBeCalledTimes(1); + expect(editAction.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "subActionParams", + Object { + "alias": "a new alias", + }, + 0, + ] + `); }); it('only preserves the previous alias value when switching between the create and close alert event actions', async () => { @@ -262,14 +323,14 @@ describe('OpsgenieParamFields', () => { expect(editAction).toBeCalledTimes(2); expect(editAction.mock.calls[1]).toMatchInlineSnapshot(` - Array [ - "subActionParams", - Object { - "alias": "a new alias", - }, - 0, - ] - `); + Array [ + "subActionParams", + Object { + "alias": "a new alias", + }, + 0, + ] + `); }); it('calls editAction when changing the subAction', async () => { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.tsx index 33dc1740c5ad8..269babe3ff4b4 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/params.tsx @@ -19,8 +19,9 @@ import type { OpsgenieCreateAlertSubActionParams, } from '../../../../server/connector_types/stack'; import * as i18n from './translations'; -import { CreateAlert } from './create_alert'; +import { CreateAlert, isPartialCreateAlertSchema } from './create_alert'; import { CloseAlert } from './close_alert'; +import { isPartialCloseAlertSchema } from './close_alert_schema'; const actionOptions = [ { @@ -85,11 +86,20 @@ const OpsgenieParamFields: React.FC<ActionParamsProps<OpsgenieActionParams>> = ( useEffect(() => { if (subAction != null && currentSubAction.current !== subAction) { currentSubAction.current = subAction; - const params = subActionParams?.alias ? { alias: subActionParams.alias } : undefined; - editAction('subActionParams', params, index); + + // check for a mismatch in the subAction and params, if the subAction does not match the params then we need to + // clear them by calling editAction. We can carry over the alias if it exists + if ( + (subAction === OpsgenieSubActions.CreateAlert && + !isPartialCreateAlertSchema(subActionParams)) || + (subAction === OpsgenieSubActions.CloseAlert && !isPartialCloseAlertSchema(subActionParams)) + ) { + const params = subActionParams?.alias ? { alias: subActionParams.alias } : undefined; + editAction('subActionParams', params, index); + } } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [subAction, currentSubAction, subActionParams?.alias, index]); + }, [subAction, currentSubAction, index, subActionParams]); return ( <> diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.test.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.test.ts new file mode 100644 index 0000000000000..de61514e61785 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.test.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import * as rt from 'io-ts'; +import { DecodeError, decodeSchema } from './schema_utils'; + +describe('schema_utils', () => { + describe('decodeSchema', () => { + const testSchema = rt.strict({ stringField: rt.string }); + + it('throws an error when stringField is not present', () => { + expect(() => decodeSchema(testSchema, { a: 1 })).toThrowErrorMatchingInlineSnapshot( + `"Invalid value \\"undefined\\" supplied to \\"stringField\\""` + ); + }); + + it('throws an error when stringField is present but excess properties are also present', () => { + expect(() => + decodeSchema(testSchema, { stringField: 'abc', a: 1 }) + ).toThrowErrorMatchingInlineSnapshot(`"invalid keys \\"a\\""`); + }); + + it('does not throw an error when the data matches the schema', () => { + expect(() => decodeSchema(testSchema, { stringField: 'abc' })).not.toThrow(); + }); + + it('throws a DecodeError instance', () => { + expect(() => decodeSchema(testSchema, { a: 1 })).toThrowError( + new DecodeError([`Invalid value \"undefined\" supplied to \"stringField\"`]) + ); + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.ts new file mode 100644 index 0000000000000..e599df8361d39 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/schema_utils.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { fold } from 'fp-ts/lib/Either'; +import { pipe } from 'fp-ts/lib/pipeable'; +import * as rt from 'io-ts'; +import { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { identity } from 'fp-ts/lib/function'; +import { isObject } from 'lodash'; + +const formatErrors = (errors: rt.Errors): string[] => { + const err = errors.map((error) => { + if (error.message != null) { + return error.message; + } else { + const keyContext = error.context + .filter( + (entry) => entry.key != null && !Number.isInteger(+entry.key) && entry.key.trim() !== '' + ) + .map((entry) => entry.key) + .join('.'); + + const nameContext = error.context.find( + (entry) => entry.type != null && entry.type.name != null && entry.type.name.length > 0 + ); + + const suppliedValue = + keyContext !== '' ? keyContext : nameContext != null ? nameContext.type.name : ''; + const value = isObject(error.value) ? JSON.stringify(error.value) : error.value; + return `Invalid value "${value}" supplied to "${suppliedValue}"`; + } + }); + + return [...new Set(err)]; +}; + +export const decodeSchema = <T>(schema: rt.Type<T>, data: unknown): T => { + const onLeft = (errors: rt.Errors) => { + throw new DecodeError(formatErrors(errors)); + }; + + const onRight = (schemaType: T): T => identity(schemaType); + + return pipe(schema.decode(data), (decoded) => exactCheck(data, decoded), fold(onLeft, onRight)); +}; + +export class DecodeError extends Error { + constructor(public readonly decodeErrors: string[]) { + super(decodeErrors.join()); + this.name = this.constructor.name; + } +} + +export function isDecodeError(error: unknown): error is DecodeError { + return error instanceof DecodeError; +} diff --git a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/translations.ts b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/translations.ts index a750e30ca8ef6..9b2615acd52aa 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/translations.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/stack/opsgenie/translations.ts @@ -28,6 +28,11 @@ export const MESSAGE_IS_REQUIRED = i18n.translate( } ); +export const MESSAGE_NON_WHITESPACE = i18n.translate( + 'xpack.stackConnectors.components.opsgenie.messageNotWhitespaceForm', + { defaultMessage: 'Message must be populated with a value other than just whitespace' } +); + export const ACTION_LABEL = i18n.translate( 'xpack.stackConnectors.components.opsgenie.actionLabel', { diff --git a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.test.ts index 9dcd4f2ce2af2..80958da3f560c 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.test.ts @@ -16,7 +16,7 @@ import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.moc const logger = loggingSystemMock.create().get() as jest.Mocked<Logger>; interface ResponseError extends Error { - response?: { data: { errors: Record<string, string> } }; + response?: { data: { errors: Record<string, string>; errorMessages?: string[] } }; } jest.mock('axios'); @@ -1096,6 +1096,33 @@ describe('Jira service', () => { ]); }); + test('it should return correct issue when special characters are used', async () => { + const specialCharacterIssuesResponse = [ + { + id: '77145', + key: 'RJ-5696', + fields: { summary: '[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]' }, + }, + ]; + requestMock.mockImplementation(() => + createAxiosResponse({ + data: { + issues: specialCharacterIssuesResponse, + }, + }) + ); + + const res = await service.getIssues('[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]'); + + expect(res).toEqual([ + { + id: '77145', + key: 'RJ-5696', + title: '[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]', + }, + ]); + }); + test('it should call request with correct arguments', async () => { requestMock.mockImplementation(() => createAxiosResponse({ @@ -1115,6 +1142,32 @@ describe('Jira service', () => { }); }); + test('it should escape JQL special characters', async () => { + const specialCharacterIssuesResponse = [ + { + id: '77145', + key: 'RJ-5696', + fields: { summary: '[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]' }, + }, + ]; + requestMock.mockImplementation(() => + createAxiosResponse({ + data: { + issues: specialCharacterIssuesResponse, + }, + }) + ); + + await service.getIssues('[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]'); + expect(requestMock).toHaveBeenLastCalledWith({ + axios, + logger, + method: 'get', + configurationUtilities, + url: `https://coolsite.net/rest/api/2/search?jql=project%3D%22CK%22%20and%20summary%20~%22%5C%5C%5Bth%5C%5C!s%5C%5C%5Eis%5C%5C(%5C%5C)a%5C%5C-te%5C%5C%2Bst%5C%5C-%5C%5C%7B%5C%5C~is%5C%5C*s%5C%5C%26ue%5C%5C%3For%5C%5C%7Cand%5C%5Cbye%5C%5C%3A%5C%5C%7D%5C%5C%5D%5C%5C%7D%5C%5C%5D%22`, + }); + }); + test('it should throw an error', async () => { requestMock.mockImplementation(() => { const error: ResponseError = new Error('An error has occurred'); @@ -1127,6 +1180,25 @@ describe('Jira service', () => { ); }); + test('it should show an error from errorMessages', async () => { + requestMock.mockImplementation(() => { + const error: ResponseError = new Error('An error has occurred'); + error.response = { + data: { + errors: { + issuestypes: 'My second error', + }, + errorMessages: ['My first error'], + }, + }; + throw error; + }); + + await expect(service.getIssues('<hj>"')).rejects.toThrow( + '[Action][Jira]: Unable to get issues. Error: An error has occurred. Reason: My first error' + ); + }); + test('it should throw if the request is not a JSON', async () => { requestMock.mockImplementation(() => createAxiosResponse({ data: { id: '1' }, headers: { ['content-type']: 'text/html' } }) diff --git a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.ts b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.ts index b0d7571b302cd..771c5f25e92d6 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/service.ts @@ -31,6 +31,7 @@ import { ResponseError, UpdateIncidentParams, } from './types'; +import { escapeJqlSpecialCharacters } from './utils'; import * as i18n from './translations'; @@ -122,14 +123,14 @@ export const createExternalService = ( const { errorMessages, errors } = errorResponse; - if (errors == null) { - return 'unknown: errorResponse.errors was null'; - } - if (Array.isArray(errorMessages) && errorMessages.length > 0) { return `${errorMessages.join(', ')}`; } + if (errors == null) { + return 'unknown: errorResponse.errors was null'; + } + return Object.entries(errors).reduce((errorMessage, [, value]) => { const msg = errorMessage.length > 0 ? `${errorMessage} ${value}` : value; return msg; @@ -498,8 +499,9 @@ export const createExternalService = ( }; const getIssues = async (title: string) => { + const jqlEscapedTitle = escapeJqlSpecialCharacters(title); const query = `${searchUrl}?jql=${encodeURIComponent( - `project="${projectKey}" and summary ~"${title}"` + `project="${projectKey}" and summary ~"${jqlEscapedTitle}"` )}`; try { diff --git a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.test.ts new file mode 100644 index 0000000000000..419aa04d2b6ac --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.test.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { escapeJqlSpecialCharacters } from './utils'; + +describe('escapeJqlSpecialCharacters', () => { + it('should escape jql special characters', () => { + const str = '[th!s^is()a-te+st-{~is*s&ue?or|and\\bye:}]"}]'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual( + '\\\\[th\\\\!s\\\\^is\\\\(\\\\)a\\\\-te\\\\+st\\\\-\\\\{\\\\~is\\\\*s\\\\&ue\\\\?or\\\\|and\\\\bye\\\\:\\\\}\\\\]\\\\}\\\\]' + ); + }); + + it('should remove double quotes', () => { + const str = '"Hello"'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('Hello'); + }); + + it('should replace single quotes with backslash', () => { + const str = "Javascript's beauty is simplicity!"; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('Javascript\\\\s beauty is simplicity\\\\!'); + }); + + it('should replace single backslash with four backslash', () => { + const str = '\\I have one backslash'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('\\\\I have one backslash'); + }); + + it('should not escape other special characters', () => { + const str = '<it is, a test.>'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('<it is, a test.>'); + }); + + it('should not escape alpha numeric characters', () => { + const str = 'here is a case 29'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('here is a case 29'); + }); + + it('should not escape unicode spaces', () => { + const str = 'comm\u2000=\u2001"hello"\u3000'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('comm = hello '); + }); + + it('should not escape non ASCII characters', () => { + const str = 'Apple’s amazing idea♥'; + const escapedStr = escapeJqlSpecialCharacters(str); + expect(escapedStr).toEqual('Apple’s amazing idea♥'); + }); +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.ts b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.ts new file mode 100644 index 0000000000000..42550b1c12acc --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/cases/jira/utils.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// These characters need to be escaped per Jira's search syntax, see for more details: https://confluence.atlassian.com/jirasoftwareserver/search-syntax-for-text-fields-939938747.html +export const JQL_SPECIAL_CHARACTERS_REGEX = /[-!^+&*()[\]/{}|:?~]/; + +const DOUBLE_BACKSLASH_REGEX = '\\\\$&'; + +export const escapeJqlSpecialCharacters = (str: string) => { + return str + .replaceAll('"', '') + .replaceAll(/\\/g, '\\\\') + .replaceAll(/'/g, '\\\\') + .replaceAll(new RegExp(JQL_SPECIAL_CHARACTERS_REGEX, 'g'), DOUBLE_BACKSLASH_REGEX); +}; diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.test.ts index 4ce412e037df2..05f080d8c0b3e 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.test.ts @@ -436,7 +436,7 @@ describe('params validation', () => { "cc": Array [], "kibanaFooterLink": Object { "path": "/", - "text": "Go to Kibana", + "text": "Go to Elastic", }, "message": "this is the message", "subject": "this is a test", @@ -508,7 +508,7 @@ describe('execute()', () => { message: 'a message to you', kibanaFooterLink: { path: '/', - text: 'Go to Kibana', + text: 'Go to Elastic', }, }; @@ -542,7 +542,7 @@ describe('execute()', () => { -- - This message was sent by Kibana.", + This message was sent by Elastic.", "subject": "the subject", }, "hasAuth": true, @@ -593,7 +593,7 @@ describe('execute()', () => { -- - This message was sent by Kibana.", + This message was sent by Elastic.", "subject": "the subject", }, "hasAuth": false, @@ -644,7 +644,7 @@ describe('execute()', () => { -- - This message was sent by Kibana.", + This message was sent by Elastic.", "subject": "the subject", }, "hasAuth": false, @@ -707,7 +707,7 @@ describe('execute()', () => { message: '{{rogue}}', kibanaFooterLink: { path: '/', - text: 'Go to Kibana', + text: 'Go to Elastic', }, }; const variables = { @@ -729,7 +729,7 @@ describe('execute()', () => { ], "kibanaFooterLink": Object { "path": "/", - "text": "Go to Kibana", + "text": "Go to Elastic", }, "message": "\\\\*bold\\\\*", "subject": "*bold*", @@ -738,7 +738,7 @@ describe('execute()', () => { `); }); - test('provides a footer link to Kibana when publicBaseUrl is defined', async () => { + test('provides a footer link to Elastic when publicBaseUrl is defined', async () => { const connectorTypeWithPublicUrl = getConnectorType({ publicBaseUrl: 'https://localhost:1234/foo/bar', }); @@ -752,11 +752,11 @@ describe('execute()', () => { -- - This message was sent by Kibana. [Go to Kibana](https://localhost:1234/foo/bar)." + This message was sent by Elastic. [Go to Elastic](https://localhost:1234/foo/bar)." `); }); - test('allows to generate a deep link into Kibana when publicBaseUrl is defined', async () => { + test('allows to generate a deep link into Elastic when publicBaseUrl is defined', async () => { const connectorTypeWithPublicUrl = getConnectorType({ publicBaseUrl: 'https://localhost:1234/foo/bar', }); @@ -767,7 +767,7 @@ describe('execute()', () => { ...params, kibanaFooterLink: { path: '/my/app', - text: 'View this in Kibana', + text: 'View this in Elastic', }, }, }; @@ -781,7 +781,7 @@ describe('execute()', () => { -- - This message was sent by Kibana. [View this in Kibana](https://localhost:1234/foo/bar/my/app)." + This message was sent by Elastic. [View this in Elastic](https://localhost:1234/foo/bar/my/app)." `); }); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.ts index 4fdbc1106bb9a..e75ae66b2dd84 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/email/index.ts @@ -160,7 +160,7 @@ const ParamsSchemaProps = { path: schema.string({ defaultValue: '/' }), text: schema.string({ defaultValue: i18n.translate('xpack.stackConnectors.email.kibanaFooterLinkText', { - defaultMessage: 'Go to Kibana', + defaultMessage: 'Go to Elastic', }), }), }), @@ -396,12 +396,12 @@ function getFooterMessage({ }) { if (!publicBaseUrl) { return i18n.translate('xpack.stackConnectors.email.sentByKibanaMessage', { - defaultMessage: 'This message was sent by Kibana.', + defaultMessage: 'This message was sent by Elastic.', }); } return i18n.translate('xpack.stackConnectors.email.customViewInKibanaMessage', { - defaultMessage: 'This message was sent by Kibana. [{kibanaFooterLinkText}]({link}).', + defaultMessage: 'This message was sent by Elastic. [{kibanaFooterLinkText}]({link}).', values: { kibanaFooterLinkText: kibanaFooterLink.text, link: `${publicBaseUrl}${kibanaFooterLink.path === '/' ? '' : kibanaFooterLink.path}`, diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.test.ts index b46ddb61be135..de8aedd58257d 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.test.ts @@ -5,8 +5,12 @@ * 2.0. */ -import { CreateAlertParamsSchema } from './schema'; -import { OpsgenieCreateAlertExample, ValidCreateAlertSchema } from './test_schema'; +import { CloseAlertParamsSchema, CreateAlertParamsSchema } from './schema'; +import { + OpsgenieCloseAlertExample, + OpsgenieCreateAlertExample, + ValidCreateAlertSchema, +} from './test_schema'; describe('opsgenie schema', () => { describe('CreateAlertParamsSchema', () => { @@ -17,4 +21,13 @@ describe('opsgenie schema', () => { expect(() => CreateAlertParamsSchema.validate(testObject)).not.toThrow(); }); }); + + describe('CloseAlertParamsSchema', () => { + it.each([['OpsgenieCloseAlertExample', OpsgenieCloseAlertExample]])( + 'validates the test object [%s] correctly', + (objectName, testObject) => { + expect(() => CloseAlertParamsSchema.validate(testObject)).not.toThrow(); + } + ); + }); }); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/test_schema.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/test_schema.ts index 748423ef22381..595bad18612c7 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/test_schema.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/test_schema.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CreateAlertParams } from './types'; +import { CloseAlertParams, CreateAlertParams } from './types'; export const ValidCreateAlertSchema: CreateAlertParams = { message: 'a message', @@ -94,3 +94,14 @@ export const OpsgenieCreateAlertExample: CreateAlertParams = { entity: 'An example entity', priority: 'P1', }; + +/** + * This example is pulled from the sample curl request here: https://docs.opsgenie.com/docs/alert-api#close-alert + * with the addition of the alias field. + */ +export const OpsgenieCloseAlertExample: CloseAlertParams = { + alias: '123', + user: 'Monitoring Script', + source: 'AWS Lambda', + note: 'Action executed via Alert API', +}; diff --git a/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts b/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts index e6adc1cde8e23..ab613c9fcd370 100644 --- a/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts +++ b/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts @@ -4,7 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import DateMath from '@kbn/datemath'; import { CertResult, GetCertsParams, Ping } from '../runtime_types'; import { createEsQuery } from '../utils/es_search'; @@ -24,6 +26,10 @@ export const DEFAULT_SIZE = 20; export const DEFAULT_FROM = 'now-20m'; export const DEFAULT_TO = 'now'; +function absoluteDate(relativeDate: string) { + return DateMath.parse(relativeDate)?.valueOf() ?? relativeDate; +} + export const getCertsRequestBody = ({ pageIndex, search, @@ -79,8 +85,8 @@ export const getCertsRequestBody = ({ { range: { 'monitor.timespan': { - gte: from, - lte: to, + gte: absoluteDate(from), + lte: absoluteDate(to), }, }, }, @@ -95,7 +101,7 @@ export const getCertsRequestBody = ({ { range: { 'tls.certificate_not_valid_before': { - lte: notValidBefore, + lte: absoluteDate(notValidBefore), }, }, }, @@ -106,7 +112,7 @@ export const getCertsRequestBody = ({ { range: { 'tls.certificate_not_valid_after': { - lte: notValidAfter, + lte: absoluteDate(notValidAfter), }, }, }, diff --git a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts index f05729e29b49c..1f3c6c7a31547 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts @@ -391,6 +391,7 @@ export type MonitorManagementListResult = t.TypeOf<typeof MonitorManagementListR export const MonitorOverviewItemCodec = t.interface({ name: t.string, id: t.string, + configId: t.string, location: MonitorServiceLocationCodec, isEnabled: t.boolean, }); diff --git a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_overview_status.ts b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_overview_status.ts index 7d85b1c2278df..7f4b29a436a37 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_overview_status.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_overview_status.ts @@ -19,6 +19,7 @@ export const OverviewStatusType = t.type({ disabledCount: t.number, upConfigs: t.array(OverviewStatusMetaDataCodec), downConfigs: t.array(OverviewStatusMetaDataCodec), + enabledIds: t.array(t.string), }); export type OverviewStatus = t.TypeOf<typeof OverviewStatusType>; diff --git a/x-pack/plugins/synthetics/common/runtime_types/ping/histogram.ts b/x-pack/plugins/synthetics/common/runtime_types/ping/histogram.ts index 1cceaaed89974..127fd7edf75e2 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/ping/histogram.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/ping/histogram.ts @@ -24,6 +24,7 @@ export interface GetPingHistogramParams { monitorId?: string; bucketSize?: string; query?: string; + timeZone: string; } export interface HistogramResult { diff --git a/x-pack/plugins/synthetics/common/runtime_types/ping/synthetics.ts b/x-pack/plugins/synthetics/common/runtime_types/ping/synthetics.ts index 6f2264d66f9b1..ae5dd0046200d 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/ping/synthetics.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/ping/synthetics.ts @@ -61,6 +61,7 @@ export const SyntheticsDataType = t.partial({ export const JourneyStepType = t.intersection([ t.partial({ + config_id: t.string, monitor: t.partial({ duration: t.type({ us: t.number, diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/overview_sorting.journey.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/overview_sorting.journey.ts index 27c6355de3c09..93aa36d725b89 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/overview_sorting.journey.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/overview_sorting.journey.ts @@ -65,7 +65,6 @@ journey('Overview Sorting', async ({ page, params }) => { await page.waitForSelector(`[data-test-subj="syntheticsOverviewGridItem"]`); await page.click('[data-test-subj="syntheticsOverviewSortButton"]'); await page.click('button:has-text("Z -> A")'); - await page.waitForSelector('text=Loading'); await page.waitForSelector(`text=${testMonitor1}`); await page.waitForSelector(`text=${testMonitor2}`); await page.waitForSelector(`text=${testMonitor3}`); @@ -85,7 +84,6 @@ journey('Overview Sorting', async ({ page, params }) => { await page.waitForSelector(`[data-test-subj="syntheticsOverviewGridItem"]`); await page.click('[data-test-subj="syntheticsOverviewSortButton"]'); await page.click('button:has-text("Last modified")'); - await page.waitForSelector('text=Loading'); await page.waitForSelector(`text=${testMonitor1}`); await page.waitForSelector(`text=${testMonitor2}`); await page.waitForSelector(`text=${testMonitor3}`); @@ -99,14 +97,12 @@ journey('Overview Sorting', async ({ page, params }) => { expect(await correctFirstMonitor.count()).toBe(1); expect(await correctSecondMonitor.count()).toBe(1); expect(await correctThirdMonitor.count()).toBe(1); - await page.waitForTimeout(30000); }); step('sort last updated desc', async () => { await page.waitForSelector(`[data-test-subj="syntheticsOverviewGridItem"]`); await page.click('[data-test-subj="syntheticsOverviewSortButton"]'); await page.click('button:has-text("Oldest first")'); - await page.waitForSelector('text=Loading'); await page.waitForSelector(`text=${testMonitor1}`); await page.waitForSelector(`text=${testMonitor2}`); await page.waitForSelector(`text=${testMonitor3}`); @@ -120,7 +116,6 @@ journey('Overview Sorting', async ({ page, params }) => { expect(await correctFirstMonitor.count()).toBe(1); expect(await correctSecondMonitor.count()).toBe(1); expect(await correctThirdMonitor.count()).toBe(1); - await page.waitForTimeout(30000); }); step('delete monitors', async () => { diff --git a/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts b/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts index 81139421817e9..edc05addd6633 100644 --- a/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts +++ b/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts @@ -7,10 +7,10 @@ import { syntheticsEditMonitorLocatorID } from '@kbn/observability-plugin/common'; -async function navigate({ monitorId }: { monitorId: string }) { +async function navigate({ configId }: { configId: string }) { return { app: 'synthetics', - path: `/edit-monitor/${monitorId}`, + path: `/edit-monitor/${configId}`, state: {}, }; } diff --git a/x-pack/plugins/synthetics/public/apps/locators/monitor_detail.ts b/x-pack/plugins/synthetics/public/apps/locators/monitor_detail.ts index f363358356754..de26b30e22022 100644 --- a/x-pack/plugins/synthetics/public/apps/locators/monitor_detail.ts +++ b/x-pack/plugins/synthetics/public/apps/locators/monitor_detail.ts @@ -7,11 +7,11 @@ import { syntheticsMonitorDetailLocatorID } from '@kbn/observability-plugin/common'; -async function navigate({ monitorId, locationId }: { monitorId: string; locationId?: string }) { +async function navigate({ configId, locationId }: { configId: string; locationId?: string }) { const locationUrlQueryParam = locationId ? `?locationId=${locationId}` : ''; return { app: 'synthetics', - path: `/monitor/${monitorId}${locationUrlQueryParam}`, + path: `/monitor/${configId}${locationUrlQueryParam}`, state: {}, }; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/view_errors.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/view_errors.tsx new file mode 100644 index 0000000000000..0ca0b19a4f58e --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/view_errors.tsx @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { useSyntheticsSettingsContext } from '../../../contexts'; + +export const ErrorsLink = ({ disabled }: { disabled?: boolean }) => { + const { basePath } = useSyntheticsSettingsContext(); + + return ( + <EuiToolTip content={VIEW_ERRORS}> + <EuiButtonIcon + aria-label={VIEW_ERRORS} + href={`${basePath}/app/synthetics/errors`} + iconType="inspect" + isDisabled={disabled} + /> + </EuiToolTip> + ); +}; + +const VIEW_ERRORS = i18n.translate('xpack.synthetics.monitorSummary.viewErrors', { + defaultMessage: 'View errors', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/getting_started_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/getting_started_page.tsx index a334d6ec1a514..abcdd2c405465 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/getting_started_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/getting_started_page.tsx @@ -51,16 +51,6 @@ export const GettingStartedPage = () => { <SimpleMonitorForm /> </> } - footer={ - <> - <EuiText size="s" color="subdued" className="eui-displayInlineBlock"> - {FOR_MORE_INFO_LABEL} - </EuiText>{' '} - <EuiLink href="#" target="_blank" className="eui-displayInline"> - {GETTING_STARTED_LABEL} - </EuiLink> - </> - } /> </Wrapper> ); @@ -75,10 +65,6 @@ const Wrapper = styled.div` } `; -const FOR_MORE_INFO_LABEL = i18n.translate('xpack.synthetics.gettingStarted.forMoreInfo', { - defaultMessage: 'For more information, read our', -}); - const CREATE_SINGLE_PAGE_LABEL = i18n.translate( 'xpack.synthetics.gettingStarted.createSinglePageLabel', { @@ -86,13 +72,6 @@ const CREATE_SINGLE_PAGE_LABEL = i18n.translate( } ); -const GETTING_STARTED_LABEL = i18n.translate( - 'xpack.synthetics.gettingStarted.gettingStartedLabel', - { - defaultMessage: 'Getting Started Guide', - } -); - const SELECT_DIFFERENT_MONITOR = i18n.translate( 'xpack.synthetics.gettingStarted.gettingStartedLabel.selectDifferentMonitor', { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx index b1c2fd4ea2e5f..2790a6ed0768d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/form/submit.tsx @@ -118,7 +118,7 @@ export const ActionBar = () => { </EuiFlexGroup> {isDeleteModalVisible && ( <DeleteMonitor - id={monitorId} + configId={monitorId} name={monitorObject?.attributes?.[ConfigKey.NAME] ?? ''} reloadPage={() => { history.push(MONITORS_ROUTE); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx index 10de9f5a4c629..94ff55a5295bd 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx @@ -11,18 +11,24 @@ import { EuiLink, EuiIcon } from '@elastic/eui'; import { InPortal } from 'react-reverse-portal'; import { MonitorDetailsLinkPortalNode } from './portals'; -export const MonitorDetailsLinkPortal = ({ name, id }: { name: string; id: string }) => { +export const MonitorDetailsLinkPortal = ({ + name, + configId, +}: { + name: string; + configId: string; +}) => { return ( <InPortal node={MonitorDetailsLinkPortalNode}> - <MonitorDetailsLink name={name} id={id} /> + <MonitorDetailsLink name={name} configId={configId} /> </InPortal> ); }; -export const MonitorDetailsLink = ({ name, id }: { name: string; id: string }) => { +export const MonitorDetailsLink = ({ name, configId }: { name: string; configId: string }) => { const history = useHistory(); const href = history.createHref({ - pathname: `monitor/${id}`, + pathname: `monitor/${configId}`, }); return ( <EuiLink href={href}> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx index 53057a9dbba5c..ff179d947bb2d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx @@ -10,6 +10,7 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { useParams } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import { useTrackPageview, useFetcher } from '@kbn/observability-plugin/public'; +import { ConfigKey } from '../../../../../common/runtime_types'; import { getServiceLocations } from '../../state'; import { ServiceAllowedWrapper } from '../common/wrappers/service_allowed_wrapper'; import { MonitorSteps } from './steps'; @@ -37,7 +38,10 @@ const MonitorEditPage: React.FC = () => { return data && !loading && !error ? ( <MonitorForm defaultValues={data?.attributes}> <MonitorSteps stepMap={EDIT_MONITOR_STEPS} isEditFlow={true} /> - <MonitorDetailsLinkPortal id={data?.id} name={data?.attributes.name} /> + <MonitorDetailsLinkPortal + configId={data?.attributes[ConfigKey.CONFIG_ID]} + name={data?.attributes.name} + /> </MonitorForm> ) : ( <EuiLoadingSpinner /> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx index 2966aee8e53b7..713c3d04ba65c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx @@ -76,7 +76,7 @@ export const MonitorDetailsLocation: React.FC = () => { onClick={() => { closeLocationList(); services.application!.navigateToApp(PLUGIN.SYNTHETICS_PLUGIN_ID, { - path: `/monitor/${monitor.id}?locationId=${fullLocation.id}`, + path: `/monitor/${monitor.config_id}?locationId=${fullLocation.id}`, }); }} > diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx index e2f0b2396364d..f6a2dcfdd2b41 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_errors/monitor_errors.tsx @@ -14,6 +14,7 @@ import { } from '@elastic/eui'; import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; +import { useMonitorQueryId } from '../hooks/use_monitor_query_id'; import { FailedTestsCount } from './failed_tests_count'; import { useGetUrlParams } from '../../../hooks'; import { SyntheticsDatePicker } from '../../common/date_picker/synthetics_date_picker'; @@ -31,6 +32,8 @@ export const MonitorErrors = () => { [dateRangeEnd, dateRangeStart] ); + const monitorId = useMonitorQueryId(); + return ( <> <SyntheticsDatePicker fullWidth={true} /> @@ -43,7 +46,13 @@ export const MonitorErrors = () => { </EuiTitle> <EuiFlexGroup> <EuiFlexItem> - <MonitorErrorsCount to={dateRangeEnd} from={dateRangeStart} /> + {monitorId && ( + <MonitorErrorsCount + to={dateRangeEnd} + from={dateRangeStart} + monitorId={[monitorId]} + /> + )} </EuiFlexItem> <EuiFlexItem> <FailedTestsCount to={dateRangeEnd} from={dateRangeStart} /> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx index be6d3b4d47e1f..845c8def36356 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_history/monitor_history.tsx @@ -22,6 +22,7 @@ import { AvailabilitySparklines } from '../monitor_summary/availability_sparklin import { DurationSparklines } from '../monitor_summary/duration_sparklines'; import { MonitorCompleteSparklines } from '../monitor_summary/monitor_complete_sparklines'; import { MonitorStatusPanel } from '../monitor_status/monitor_status_panel'; +import { useMonitorQueryId } from '../hooks/use_monitor_query_id'; const STATS_WIDTH_SINGLE_COLUMN_THRESHOLD = 360; // ✨ determined by trial and error @@ -39,6 +40,8 @@ export const MonitorHistory = () => { [updateUrlParams] ); + const monitorId = useMonitorQueryId(); + return ( <EuiFlexGroup direction="column" gutterSize="m"> <EuiFlexItem> @@ -76,10 +79,22 @@ export const MonitorHistory = () => { <EuiFlexItem> <EuiFlexGroup gutterSize="xs"> <EuiFlexItem> - <MonitorErrorsCount from={dateRangeStart} to={dateRangeEnd} /> + {monitorId && ( + <MonitorErrorsCount + from={dateRangeStart} + to={dateRangeEnd} + monitorId={[monitorId]} + /> + )} </EuiFlexItem> <EuiFlexItem> - <MonitorErrorSparklines from={dateRangeStart} to={dateRangeEnd} /> + {monitorId && ( + <MonitorErrorSparklines + from={dateRangeStart} + to={dateRangeEnd} + monitorId={[monitorId]} + /> + )} </EuiFlexItem> </EuiFlexGroup> </EuiFlexItem> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_details_panel.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_details_panel.tsx index c5e39ca9b5fce..bfe3f49938987 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_details_panel.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_details_panel.tsx @@ -36,15 +36,15 @@ export const MonitorDetailsPanel = () => { const { euiTheme } = useEuiTheme(); const { latestPing } = useMonitorLatestPing(); - const { monitorId } = useParams<{ monitorId: string }>(); + const { monitorId: configId } = useParams<{ monitorId: string }>(); const dispatch = useDispatch(); const { monitor, loading } = useSelectedMonitor(); if ( - (latestPing && latestPing?.config_id !== monitorId) || - (monitor && monitor[ConfigKey.CONFIG_ID] !== monitorId) + (latestPing && latestPing?.config_id !== configId) || + (monitor && monitor[ConfigKey.CONFIG_ID] !== configId) ) { return <EuiLoadingContent lines={6} />; } @@ -69,10 +69,10 @@ export const MonitorDetailsPanel = () => { {monitor && ( <MonitorEnabled initialLoading={loading} - id={monitorId} + configId={configId} monitor={monitor} reloadPage={() => { - dispatch(getMonitorAction.get({ monitorId })); + dispatch(getMonitorAction.get({ monitorId: configId })); }} /> )} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx index 6d96e8e39e966..6f2781a53d37e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx @@ -6,8 +6,7 @@ */ import { useKibana } from '@kbn/kibana-react-plugin/public'; -import React from 'react'; -import { useParams } from 'react-router-dom'; +import React, { useMemo } from 'react'; import { useEuiTheme } from '@elastic/eui'; import { ClientPluginsStart } from '../../../../../plugin'; import { useSelectedLocation } from '../hooks/use_selected_location'; @@ -15,18 +14,19 @@ import { useSelectedLocation } from '../hooks/use_selected_location'; interface Props { from: string; to: string; + monitorId: string[]; } -export const MonitorErrorSparklines = (props: Props) => { +export const MonitorErrorSparklines = ({ from, to, monitorId }: Props) => { const { observability } = useKibana<ClientPluginsStart>().services; const { ExploratoryViewEmbeddable } = observability; - const { monitorId } = useParams<{ monitorId: string }>(); - const { euiTheme } = useEuiTheme(); const selectedLocation = useSelectedLocation(); + const time = useMemo(() => ({ from, to }), [from, to]); + if (!selectedLocation) { return null; } @@ -39,10 +39,10 @@ export const MonitorErrorSparklines = (props: Props) => { hideTicks={true} attributes={[ { + time, seriesType: 'area', - time: props, reportDefinitions: { - 'monitor.id': [monitorId], + 'monitor.id': monitorId, 'observer.geo.name': [selectedLocation?.label], }, dataType: 'synthetics', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx index 8ebc48ea38da9..d8cf1dc057084 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx @@ -6,26 +6,26 @@ */ import { useKibana } from '@kbn/kibana-react-plugin/public'; -import React from 'react'; +import React, { useMemo } from 'react'; import { ReportTypes } from '@kbn/observability-plugin/public'; import { ClientPluginsStart } from '../../../../../plugin'; -import { useMonitorQueryId } from '../hooks/use_monitor_query_id'; import { useSelectedLocation } from '../hooks/use_selected_location'; interface MonitorErrorsCountProps { from: string; to: string; + monitorId: string[]; } -export const MonitorErrorsCount = (props: MonitorErrorsCountProps) => { +export const MonitorErrorsCount = ({ monitorId, from, to }: MonitorErrorsCountProps) => { const { observability } = useKibana<ClientPluginsStart>().services; const { ExploratoryViewEmbeddable } = observability; - const monitorId = useMonitorQueryId(); - const selectedLocation = useSelectedLocation(); + const time = useMemo(() => ({ from, to }), [from, to]); + if (!selectedLocation || !monitorId) { return null; } @@ -37,9 +37,9 @@ export const MonitorErrorsCount = (props: MonitorErrorsCountProps) => { reportType={ReportTypes.SINGLE_METRIC} attributes={[ { - time: props, + time, reportDefinitions: { - 'monitor.id': [monitorId], + 'monitor.id': monitorId, 'observer.geo.name': [selectedLocation?.label], }, dataType: 'synthetics', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx index 32d4a17d0fb26..ba655148047b9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx @@ -18,6 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import { LoadWhenInView } from '@kbn/observability-plugin/public'; +import { useMonitorQueryId } from '../hooks/use_monitor_query_id'; import { useEarliestStartDate } from '../hooks/use_earliest_start_data'; import { MonitorErrorSparklines } from './monitor_error_sparklines'; import { MonitorStatusPanel } from '../monitor_status/monitor_status_panel'; @@ -36,6 +37,8 @@ export const MonitorSummary = () => { const { from, loading } = useEarliestStartDate(); const to = 'now'; + const monitorId = useMonitorQueryId(); + if (loading) { return <EuiLoadingSpinner size="xl" />; } @@ -77,10 +80,12 @@ export const MonitorSummary = () => { <DurationSparklines from={from} to={to} /> </EuiFlexItem> <EuiFlexItem> - <MonitorErrorsCount from={from} to={to} /> + {monitorId && <MonitorErrorsCount from={from} to={to} monitorId={[monitorId]} />} </EuiFlexItem> <EuiFlexItem> - <MonitorErrorSparklines from={from} to={to} /> + {monitorId && ( + <MonitorErrorSparklines from={from} to={to} monitorId={[monitorId]} /> + )} </EuiFlexItem> </EuiFlexGroup> </EuiPanel> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_edit_monitor_locator.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_edit_monitor_locator.ts index fde26d1935f77..bb531a1dbe9be 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_edit_monitor_locator.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_edit_monitor_locator.ts @@ -10,7 +10,7 @@ import { useEffect, useState } from 'react'; import { syntheticsEditMonitorLocatorID } from '@kbn/observability-plugin/common'; import { useSyntheticsStartPlugins } from '../../../contexts'; -export function useEditMonitorLocator({ monitorId }: { monitorId: string }) { +export function useEditMonitorLocator({ configId }: { configId: string }) { const [editUrl, setEditUrl] = useState<string | undefined>(undefined); const locator = useSyntheticsStartPlugins()?.share?.url.locators.get( syntheticsEditMonitorLocatorID @@ -19,12 +19,12 @@ export function useEditMonitorLocator({ monitorId }: { monitorId: string }) { useEffect(() => { async function generateUrl() { const url = await locator?.getUrl({ - monitorId, + configId, }); setEditUrl(url); } generateUrl(); - }, [locator, monitorId]); + }, [locator, configId]); return editUrl; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_detail_locator.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_detail_locator.ts index fc526f26b885a..d1b75ef5e0ca3 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_detail_locator.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_detail_locator.ts @@ -10,10 +10,10 @@ import { syntheticsMonitorDetailLocatorID } from '@kbn/observability-plugin/comm import { useSyntheticsStartPlugins } from '../../../contexts'; export function useMonitorDetailLocator({ - monitorId, + configId, locationId, }: { - monitorId: string; + configId: string; locationId?: string; }) { const [monitorUrl, setMonitorUrl] = useState<string | undefined>(undefined); @@ -24,13 +24,13 @@ export function useMonitorDetailLocator({ useEffect(() => { async function generateUrl() { const url = await locator?.getUrl({ - monitorId, + configId, locationId, }); setMonitorUrl(url); } generateUrl(); - }, [locator, monitorId, locationId]); + }, [locator, configId, locationId]); return monitorUrl; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/actions.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/actions.tsx index 274d0a9d28317..e697d74aaf5df 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/actions.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/actions.tsx @@ -15,7 +15,7 @@ import * as labels from './labels'; interface Props { euiTheme: EuiThemeComputed; - id: string; + configId: string; name: string; canEditSynthetics: boolean; isProjectMonitor?: boolean; @@ -24,7 +24,7 @@ interface Props { export const Actions = ({ euiTheme, - id, + configId, name, reloadPage, canEditSynthetics, @@ -96,7 +96,7 @@ export const Actions = ({ key="xpack.synthetics.editMonitor" icon="pencil" onClick={closePopover} - href={`${basePath}/app/synthetics/edit-monitor/${id}`} + href={`${basePath}/app/synthetics/edit-monitor/${configId}`} disabled={!canEditSynthetics} > {labels.EDIT_LABEL} @@ -115,7 +115,7 @@ export const Actions = ({ return ( <> <EuiPopover - id={`xpack.synthetics.${id}`} + id={`xpack.synthetics.${configId}`} button={menuButton} isOpen={isPopoverOpen} closePopover={closePopover} @@ -127,7 +127,7 @@ export const Actions = ({ {isDeleteModalVisible && ( <DeleteMonitor - id={id} + configId={configId} name={name} reloadPage={reloadPage} isProjectMonitor={isProjectMonitor} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/columns.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/columns.tsx index e847fdd5c2400..ad62c16c1ff69 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/columns.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/columns.tsx @@ -137,7 +137,7 @@ export function getMonitorListColumns({ }), render: (_enabled: boolean, monitor: EncryptedSyntheticsSavedMonitor) => ( <MonitorEnabled - id={monitor.id} + configId={monitor[ConfigKey.CONFIG_ID]} monitor={monitor} reloadPage={reloadPage} isSwitchable={!loading} @@ -152,7 +152,7 @@ export function getMonitorListColumns({ render: (fields: EncryptedSyntheticsSavedMonitor) => ( <Actions euiTheme={euiTheme} - id={fields.id} + configId={fields[ConfigKey.CONFIG_ID]} name={fields[ConfigKey.NAME]} canEditSynthetics={canEditSynthetics} reloadPage={reloadPage} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/delete_monitor.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/delete_monitor.tsx index 4dd4e5a0b19a1..9448c91931b0d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/delete_monitor.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/delete_monitor.tsx @@ -17,13 +17,13 @@ import { kibanaService } from '../../../../../../utils/kibana_service'; import * as labels from './labels'; export const DeleteMonitor = ({ - id, + configId, name, reloadPage, isProjectMonitor, setIsDeleteModalVisible, }: { - id: string; + configId: string; name: string; reloadPage: () => void; isProjectMonitor?: boolean; @@ -37,9 +37,9 @@ export const DeleteMonitor = ({ const { status: monitorDeleteStatus } = useFetcher(() => { if (isDeleting) { - return fetchDeleteMonitor({ id }); + return fetchDeleteMonitor({ id: configId }); } - }, [id, isDeleting]); + }, [configId, isDeleting]); useEffect(() => { if (!isDeleting) { @@ -63,7 +63,7 @@ export const DeleteMonitor = ({ {i18n.translate( 'xpack.synthetics.monitorManagement.monitorDeleteSuccessMessage.name', { - defaultMessage: 'Monitor {name} deleted successfully.', + defaultMessage: 'Deleted "{name}"', values: { name }, } )} @@ -113,7 +113,7 @@ export const DeleteMonitor = ({ export const PROJECT_MONITOR_TITLE = i18n.translate( 'xpack.synthetics.monitorManagement.monitorList.disclaimer.title', { - defaultMessage: "Deleting this monitor will not remove it from Project's source", + defaultMessage: 'Deleting this monitor will not remove it from the project source', } ); @@ -121,7 +121,7 @@ export const ProjectMonitorDisclaimer = () => { return ( <FormattedMessage id="xpack.synthetics.monitorManagement.monitorList.disclaimer.label" - defaultMessage="Make sure to remove this monitor from Project's source, otherwise it will be recreated the next time you use the push command. For more information, {docsLink} for deleting project monitors." + defaultMessage="To delete it completely and stop it from being pushed again in the future, delete it from the project source. {docsLink}." values={{ docsLink: ( <EuiLink @@ -129,7 +129,7 @@ export const ProjectMonitorDisclaimer = () => { target="_blank" > {i18n.translate('xpack.synthetics.monitorManagement.projectDelete.docsLink', { - defaultMessage: 'read our docs', + defaultMessage: 'Learn more', })} </EuiLink> ), diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_details_link.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_details_link.tsx index 701fd0d0580ed..4b0b1b2d53a3a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_details_link.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_details_link.tsx @@ -32,7 +32,7 @@ export const MonitorDetailsLink = ({ lastSelectedLocationId && monitorHasLocation ? lastSelectedLocationId : firstMonitorLocationId; const monitorDetailLinkUrl = useMonitorDetailLocator({ - monitorId: monitor[ConfigKey.CONFIG_ID], + configId: monitor[ConfigKey.CONFIG_ID], locationId, }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_enabled.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_enabled.tsx index 61e6f9534692e..863353eba26b6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_enabled.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_list_table/monitor_enabled.tsx @@ -15,7 +15,7 @@ import * as labels from './labels'; import { useMonitorEnableHandler } from '../../../../hooks/use_monitor_enable_handler'; interface Props { - id: string; + configId: string; monitor: EncryptedSyntheticsMonitor; reloadPage: () => void; initialLoading?: boolean; @@ -23,7 +23,7 @@ interface Props { } export const MonitorEnabled = ({ - id, + configId, monitor, reloadPage, initialLoading = false, @@ -41,7 +41,7 @@ export const MonitorEnabled = ({ }, [monitorName]); const { isEnabled, updateMonitorEnabledState, status } = useMonitorEnableHandler({ - id, + configId, isEnabled: monitor[ConfigKey.ENABLED], reloadPage, labels: statusLabels, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx index cad8a173a1ba5..29147eca0b602 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.test.tsx @@ -27,6 +27,7 @@ describe('ActionsPopover', () => { isEnabled: true, name: 'Monitor 1', id: 'somelongstring', + configId: '1lkjelre', }; }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx index 6433f1ac5cb0c..e097096d4960d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/actions_popover.tsx @@ -87,10 +87,10 @@ export function ActionsPopover({ const locationName = useLocationName({ locationId: monitor.location.id }); const detailUrl = useMonitorDetailLocator({ - monitorId: monitor.id, + configId: monitor.configId, locationId: monitor.location.id, }); - const editUrl = useEditMonitorLocator({ monitorId: monitor.id }); + const editUrl = useEditMonitorLocator({ configId: monitor.configId }); const labels = useMemo( () => ({ @@ -101,7 +101,7 @@ export function ActionsPopover({ [monitor.name] ); const { status, isEnabled, updateMonitorEnabledState } = useMonitorEnableHandler({ - id: monitor.id, + configId: monitor.configId, isEnabled: monitor.isEnabled, labels, }); @@ -125,7 +125,9 @@ export function ActionsPopover({ disabled: !locationName, onClick: () => { if (locationName) { - dispatch(setFlyoutConfig({ monitorId: monitor.id, location: locationName })); + dispatch( + setFlyoutConfig({ configId: monitor.configId, location: locationName, id: monitor.id }) + ); setIsPopoverOpen(false); } }, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx index 0b3c1cf701278..fc981113d94d0 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx @@ -36,12 +36,12 @@ export const MetricItem = ({ data: Array<{ x: number; y: number }>; averageDuration: number; loaded: boolean; - onClick: (id: string, location: string) => void; + onClick: (params: { id: string; configId: string; location: string }) => void; }) => { const [isMouseOver, setIsMouseOver] = useState(false); const [isPopoverOpen, setIsPopoverOpen] = useState(false); const locationName = useLocationName({ locationId: monitor.location?.id }); - const { locations } = useStatusByLocation(monitor.id); + const { locations } = useStatusByLocation(monitor.configId); const ping = locations.find((loc) => loc.observer?.geo?.name === locationName); const theme = useTheme(); @@ -67,11 +67,15 @@ export const MetricItem = ({ > <Chart> <Settings - onElementClick={() => monitor.id && locationName && onClick(monitor.id, locationName)} + onElementClick={() => + monitor.configId && + locationName && + onClick({ configId: monitor.configId, id: monitor.id, location: locationName }) + } baseTheme={DARK_THEME} /> <Metric - id={`${monitor.id}-${monitor.location?.id}`} + id={`${monitor.configId}-${monitor.location?.id}`} data={[ [ { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.test.tsx index 0c9e0c418118c..28ebed3063ee2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.test.tsx @@ -50,6 +50,7 @@ describe('Monitor Detail Flyout', () => { const onCloseMock = jest.fn(); const { getByLabelText } = render( <MonitorDetailFlyout + configId="test-id" id="test-id" location="US East" onClose={onCloseMock} @@ -72,6 +73,7 @@ describe('Monitor Detail Flyout', () => { const { getByText } = render( <MonitorDetailFlyout + configId="test-id" id="test-id" location="US East" onClose={jest.fn()} @@ -90,6 +92,7 @@ describe('Monitor Detail Flyout', () => { const { getByRole } = render( <MonitorDetailFlyout + configId="test-id" id="test-id" location="US East" onClose={jest.fn()} @@ -124,6 +127,7 @@ describe('Monitor Detail Flyout', () => { const { getByRole, getByText, getAllByRole } = render( <MonitorDetailFlyout + configId="test-id" id="test-id" location="US East" onClose={jest.fn()} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx index 6e0e15e6cdda2..c7a3e6c9e6f78 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx @@ -30,6 +30,7 @@ import { EuiPanel, EuiPopover, EuiSpacer, + EuiText, EuiTitle, useIsWithinMaxBreakpoint, } from '@elastic/eui'; @@ -61,11 +62,12 @@ import { fetchSyntheticsMonitor } from '../../../../state/overview/api'; import { MonitorStatus } from '../../../common/components/monitor_status'; interface Props { + configId: string; id: string; location: string; onClose: () => void; onEnabledChange: () => void; - onLocationChange: (id: string, location: string) => void; + onLocationChange: (params: { configId: string; id: string; location: string }) => void; currentDurationChartFrom?: string; currentDurationChartTo?: string; previousDurationChartFrom?: string; @@ -162,14 +164,14 @@ function DetailFlyoutDurationChart({ function LocationSelect({ locations, currentLocation, - id, + configId, setCurrentLocation, monitor, onEnabledChange, }: { locations: ReturnType<typeof useStatusByLocation>['locations']; currentLocation: string; - id: string; + configId: string; monitor: EncryptedSyntheticsMonitor; onEnabledChange: () => void; setCurrentLocation: (location: string) => void; @@ -235,7 +237,7 @@ function LocationSelect({ <EuiDescriptionList align="left" compressed> <EuiDescriptionListTitle>{ENABLED_ITEM_TEXT}</EuiDescriptionListTitle> <EuiDescriptionListDescription> - <MonitorEnabled id={id} monitor={monitor} reloadPage={onEnabledChange} /> + <MonitorEnabled configId={configId} monitor={monitor} reloadPage={onEnabledChange} /> </EuiDescriptionListDescription> </EuiDescriptionList> </EuiFlexItem> @@ -254,7 +256,7 @@ function LoadingState() { } export function MonitorDetailFlyout(props: Props) { - const { id, onLocationChange } = props; + const { id, configId, onLocationChange } = props; const { data: { monitors }, } = useSelector(selectOverviewState); @@ -265,12 +267,12 @@ export function MonitorDetailFlyout(props: Props) { }, [id, monitors]); const setLocation = useCallback( - (location: string) => onLocationChange(id, location), - [id, onLocationChange] + (location: string) => onLocationChange({ id, configId, location }), + [id, configId, onLocationChange] ); const detailLink = useMonitorDetailLocator({ - monitorId: id, + configId: id, }); const { @@ -278,14 +280,14 @@ export function MonitorDetailFlyout(props: Props) { error, status, }: FetcherResult<SavedObject<SyntheticsMonitor>> = useFetcher( - () => fetchSyntheticsMonitor(id), - [id] + () => fetchSyntheticsMonitor(configId), + [configId] ); const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false); - const monitorDetail = useMonitorDetail(id, props.location); - const locationStatuses = useStatusByLocation(id); + const monitorDetail = useMonitorDetail(configId, props.location); + const locationStatuses = useStatusByLocation(configId); const locations = locationStatuses.locations?.filter((l: any) => !!l?.observer?.geo?.name) ?? []; const isOverlay = useIsWithinMaxBreakpoint('xl'); @@ -328,7 +330,7 @@ export function MonitorDetailFlyout(props: Props) { currentLocation={props.location} locations={locations} setCurrentLocation={setLocation} - id={id} + configId={configId} monitor={monitorSavedObject.attributes} onEnabledChange={props.onEnabledChange} /> @@ -347,20 +349,24 @@ export function MonitorDetailFlyout(props: Props) { compressed listItems={ [ + monitorDetail.data?.url?.full + ? { + title: URL_HEADER_TEXT, + description: ( + <EuiLink external href={monitorDetail.data.url.full}> + {monitorDetail.data.url.full} + </EuiLink> + ), + } + : undefined, { - title: URL_HEADER_TEXT, - description: monitorDetail.data?.url?.full ? ( - <EuiLink external href={monitorDetail.data.url.full}> - {monitorDetail.data.url.full} - </EuiLink> + title: LAST_RUN_HEADER_TEXT, + description: monitorDetail.data?.timestamp ? ( + <Time timestamp={monitorDetail.data.timestamp} /> ) : ( - '' + <EuiText color="subdued">--</EuiText> ), }, - { - title: LAST_RUN_HEADER_TEXT, - description: <Time timestamp={monitorDetail.data?.timestamp} />, - }, { title: LAST_MODIFIED_HEADER_TEXT, description: <Time timestamp={monitorSavedObject.updated_at} />, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_errors/overview_errors.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_errors/overview_errors.tsx new file mode 100644 index 0000000000000..a4ae1fc95bcb8 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_errors/overview_errors.tsx @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; +import React from 'react'; +import { useSelector } from 'react-redux'; +import { i18n } from '@kbn/i18n'; +import { ErrorsLink } from '../../../../common/links/view_errors'; +import { MonitorErrorSparklines } from '../../../../monitor_details/monitor_summary/monitor_error_sparklines'; +import { MonitorErrorsCount } from '../../../../monitor_details/monitor_summary/monitor_errors_count'; +import { selectOverviewStatus } from '../../../../../state'; + +export function OverviewErrors() { + const { status } = useSelector(selectOverviewStatus); + + return ( + <EuiPanel style={{ width: 500 }} hasShadow={false} hasBorder> + <EuiTitle size="xs"> + <h3>{headingText}</h3> + </EuiTitle> + <EuiSpacer size="s" /> + <EuiFlexGroup gutterSize="xl"> + <EuiFlexItem grow={false}> + <MonitorErrorsCount from="now-6h/h" to="now" monitorId={status?.enabledIds ?? []} /> + </EuiFlexItem> + <EuiFlexItem grow={true}> + <MonitorErrorSparklines from="now-6h/h" to="now" monitorId={status?.enabledIds ?? []} /> + </EuiFlexItem> + <EuiFlexItem grow={false} css={{ alignSelf: 'center' }}> + <ErrorsLink disabled={true} /> + </EuiFlexItem> + </EuiFlexGroup> + </EuiPanel> + ); +} + +const headingText = i18n.translate('xpack.synthetics.overview.errors.headingText', { + defaultMessage: 'Last 6 hours', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx index 64178aa9aa146..c9fbc00b8e590 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx @@ -18,6 +18,7 @@ describe('Overview Grid', () => { for (let i = 0; i < 20; i++) { data.push({ id: `${i}`, + configId: `${i}`, location: { id: 'us_central', isServiceManaged: true, @@ -27,6 +28,7 @@ describe('Overview Grid', () => { }); data.push({ id: `${i}`, + configId: `${i}`, location: { id: 'us_east', isServiceManaged: true, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx index 649cb1048af35..18cb013c8b14b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx @@ -58,7 +58,8 @@ export const OverviewGrid = memo(() => { const dispatch = useDispatch(); const setFlyoutConfigCallback = useCallback( - (monitorId: string, location: string) => dispatch(setFlyoutConfig({ monitorId, location })), + ({ configId, id, location }: { configId: string; id: string; location: string }) => + dispatch(setFlyoutConfig({ configId, id, location })), [dispatch] ); const hideFlyout = useCallback(() => dispatch(setFlyoutConfig(null)), [dispatch]); @@ -153,9 +154,10 @@ export const OverviewGrid = memo(() => { </EuiFlexItem> )} </EuiFlexGroup> - {flyoutConfig?.monitorId && flyoutConfig?.location && ( + {flyoutConfig?.configId && flyoutConfig?.location && ( <MonitorDetailFlyout - id={flyoutConfig.monitorId} + configId={flyoutConfig.configId} + id={flyoutConfig.id} location={flyoutConfig.location} onClose={hideFlyout} onEnabledChange={forceRefreshCallback} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx index 4265ac57b1432..3770c09236711 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx @@ -14,7 +14,7 @@ export const OverviewGridItem = ({ onClick, }: { monitor: MonitorOverviewItem; - onClick: (id: string, location: string) => void; + onClick: (params: { id: string; configId: string; location: string }) => void; }) => { const { data, loading, averageDuration } = useLast50DurationChart({ locationId: monitor.location?.id, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx index 743a95018e86b..0b7e2e0716440 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx @@ -94,11 +94,11 @@ export function OverviewStatus() { }, [status, statusFilter]); return ( - <EuiPanel> + <EuiPanel hasShadow={false} hasBorder> <EuiTitle size="xs"> <h3>{headingText}</h3> </EuiTitle> - <EuiSpacer size="s" /> + <EuiSpacer size="m" /> <EuiFlexGroup gutterSize="xl"> <EuiFlexItem grow={false}> <EuiStat diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx index 3ebefd9dc30f7..eca465273e8cf 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx @@ -29,6 +29,7 @@ import { OverviewStatus } from './overview/overview_status'; import { QuickFilters } from './overview/quick_filters'; import { SearchField } from '../common/search_field'; import { NoMonitorsFound } from '../common/no_monitors_found'; +import { OverviewErrors } from './overview/overview_errors/overview_errors'; export const OverviewPage: React.FC = () => { useTrackPageview({ app: 'synthetics', path: 'overview' }); @@ -115,10 +116,13 @@ export const OverviewPage: React.FC = () => { <EuiSpacer /> {Boolean(!monitorsLoaded || syntheticsMonitors?.length > 0) && ( <> - <EuiFlexGroup gutterSize="none"> + <EuiFlexGroup gutterSize="m"> <EuiFlexItem grow={false}> <OverviewStatus /> </EuiFlexItem> + <EuiFlexItem grow={false}> + <OverviewErrors /> + </EuiFlexItem> </EuiFlexGroup> <EuiSpacer /> <OverviewGrid /> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx index 03ae9f79cd8d8..780f150d8bf4c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx @@ -53,9 +53,9 @@ export const StepDetailPage = () => { return ( <> - {data?.details?.journey && ( + {data?.details?.journey?.config_id && ( <MonitorDetailsLinkPortal - id={data.details.journey.monitor.id} + configId={data.details.journey.config_id} name={data.details.journey.monitor.name!} /> )} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts index 09141ab5a053b..7e16b8c190de8 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useSelectedMonitor } from '../../monitor_details/hooks/use_selected_monitor'; import { useBreadcrumbs } from '../../../hooks/use_breadcrumbs'; +import { ConfigKey } from '../../../../../../common/runtime_types'; import { MONITOR_ROUTE, MONITORS_ROUTE } from '../../../../../../common/constants'; import { PLUGIN } from '../../../../../../common/constants/plugin'; @@ -26,7 +27,10 @@ export const useTestRunDetailsBreadcrumbs = ( }, { text: monitor?.name ?? '', - href: `${appPath}${MONITOR_ROUTE.replace(':monitorId', monitor?.id ?? '')}`, + href: `${appPath}${MONITOR_ROUTE.replace( + ':monitorId', + monitor?.[ConfigKey.CONFIG_ID] ?? '' + )}`, }, ...(extraCrumbs ?? []), ]); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_detail.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_detail.ts index 63a9f556f4b2b..119f44a642c26 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_detail.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_detail.ts @@ -11,7 +11,7 @@ import { SYNTHETICS_INDEX_PATTERN } from '../../../../common/constants'; import { Ping } from '../../../../common/runtime_types'; export const useMonitorDetail = ( - monitorId: string, + configId: string, location: string ): { data?: Ping; loading?: boolean } => { const params = { @@ -23,7 +23,7 @@ export const useMonitorDetail = ( filter: [ { term: { - config_id: monitorId, + config_id: configId, }, }, { @@ -44,7 +44,7 @@ export const useMonitorDetail = ( }; const { data: result, loading } = useEsSearch<Ping & { '@timestamp': string }, SearchRequest>( params, - [monitorId, location], + [configId, location], { name: 'getMonitorStatusByLocation', } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_enable_handler.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_enable_handler.tsx index 0049fcdad8fad..2f90f6cd70b8b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_enable_handler.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_monitor_enable_handler.tsx @@ -18,18 +18,18 @@ export interface EnableStateMonitorLabels { } export function useMonitorEnableHandler({ - id, + configId, reloadPage, labels, }: { - id: string; + configId: string; isEnabled: boolean; reloadPage?: () => void; labels: EnableStateMonitorLabels; }) { const dispatch = useDispatch(); const upsertStatuses = useSelector(selectMonitorUpsertStatuses); - const status: FETCH_STATUS | undefined = upsertStatuses[id]?.status; + const status: FETCH_STATUS | undefined = upsertStatuses[configId]?.status; const [nextEnabled, setNextEnabled] = useState<boolean | null>(null); useEffect(() => { @@ -42,7 +42,7 @@ export function useMonitorEnableHandler({ (enabled: boolean) => { dispatch( fetchUpsertMonitorAction({ - id, + id: configId, monitor: { [ConfigKey.ENABLED]: enabled }, success: { message: enabled ? labels.enabledSuccessLabel : labels.disabledSuccessLabel, @@ -63,7 +63,7 @@ export function useMonitorEnableHandler({ }, [ dispatch, - id, + configId, labels.disabledSuccessLabel, labels.enabledSuccessLabel, labels.failureLabel, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/effects.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/effects.ts index b4a2435ec05fa..315e15b095d07 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/effects.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/effects.ts @@ -6,6 +6,7 @@ */ import { takeLatest, takeLeading } from 'redux-saga/effects'; +import { fetchUpsertSuccessAction } from '../monitor_list'; import { fetchEffectFactory } from '../utils/fetch_effect'; import { fetchMonitorOverviewAction, @@ -28,7 +29,7 @@ export function* fetchMonitorOverviewEffect() { export function* fetchOverviewStatusEffect() { yield takeLatest( - [fetchOverviewStatusAction.get, quietFetchOverviewStatusAction.get], + [fetchOverviewStatusAction.get, quietFetchOverviewStatusAction.get, fetchUpsertSuccessAction], fetchEffectFactory( fetchOverviewStatus, fetchOverviewStatusAction.success, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/models.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/models.ts index cc3bb35322a76..00669b83c98d7 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/models.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/models.ts @@ -19,7 +19,8 @@ export interface MonitorOverviewPageState { } export type MonitorOverviewFlyoutConfig = { - monitorId: string; + configId: string; + id: string; location: string; } | null; diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_overview_fetcher.ts b/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_overview_fetcher.ts index d8756715b8181..03923e3034e05 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_overview_fetcher.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_overview_fetcher.ts @@ -7,6 +7,7 @@ import { CoreStart } from '@kbn/core/public'; import { UptimeFetchDataResponse, FetchDataParams } from '@kbn/observability-plugin/public'; +import moment from 'moment-timezone'; import { fetchIndexStatus, fetchPingHistogram, fetchSnapshotCount } from '../state/api'; import { kibanaService } from '../state/kibana_service'; @@ -14,6 +15,7 @@ async function fetchUptimeOverviewData({ absoluteTime, relativeTime, intervalString, + timeZone, }: FetchDataParams) { const start = new Date(absoluteTime.start).toISOString(); const end = new Date(absoluteTime.end).toISOString(); @@ -26,6 +28,7 @@ async function fetchUptimeOverviewData({ dateStart: start, dateEnd: end, bucketSize: intervalString, + timeZone: timeZone ?? moment.tz.guess(), }); const response: UptimeFetchDataResponse = { diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.test.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.test.tsx index 345d23ff22b45..b29921e6176cf 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.test.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.test.tsx @@ -28,6 +28,7 @@ describe('PingHistogram component', () => { const props: PingHistogramComponentProps = { absoluteStartDate: 1548697920000, absoluteEndDate: 1548700920000, + timeZone: 'UTC', data: { histogram: [ { x: 1581068329000, downCount: 6, upCount: 33, y: 1 }, diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.tsx index 1a7ae71482621..2ee3dafb6d597 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/ping_histogram.tsx @@ -17,24 +17,20 @@ import { ElementClickListener, ScaleType, } from '@elastic/charts'; -import { EuiTitle, EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui'; +import { EuiTitle, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useContext } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import numeral from '@elastic/numeral'; import moment from 'moment'; -import { useSelector } from 'react-redux'; -import { createExploratoryViewUrl } from '@kbn/observability-plugin/public'; import { getChartDateLabel } from '../../../lib/helper'; import { ChartWrapper } from './chart_wrapper'; import { UptimeThemeContext } from '../../../contexts'; import { HistogramResult } from '../../../../../common/runtime_types'; -import { useMonitorId, useUrlParams } from '../../../hooks'; +import { useUrlParams } from '../../../hooks'; import { ChartEmptyState } from './chart_empty_state'; import { getDateRangeFromChartElement } from './utils'; import { STATUS_DOWN_LABEL, STATUS_UP_LABEL } from '../translations'; -import { useUptimeSettingsContext } from '../../../contexts/uptime_settings_context'; -import { monitorStatusSelector } from '../../../state/selectors'; export interface PingHistogramComponentProps { /** @@ -54,6 +50,8 @@ export interface PingHistogramComponentProps { data: HistogramResult | null; loading?: boolean; + + timeZone: string; } interface BarPoint { @@ -68,24 +66,17 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ data, loading = false, height, + timeZone, }) => { const { colors: { danger, gray }, chartTheme, } = useContext(UptimeThemeContext); - const monitorId = useMonitorId(); - - const selectedMonitor = useSelector(monitorStatusSelector); - - const { basePath } = useUptimeSettingsContext(); - - const [getUrlParams, updateUrlParams] = useUrlParams(); - - const { dateRangeStart, dateRangeEnd } = getUrlParams(); + const [_getUrlParams, updateUrlParams] = useUrlParams(); let content: JSX.Element | undefined; - if (!data?.histogram?.length) { + if (!data?.histogram?.length && !loading) { content = ( <ChartEmptyState title={i18n.translate('xpack.synthetics.snapshot.noDataTitle', { @@ -97,7 +88,7 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ /> ); } else { - const { histogram, minInterval } = data; + const { histogram, minInterval } = data ?? {}; const onBrushEnd: BrushEndListener = ({ x }) => { if (!x) { @@ -112,13 +103,13 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ const onBarClicked: ElementClickListener = ([elementData]) => { updateUrlParams( - getDateRangeFromChartElement(elementData as XYChartElementEvent, minInterval) + getDateRangeFromChartElement(elementData as XYChartElementEvent, minInterval!) ); }; const barData: BarPoint[] = []; - histogram.forEach(({ x, upCount, downCount }) => { + histogram?.forEach(({ x, upCount, downCount }) => { barData.push( { x, y: downCount ?? 0, type: STATUS_DOWN_LABEL }, { x, y: upCount ?? 0, type: STATUS_UP_LABEL } @@ -181,7 +172,7 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ })} stackAccessors={['x']} splitSeriesAccessors={['type']} - timeZone="local" + timeZone={timeZone} xAccessor="x" xScaleType={ScaleType.Time} yAccessors={['y']} @@ -192,29 +183,6 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ ); } - const pingHistogramExploratoryViewLink = createExploratoryViewUrl( - { - reportType: 'kpi-over-time', - allSeries: [ - { - name: `${monitorId}-pings`, - dataType: 'synthetics', - selectedMetricField: 'summary.up', - time: { from: dateRangeStart, to: dateRangeEnd }, - reportDefinitions: { - 'monitor.name': - monitorId && selectedMonitor?.monitor?.name - ? [selectedMonitor.monitor.name] - : ['ALL_VALUES'], - }, - }, - ], - }, - basePath - ); - - const showAnalyzeButton = false; - return ( <> <EuiFlexGroup> @@ -228,16 +196,6 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({ </h2> </EuiTitle> </EuiFlexItem> - {showAnalyzeButton && ( - <EuiFlexItem grow={false}> - <EuiButton size="s" href={pingHistogramExploratoryViewLink}> - <FormattedMessage - id="xpack.synthetics.pingHistogram.analyze" - defaultMessage="Analyze" - /> - </EuiButton> - </EuiFlexItem> - )} </EuiFlexGroup> {content} </> diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_histogram/ping_histogram_container.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_histogram/ping_histogram_container.tsx index cd60dcf725074..985b485000985 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_histogram/ping_histogram_container.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_histogram/ping_histogram_container.tsx @@ -7,6 +7,7 @@ import React, { useContext, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; +import { useTimeZone } from '@kbn/observability-plugin/public'; import { PingHistogramComponent } from '../../common/charts'; import { getPingHistogram } from '../../../state/actions'; import { esKuerySelector, selectPingHistogram } from '../../../state/selectors'; @@ -28,7 +29,7 @@ const Container: React.FC<Props & ResponsiveWrapperProps> = ({ height }) => { dateRangeStart: dateStart, dateRangeEnd: dateEnd, } = useGetUrlParams(); - const filterCheck = useOverviewFilterCheck(); + const { filterCheck, pending } = useOverviewFilterCheck(); const dispatch = useDispatch(); const monitorId = useMonitorId(); @@ -39,23 +40,44 @@ const Container: React.FC<Props & ResponsiveWrapperProps> = ({ height }) => { const { loading, pingHistogram: data } = useSelector(selectPingHistogram); + const timeZone = useTimeZone(); + useEffect(() => { if (monitorId) { // we don't need filter check on monitor details page, where we have monitorId defined - dispatch(getPingHistogram.get({ monitorId, dateStart, dateEnd, query, filters: esKuery })); + dispatch( + getPingHistogram.get({ + monitorId, + dateStart, + dateEnd, + query, + filters: esKuery, + timeZone, + }) + ); } else { filterCheck(() => - dispatch(getPingHistogram.get({ monitorId, dateStart, dateEnd, query, filters: esKuery })) + dispatch( + getPingHistogram.get({ + monitorId, + dateStart, + dateEnd, + query, + filters: esKuery, + timeZone, + }) + ) ); } - }, [filterCheck, dateStart, dateEnd, monitorId, lastRefresh, esKuery, dispatch, query]); + }, [filterCheck, dateStart, dateEnd, monitorId, lastRefresh, esKuery, dispatch, query, timeZone]); return ( <PingHistogramComponent data={data} absoluteStartDate={absoluteDateRangeStart} absoluteEndDate={absoluteDateRangeEnd} height={height} - loading={loading} + loading={loading || pending} + timeZone={timeZone} /> ); }; diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_list/delete_monitor.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_list/delete_monitor.tsx index 68925a72f78d4..9f984c450dd27 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_list/delete_monitor.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_list/delete_monitor.tsx @@ -78,7 +78,7 @@ export const DeleteMonitor = ({ {i18n.translate( 'xpack.synthetics.monitorManagement.monitorDeleteSuccessMessage.name', { - defaultMessage: 'Monitor {name} deleted successfully.', + defaultMessage: 'Deleted "{name}"', values: { name }, } )} diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list.tsx index e0cc20d963a85..a61193d05a778 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list.tsx @@ -44,6 +44,7 @@ interface Props extends MonitorListProps { setPageSize: (val: number) => void; monitorList: MonitorList; refreshedMonitorIds: string[]; + isPending?: boolean; } export const MonitorListComponent: ({ @@ -52,12 +53,14 @@ export const MonitorListComponent: ({ pageSize, refreshedMonitorIds, setPageSize, + isPending, }: Props) => any = ({ filters, refreshedMonitorIds = [], monitorList: { list, error, loading }, pageSize, setPageSize, + isPending, }) => { const [expandedDrawerIds, updateExpandedDrawerIds] = useState<string[]>([]); const currentBreakpoint = useCurrentEuiBreakpoint(); @@ -247,13 +250,15 @@ export const MonitorListComponent: ({ <EuiBasicTable aria-label={labels.getDescriptionLabel(items.length)} error={error?.body?.message || error?.message} - loading={loading} + loading={loading || isPending} isExpandable={true} hasActions={true} itemId="monitor_id" itemIdToExpandedRowMap={getExpandedRowMap()} items={items} - noItemsMessage={<NoItemsMessage loading={loading} filters={filters} />} + noItemsMessage={ + <NoItemsMessage loading={Boolean(loading || isPending)} filters={filters} /> + } columns={columns} tableLayout={'auto'} rowProps={ diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list_container.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list_container.tsx index d01f9365a7ac0..ab4c165cd478a 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list_container.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/monitor_list/monitor_list_container.tsx @@ -33,7 +33,7 @@ const getPageSizeValue = () => { export const MonitorList: React.FC<MonitorListProps> = (props) => { const filters = useSelector(esKuerySelector); - const filterCheck = useOverviewFilterCheck(); + const { filterCheck, pending } = useOverviewFilterCheck(); const [pageSize, setPageSize] = useState<number>(getPageSizeValue); @@ -101,6 +101,7 @@ export const MonitorList: React.FC<MonitorListProps> = (props) => { pageSize={pageSize} setPageSize={setPageSize} refreshedMonitorIds={refreshedMonitorIds} + isPending={pending} /> ); }; diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/zip_url_deprecation/index.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/zip_url_deprecation/index.tsx index f5d841fc73637..3d1b3ce0719de 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/zip_url_deprecation/index.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/zip_url_deprecation/index.tsx @@ -9,18 +9,25 @@ import React, { useState, useEffect } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiCallOut, EuiLink, EuiButton, EuiFlexItem, EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import { useFetcher } from '@kbn/observability-plugin/public'; +import { useSelector } from 'react-redux'; import { getHasZipUrlMonitors } from '../../../state/api/has_zip_url_monitors'; import { getDocLinks } from '../../../../kibana_services'; +import { monitorListSelector } from '../../../state/selectors'; export const ZIP_URL_DEPRECATION_SESSION_STORAGE_KEY = 'SYNTHETICS_ZIP_URL_DEPRECATION_HAS_BEEN_DISMISSED'; export const ZipUrlDeprecation = () => { + const monitorList = useSelector(monitorListSelector); const noticeHasBeenDismissed = window.sessionStorage.getItem(ZIP_URL_DEPRECATION_SESSION_STORAGE_KEY) === 'true'; const { data, loading } = useFetcher(() => { - return getHasZipUrlMonitors(); - }, []); + // load it when list is loaded + if (!noticeHasBeenDismissed && monitorList.isLoaded) { + return getHasZipUrlMonitors(); + } + return undefined; + }, [monitorList.isLoaded]); const hasZipUrlMonitors = !loading && data && data.hasZipUrlMonitors; const [shouldShowNotice, setShouldShowNotice] = useState( Boolean(hasZipUrlMonitors && !noticeHasBeenDismissed) diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.test.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.test.tsx index 4a356986c7245..853d35fde6eab 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.test.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.test.tsx @@ -45,7 +45,7 @@ describe('useOverviewFilterCheck', () => { } = renderHook(() => useOverviewFilterCheck(), { wrapper: getWrapper() }); const fn = jest.fn(); - current(fn); + current.filterCheck(fn); expect(fn).toHaveBeenCalledTimes(1); }); @@ -57,7 +57,7 @@ describe('useOverviewFilterCheck', () => { }); const fn = jest.fn(); - current(fn); + current.filterCheck(fn); expect(fn).not.toHaveBeenCalled(); }); @@ -70,7 +70,7 @@ describe('useOverviewFilterCheck', () => { }); const fn = jest.fn(); - current(fn); + current.filterCheck(fn); expect(fn).toHaveBeenCalledTimes(1); }); @@ -83,7 +83,7 @@ describe('useOverviewFilterCheck', () => { }); const fn = jest.fn(); - current(fn); + current.filterCheck(fn); expect(fn).not.toHaveBeenCalledTimes(1); }); @@ -96,7 +96,7 @@ describe('useOverviewFilterCheck', () => { }); const fn = jest.fn(); - current(fn); + current.filterCheck(fn); expect(fn).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.ts b/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.ts index e19505e2503c0..26398b6ffcaeb 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/hooks/use_overview_filter_check.ts @@ -42,12 +42,15 @@ export function useOverviewFilterCheck() { */ const shouldRun = !!filters || !hasFilters(search); - return useCallback( - (fn: () => void) => { - if (shouldRun) { - fn(); - } - }, - [shouldRun] - ); + return { + pending: !shouldRun, + filterCheck: useCallback( + (fn: () => void) => { + if (shouldRun) { + fn(); + } + }, + [shouldRun] + ), + }; } diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/state/api/ping.ts b/x-pack/plugins/synthetics/public/legacy_uptime/state/api/ping.ts index 969102a8d77c6..9a979179293cc 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/state/api/ping.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/state/api/ping.ts @@ -28,6 +28,7 @@ export const fetchPingHistogram: APIFn<GetPingHistogramParams, HistogramResult> filters, bucketSize, query, + timeZone, }) => { const queryParams = { dateStart, @@ -36,6 +37,7 @@ export const fetchPingHistogram: APIFn<GetPingHistogramParams, HistogramResult> filters, bucketSize, query, + timeZone, }; return await apiService.get(API_URLS.PING_HISTOGRAM, queryParams); diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/state/reducers/monitor_list.ts b/x-pack/plugins/synthetics/public/legacy_uptime/state/reducers/monitor_list.ts index 4f9411221745f..3ab99166615d8 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/state/reducers/monitor_list.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/state/reducers/monitor_list.ts @@ -21,6 +21,7 @@ import type { TestNowResponse } from '../api'; export interface MonitorList { loading: boolean; + isLoaded?: boolean; refreshedMonitorIds?: string[]; isUpdating?: string[]; list: MonitorSummariesResult; @@ -34,6 +35,7 @@ export const initialState: MonitorList = { summaries: [], }, loading: false, + isLoaded: false, refreshedMonitorIds: [], }; @@ -54,6 +56,7 @@ export const monitorListReducer = handleActions<MonitorList, Payload>( ) => ({ ...state, loading: false, + isLoaded: true, error: undefined, list: { ...action.payload }, }), @@ -64,6 +67,7 @@ export const monitorListReducer = handleActions<MonitorList, Payload>( ...state, error: action.payload, loading: false, + isLoaded: true, }), [String(setUpdatingMonitorId)]: (state: MonitorList, action: Action<string>) => ({ ...state, diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/lib.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/lib.ts index aebe13affddd4..1018ae75cea48 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/lib.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/lib.ts @@ -55,6 +55,7 @@ export function createUptimeESClient({ }) { return { baseESClient: esClient, + heartbeatIndices: '', async search<DocumentSource extends unknown, TParams extends estypes.SearchRequest>( params: TParams, operationName?: string, @@ -62,11 +63,16 @@ export function createUptimeESClient({ ): Promise<{ body: ESSearchResponse<DocumentSource, TParams> }> { let res: any; let esError: any; - const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( - savedObjectsClient! - ); - const esParams = { index: index ?? dynamicSettings!.heartbeatIndices, ...params }; + if (!this.heartbeatIndices) { + const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( + savedObjectsClient! + ); + + this.heartbeatIndices = dynamicSettings?.heartbeatIndices || ''; + } + + const esParams = { index: index ?? this.heartbeatIndices, ...params }; const startTime = process.hrtime(); const startTimeNow = Date.now(); @@ -110,11 +116,15 @@ export function createUptimeESClient({ let res: any; let esError: any; - const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( - savedObjectsClient! - ); + if (!this.heartbeatIndices) { + const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( + savedObjectsClient! + ); + + this.heartbeatIndices = dynamicSettings?.heartbeatIndices || ''; + } - const esParams = { index: dynamicSettings!.heartbeatIndices, ...params }; + const esParams = { index: this.heartbeatIndices, ...params }; const startTime = process.hrtime(); try { @@ -132,7 +142,7 @@ export function createUptimeESClient({ throw esError; } - return { result: res, indices: dynamicSettings.heartbeatIndices }; + return { result: res, indices: this.heartbeatIndices }; }, getSavedObjectsClient() { return savedObjectsClient; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts index b4dce0e2421fd..e70a8fc49da05 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts @@ -5,6 +5,8 @@ * 2.0. */ +import DateMath from '@kbn/datemath'; +import moment from 'moment'; import { getCerts } from './get_certs'; import { getUptimeESMockClient } from './test_helpers'; @@ -82,6 +84,9 @@ describe('getCerts', () => { }); it('parses query result and returns expected values', async () => { + const dateMathSpy = jest.spyOn(DateMath, 'parse'); + + dateMathSpy.mockReturnValue(moment(10000)); const { esClient, uptimeEsClient } = getUptimeESMockClient(); esClient.search.mockResponseOnce({ @@ -178,8 +183,8 @@ describe('getCerts', () => { Object { "range": Object { "monitor.timespan": Object { - "gte": "now-2d", - "lte": "now+1h", + "gte": 10000, + "lte": 10000, }, }, }, @@ -190,7 +195,7 @@ describe('getCerts', () => { Object { "range": Object { "tls.certificate_not_valid_after": Object { - "lte": "now+100d", + "lte": 10000, }, }, }, diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts index 4476f4f9e14e7..820aa1a699229 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts @@ -70,6 +70,7 @@ describe('getPingHistogram', () => { uptimeEsClient, dateStart: 'now-15m', dateEnd: 'now', + timeZone: 'UTC', }); expect(mockEsClient.search).toHaveBeenCalledTimes(1); @@ -92,6 +93,7 @@ describe('getPingHistogram', () => { dateStart: 'now-15m', dateEnd: 'now', filters: '', + timeZone: 'UTC', }); expect(mockEsClient.search).toHaveBeenCalledTimes(1); @@ -157,6 +159,7 @@ describe('getPingHistogram', () => { dateEnd: 'now', filters: JSON.stringify(searchFilter), monitorId: undefined, + timeZone: 'UTC', }); expect(mockEsClient.search).toHaveBeenCalledTimes(1); @@ -212,6 +215,7 @@ describe('getPingHistogram', () => { dateStart: 'now-15m', dateEnd: 'now', filters, + timeZone: 'UTC', }); expect(mockEsClient.search).toHaveBeenCalledTimes(1); @@ -232,7 +236,12 @@ describe('getPingHistogram', () => { }, } as any); - const result = await getPingHistogram({ uptimeEsClient, dateStart: 'now-15m', dateEnd: 'now' }); + const result = await getPingHistogram({ + uptimeEsClient, + dateStart: 'now-15m', + dateEnd: 'now', + timeZone: 'UTC', + }); expect(result.histogram).toEqual([]); }); @@ -251,7 +260,12 @@ describe('getPingHistogram', () => { }, } as any); - const result = await getPingHistogram({ uptimeEsClient, dateStart: 'now-15m', dateEnd: 'now' }); + const result = await getPingHistogram({ + uptimeEsClient, + dateStart: 'now-15m', + dateEnd: 'now', + timeZone: 'UTC', + }); expect(result.histogram).toEqual([]); }); diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.ts index d4399ac7854b5..36747b850b493 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.ts @@ -24,6 +24,7 @@ export const getPingHistogram: UMElasticsearchQueryFn< monitorId, bucketSize, query, + timeZone, }) => { const boolFilters = filters ? JSON.parse(filters) : null; const additionalFilters = []; @@ -73,6 +74,7 @@ export const getPingHistogram: UMElasticsearchQueryFn< field: '@timestamp', fixed_interval: bucketSize || minInterval + 'ms', missing: '0', + time_zone: timeZone, }, aggs: { down: { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_monitor.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_monitor.ts index ab25be0f3f3d6..a228e4047e4e7 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_monitor.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_monitor.ts @@ -109,6 +109,9 @@ export const getSyntheticsMonitorSavedObjectType = ( custom_heartbeat_id: { type: 'keyword', }, + id: { + type: 'keyword', + }, tags: { type: 'keyword', fields: { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/routes/pings/get_ping_histogram.ts b/x-pack/plugins/synthetics/server/legacy_uptime/routes/pings/get_ping_histogram.ts index bb7053095d9f5..1781e6fc9a617 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/routes/pings/get_ping_histogram.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/routes/pings/get_ping_histogram.ts @@ -21,10 +21,11 @@ export const createGetPingHistogramRoute: UMRestApiRouteFactory = (libs: UMServe filters: schema.maybe(schema.string()), bucketSize: schema.maybe(schema.string()), query: schema.maybe(schema.string()), + timeZone: schema.string(), }), }, handler: async ({ uptimeEsClient, request }): Promise<any> => { - const { dateStart, dateEnd, monitorId, filters, bucketSize, query } = request.query; + const { dateStart, dateEnd, monitorId, filters, bucketSize, query, timeZone } = request.query; return await libs.requests.getPingHistogram({ uptimeEsClient, @@ -34,6 +35,7 @@ export const createGetPingHistogramRoute: UMRestApiRouteFactory = (libs: UMServe filters, bucketSize, query, + timeZone, }); }, }); diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts index 54b3b0bda0217..72c24a7886ca2 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts @@ -104,14 +104,16 @@ export const getSyntheticsMonitorOverviewRoute: SyntheticsRestApiRouteFactory = /* collect all monitor ids for use * in filtering overview requests */ result.saved_objects.forEach((monitor) => { - const id = monitor.id; - allMonitorIds.push(id); + const id = monitor.attributes[ConfigKey.MONITOR_QUERY_ID]; + const configId = monitor.attributes[ConfigKey.CONFIG_ID]; + allMonitorIds.push(configId); - /* for reach location, add a config item */ + /* for each location, add a config item */ const locations = monitor.attributes[ConfigKey.LOCATIONS]; locations.forEach((location) => { const config = { id, + configId, name: monitor.attributes[ConfigKey.NAME], location, isEnabled: monitor.attributes[ConfigKey.ENABLED], diff --git a/x-pack/plugins/synthetics/server/routes/status/current_status.test.ts b/x-pack/plugins/synthetics/server/routes/status/current_status.test.ts index 3a03d96f14db7..09e985ec0ad70 100644 --- a/x-pack/plugins/synthetics/server/routes/status/current_status.test.ts +++ b/x-pack/plugins/synthetics/server/routes/status/current_status.test.ts @@ -166,6 +166,7 @@ describe('current status route', () => { ); expect(await queryMonitorStatus(uptimeEsClient, 3, 140000, ['id1', 'id2'])).toEqual({ down: 1, + enabledIds: ['id1', 'id2'], up: 2, upConfigs: [ { @@ -302,6 +303,7 @@ describe('current status route', () => { */ expect(await queryMonitorStatus(uptimeEsClient, 10000, 2500, ['id1', 'id2'])).toEqual({ down: 1, + enabledIds: ['id1', 'id2'], up: 2, upConfigs: [ { diff --git a/x-pack/plugins/synthetics/server/routes/status/current_status.ts b/x-pack/plugins/synthetics/server/routes/status/current_status.ts index 637990a017f88..b62377930bace 100644 --- a/x-pack/plugins/synthetics/server/routes/status/current_status.ts +++ b/x-pack/plugins/synthetics/server/routes/status/current_status.ts @@ -35,7 +35,7 @@ export async function queryMonitorStatus( esClient: UptimeEsClient, maxLocations: number, maxPeriod: number, - ids: Array<string | undefined> + ids: string[] ): Promise<Omit<OverviewStatus, 'disabledCount'>> { const idSize = Math.trunc(DEFAULT_MAX_ES_BUCKET_SIZE / maxLocations); const pageCount = Math.ceil(ids.length / idSize); @@ -135,7 +135,7 @@ export async function queryMonitorStatus( }); }); } - return { up, down, upConfigs, downConfigs }; + return { up, down, upConfigs, downConfigs, enabledIds: ids }; } /** @@ -150,9 +150,9 @@ export async function getStatus( syntheticsMonitorClient: SyntheticsMonitorClient, params: MonitorsQuery ) { - const enabledIds: Array<string | undefined> = []; const { query } = params; let monitors; + const enabledIds: string[] = []; let disabledCount = 0; let page = 1; let maxPeriod = 0; @@ -195,6 +195,7 @@ export async function getStatus( ); return { + enabledIds, disabledCount, up, down, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index aac5833d5c8f6..85184f9c7164a 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -30882,8 +30882,6 @@ "xpack.synthetics.fleetIntegration.assets.name": "Moniteurs", "xpack.synthetics.gettingStarted.createSingle.description": " pour démarrer avec le monitoring Elastic Synthetics", "xpack.synthetics.gettingStarted.createSinglePageLabel": "Créer un moniteur de navigateur de page unique", - "xpack.synthetics.gettingStarted.forMoreInfo": "Pour en savoir plus, lisez notre", - "xpack.synthetics.gettingStarted.gettingStartedLabel": "guide de premiers pas", "xpack.synthetics.gettingStarted.gettingStartedLabel.selectDifferentMonitor": "sélectionner un autre type de moniteur", "xpack.synthetics.gettingStarted.orLabel": "Ou", "xpack.synthetics.inspectButtonText": "Inspecter", @@ -31234,7 +31232,6 @@ "xpack.synthetics.page_header.manageMonitors": "Gestion des moniteurs", "xpack.synthetics.page_header.settingsLink": "Paramètres", "xpack.synthetics.page_header.settingsLink.label": "Accédez à la page de paramètres Uptime", - "xpack.synthetics.pingHistogram.analyze": "Analyser", "xpack.synthetics.pingList.checkHistoryTitle": "Historique", "xpack.synthetics.pingList.collapseRow": "Réduire", "xpack.synthetics.pingList.columns.failedStep": "Étape ayant échoué", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 17a8f65ba1b52..e371777dc9f67 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -30858,8 +30858,6 @@ "xpack.synthetics.fleetIntegration.assets.name": "監視", "xpack.synthetics.gettingStarted.createSingle.description": " Elastic Synthetics Monitoringの開始", "xpack.synthetics.gettingStarted.createSinglePageLabel": "1ページのブラウザーモニターを作成", - "xpack.synthetics.gettingStarted.forMoreInfo": "詳細については、お読みください", - "xpack.synthetics.gettingStarted.gettingStartedLabel": "入門ガイド", "xpack.synthetics.gettingStarted.gettingStartedLabel.selectDifferentMonitor": "別の監視タイプを選択", "xpack.synthetics.gettingStarted.orLabel": "OR", "xpack.synthetics.inspectButtonText": "検査", @@ -31210,7 +31208,6 @@ "xpack.synthetics.page_header.manageMonitors": "モニター管理", "xpack.synthetics.page_header.settingsLink": "設定", "xpack.synthetics.page_header.settingsLink.label": "アップタイム設定ページに移動", - "xpack.synthetics.pingHistogram.analyze": "分析", "xpack.synthetics.pingList.checkHistoryTitle": "履歴", "xpack.synthetics.pingList.collapseRow": "縮小", "xpack.synthetics.pingList.columns.failedStep": "失敗したステップ", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3161deee62372..3abbec5db2bda 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -30893,8 +30893,6 @@ "xpack.synthetics.fleetIntegration.assets.name": "监测", "xpack.synthetics.gettingStarted.createSingle.description": " 要开始使用 Elastic Synthetics 监测", "xpack.synthetics.gettingStarted.createSinglePageLabel": "创建单个页面浏览器监测", - "xpack.synthetics.gettingStarted.forMoreInfo": "有关更多信息,请阅读我们的", - "xpack.synthetics.gettingStarted.gettingStartedLabel": "入门指南", "xpack.synthetics.gettingStarted.gettingStartedLabel.selectDifferentMonitor": "选择不同的监测类型", "xpack.synthetics.gettingStarted.orLabel": "或", "xpack.synthetics.inspectButtonText": "检查", @@ -31245,7 +31243,6 @@ "xpack.synthetics.page_header.manageMonitors": "监测管理", "xpack.synthetics.page_header.settingsLink": "设置", "xpack.synthetics.page_header.settingsLink.label": "导航到 Uptime 设置页面", - "xpack.synthetics.pingHistogram.analyze": "分析", "xpack.synthetics.pingList.checkHistoryTitle": "历史记录", "xpack.synthetics.pingList.collapseRow": "折叠", "xpack.synthetics.pingList.columns.failedStep": "失败的步骤", diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/ms_exchage_server_simulation.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/ms_exchage_server_simulation.ts index b4de0deb47ffb..eba9d41dff32b 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/ms_exchage_server_simulation.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/ms_exchage_server_simulation.ts @@ -43,8 +43,8 @@ export function initPlugin(router: IRouter, path: string) { cc: null, bcc: null, subject: 'email-subject', - html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`, - text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).', + html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`, + text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).', headers: {}, }, }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_disable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_disable.ts new file mode 100644 index 0000000000000..381bb0edd401d --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_disable.ts @@ -0,0 +1,558 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { UserAtSpaceScenarios, SuperuserAtSpace1 } from '../../../scenarios'; +import { FtrProviderContext } from '../../../../common/ftr_provider_context'; +import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib'; + +const getDefaultRules = (response: any) => ({ + id: response.body.rules[0].id, + notifyWhen: 'onThrottleInterval', + enabled: false, + name: 'abc', + tags: ['foo'], + consumer: 'alertsFixture', + throttle: '1m', + alertTypeId: 'test.noop', + apiKeyOwner: response.body.rules[0].apiKeyOwner, + createdBy: 'elastic', + updatedBy: response.body.rules[0].updatedBy, + muteAll: false, + mutedInstanceIds: [], + schedule: { interval: '1m' }, + actions: [], + params: {}, + snoozeSchedule: [], + updatedAt: response.body.rules[0].updatedAt, + createdAt: response.body.rules[0].createdAt, + scheduledTaskId: response.body.rules[0].scheduledTaskId, + executionStatus: response.body.rules[0].executionStatus, + monitoring: response.body.rules[0].monitoring, + ...(response.body.rules[0].nextRun ? { nextRun: response.body.rules[0].nextRun } : {}), + ...(response.body.rules[0].lastRun ? { lastRun: response.body.rules[0].lastRun } : {}), +}); + +const getDefaultResponse = (response: any) => ({ + total: 1, + rules: [getDefaultRules(response)], + errors: [], +}); + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertest'); + const es = getService('es'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + describe('bulkDisableRules', () => { + const objectRemover = new ObjectRemover(supertest); + + after(() => objectRemover.removeAll()); + + const getScheduledTask = async (id: string) => { + return await es.get({ + id: `task:${id}`, + index: '.kibana_task_manager', + }); + }; + + for (const scenario of UserAtSpaceScenarios) { + const { user, space } = scenario; + + describe(scenario.id, () => { + afterEach(() => objectRemover.removeAll()); + + it('should handle bulk disable of one rule appropriately based on id', async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData()) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: [createdRule.id] }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to bulkDisable a "test.noop" rule for "alertsFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'space_1_all_alerts_none_actions at space1': + case 'superuser at space1': + case 'space_1_all at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body).to.eql(getDefaultResponse(response)); + expect(response.statusCode).to.eql(200); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should handle bulk disable of one rule appropriately based on id when consumer is the same as producer', async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }) + ) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: [createdRule.id] }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: + 'Unauthorized to bulkDisable a "test.restricted-noop" rule for "alertsRestrictedFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + expect(response.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'No rules found for bulk disable', + }); + expect(response.statusCode).to.eql(400); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'superuser at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body).to.eql({ + total: 1, + rules: [ + { + ...getDefaultRules(response), + alertTypeId: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }, + ], + errors: [], + }); + expect(response.statusCode).to.eql(200); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should handle disable alert request appropriately when consumer is not the producer', async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.restricted-noop', + consumer: 'alertsFixture', + }) + ) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: [createdRule.id] }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + case 'space_1_all_with_restricted_fixture at space1': + case 'global_read at space1': + expect(response.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'No rules found for bulk disable', + }); + expect(response.statusCode).to.eql(400); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'superuser at space1': + expect(response.body).to.eql({ + total: 1, + rules: [ + { + ...getDefaultRules(response), + alertTypeId: 'test.restricted-noop', + }, + ], + errors: [], + }); + expect(response.statusCode).to.eql(200); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should handle disable alert request appropriately when consumer is "alerts"', async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.noop', + consumer: 'alerts', + }) + ) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: [createdRule.id] }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to bulkDisable a "test.noop" rule by "alertsFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); + break; + case 'superuser at space1': + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body).to.eql({ + total: 1, + rules: [ + { + ...getDefaultRules(response), + consumer: 'alerts', + }, + ], + errors: [], + }); + expect(response.statusCode).to.eql(200); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should handle bulk disable of several rules ids appropriately based on ids', async () => { + const rules = await Promise.all( + Array.from({ length: 3 }).map(() => + supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData({ tags: ['multiple-rules-edit'] })) + .expect(200) + ) + ); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: rules.map((rule) => rule.body.id) }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + await Promise.all( + rules.map((rule) => { + objectRemover.add(space.id, rule.body.id, 'rule', 'alerting'); + }) + ); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to bulkDisable a "test.noop" rule for "alertsFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + await Promise.all( + rules.map((rule) => { + objectRemover.add(space.id, rule.body.id, 'rule', 'alerting'); + }) + ); + break; + case 'space_1_all_alerts_none_actions at space1': + case 'superuser at space1': + case 'space_1_all at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body.total).to.eql(3); + expect(response.statusCode).to.eql(200); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should handle bulk disable of several rules ids appropriately based on filter', async () => { + const rules = await Promise.all( + Array.from({ length: 3 }).map(() => + supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData({ tags: ['multiple-rules-disable'] })) + .expect(200) + ) + ); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ filter: `alert.attributes.tags: "multiple-rules-disable"` }) + .auth(user.username, user.password); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + await Promise.all( + rules.map((rule) => { + objectRemover.add(space.id, rule.body.id, 'rule', 'alerting'); + }) + ); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to bulkDisable a "test.noop" rule for "alertsFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + await Promise.all( + rules.map((rule) => { + objectRemover.add(space.id, rule.body.id, 'rule', 'alerting'); + }) + ); + break; + case 'space_1_all_alerts_none_actions at space1': + case 'superuser at space1': + case 'space_1_all at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body.total).to.eql(3); + expect(response.statusCode).to.eql(200); + await Promise.all( + rules.map((rule) => { + objectRemover.add(space.id, rule.body.id, 'rule', 'alerting'); + }) + ); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + + it('should not disable rule from another space', async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix('other')}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData()) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix('other')}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .auth(user.username, user.password) + .send({ ids: [createdRule.id] }); + + switch (scenario.id) { + // This superuser has more privileges that we think + case 'superuser at space1': + expect(response.body).to.eql(getDefaultResponse(response)); + expect(response.statusCode).to.eql(200); + break; + case 'global_read at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to bulkDisable a "test.noop" rule for "alertsFixture"', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + objectRemover.add('other', createdRule.id, 'rule', 'alerting'); + await getScheduledTask(createdRule.scheduled_task_id); + break; + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.body).to.eql({ + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }); + expect(response.statusCode).to.eql(403); + expect(response.statusCode).to.eql(403); + objectRemover.add('other', createdRule.id, 'rule', 'alerting'); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + }); + } + + describe('Validation tests', () => { + const { user, space } = SuperuserAtSpace1; + it('should throw an error when bulk disable of rules when both ids and filter supplied in payload', async () => { + const { body: createdRule1 } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData({ enabled: true, tags: ['foo'] })) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ filter: 'fake_filter', ids: [createdRule1.id] }) + .auth(user.username, user.password); + + expect(response.statusCode).to.eql(400); + expect(response.body.message).to.eql( + "Both 'filter' and 'ids' are supplied. Define either 'ids' or 'filter' properties in method's arguments" + ); + objectRemover.add(space.id, createdRule1.id, 'rule', 'alerting'); + }); + + it('should return an error if we pass more than 1000 ids', async () => { + const ids = [...Array(1001)].map((_, i) => `rule${i}`); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids }) + .auth(user.username, user.password); + + expect(response.body).to.eql({ + error: 'Bad Request', + message: '[request body.ids]: array size is [1001], but cannot be greater than [1000]', + statusCode: 400, + }); + }); + + it('should return an error if we do not pass any arguments', async () => { + await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData()) + .expect(200); + + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({}) + .auth(user.username, user.password); + + expect(response.body).to.eql({ + error: 'Bad Request', + message: "Either 'ids' or 'filter' property in method's arguments should be provided", + statusCode: 400, + }); + }); + + it('should return an error if we pass empty ids array', async () => { + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ ids: [] }) + .auth(user.username, user.password); + + expect(response.body).to.eql({ + error: 'Bad Request', + message: '[request body.ids]: array size is [0], but cannot be smaller than [1]', + statusCode: 400, + }); + }); + + it('should return an error if we pass empty string instead of fiter', async () => { + const response = await supertestWithoutAuth + .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_disable`) + .set('kbn-xsrf', 'foo') + .send({ filter: '' }) + .auth(user.username, user.password); + + expect(response.body).to.eql({ + error: 'Bad Request', + message: "Either 'ids' or 'filter' property in method's arguments should be provided", + statusCode: 400, + }); + }); + }); + }); +}; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts index 014d7720409c1..cebfe68e279b0 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts @@ -260,6 +260,13 @@ export default function createAlertTests({ getService }: FtrProviderContext) { switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage('create', 'test.noop', 'alerts'), + statusCode: 403, + }); + break; case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts index 307cd7a943916..2b6086cf38d92 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts @@ -224,9 +224,17 @@ export default function createDeleteTests({ getService }: FtrProviderContext) { .auth(user.username, user.password); switch (scenario.id) { - case 'global_read at space1': case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage('delete', 'test.noop', 'alerts'), + statusCode: 403, + }); + objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); + break; + case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts index 2e7d99c4fab22..73842073a542b 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts @@ -265,6 +265,13 @@ export default function createEnableAlertTests({ getService }: FtrProviderContex switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage('enable', 'test.noop', 'alerts'), + statusCode: 403, + }); + break; case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts index 8efcf9f155a05..b0900f74993cb 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts @@ -231,6 +231,17 @@ const getTestUtils = ( switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'get', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts index 063301d5f751a..0c8e0c6741656 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts @@ -33,6 +33,7 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC loadTestFile(require.resolve('./bulk_edit')); loadTestFile(require.resolve('./bulk_delete')); loadTestFile(require.resolve('./bulk_enable')); + loadTestFile(require.resolve('./bulk_disable')); loadTestFile(require.resolve('./retain_api_key')); loadTestFile(require.resolve('./clone')); }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/email.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/email.ts index f94655cca71fe..63005ab32a5ce 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/email.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/email.ts @@ -124,8 +124,8 @@ export default function emailTest({ getService }: FtrProviderContext) { cc: null, bcc: null, subject: 'email-subject', - html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`, - text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).', + html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`, + text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).', headers: {}, }, }); @@ -147,10 +147,10 @@ export default function emailTest({ getService }: FtrProviderContext) { .then((resp: any) => { const { text, html } = resp.body.data.message; expect(text).to.eql( - '_italic_ **bold** https://elastic.co link\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).' + '_italic_ **bold** https://elastic.co link\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).' ); expect(html).to.eql( - `<p><em>italic</em> <strong>bold</strong> <a href="https://elastic.co">https://elastic.co</a> link</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n` + `<p><em>italic</em> <strong>bold</strong> <a href="https://elastic.co">https://elastic.co</a> link</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n` ); }); }); @@ -166,7 +166,7 @@ export default function emailTest({ getService }: FtrProviderContext) { message: 'message', kibanaFooterLink: { path: '/my/path', - text: 'View my path in Kibana', + text: 'View my path in Elastic', }, }, }) @@ -174,10 +174,10 @@ export default function emailTest({ getService }: FtrProviderContext) { .then((resp: any) => { const { text, html } = resp.body.data.message; expect(text).to.eql( - 'message\n\n--\n\nThis message was sent by Kibana. [View my path in Kibana](https://localhost:5601/my/path).' + 'message\n\n--\n\nThis message was sent by Elastic. [View my path in Elastic](https://localhost:5601/my/path).' ); expect(html).to.eql( - `<p>message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601/my/path\">View my path in Kibana</a>.</p>\n` + `<p>message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601/my/path\">View my path in Elastic</a>.</p>\n` ); }); }); @@ -325,8 +325,8 @@ export default function emailTest({ getService }: FtrProviderContext) { cc: null, bcc: null, subject: 'email-subject', - html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`, - text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).', + html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`, + text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).', headers: {}, }, }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts index 65861aed1027c..ca3570a511d17 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts @@ -254,6 +254,17 @@ export default function createMuteAlertTests({ getService }: FtrProviderContext) switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'muteAll', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts index d062f11df8bb8..63a285e0f4cb8 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts @@ -254,6 +254,17 @@ export default function createMuteAlertInstanceTests({ getService }: FtrProvider switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'muteAlert', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/snooze.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/snooze.ts index 33883d7e955ed..2376e05635e9c 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/snooze.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/snooze.ts @@ -284,6 +284,17 @@ export default function createSnoozeRuleTests({ getService }: FtrProviderContext switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'snooze', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts index 507c34e48d77c..b4576650c58c8 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts @@ -274,6 +274,17 @@ export default function createUnmuteAlertTests({ getService }: FtrProviderContex switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'unmuteAll', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts index d05df28935309..1aa84f64a7e79 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts @@ -274,6 +274,17 @@ export default function createMuteAlertInstanceTests({ getService }: FtrProvider switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'unmuteAlert', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts index 4a27d4b814bad..430d69274041a 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts @@ -378,6 +378,17 @@ export default function createUpdateTests({ getService }: FtrProviderContext) { switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'update', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts index 60741756c9bf6..a0d1eb4dd0756 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts @@ -247,6 +247,17 @@ export default function createUpdateApiKeyTests({ getService }: FtrProviderConte switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: getConsumerUnauthorizedErrorMessage( + 'updateApiKey', + 'test.restricted-noop', + 'alerts' + ), + statusCode: 403, + }); + break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index d8af1a8d638b6..ce937a5e4618e 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -101,6 +101,7 @@ export default function ({ getService }: FtrProviderContext) { 'actions', 'enterpriseSearch', 'filesManagement', + 'filesSharedImage', 'advancedSettings', 'indexPatterns', 'graph', diff --git a/x-pack/test/api_integration/apis/ml/results/get_datafeed_results_chart.ts b/x-pack/test/api_integration/apis/ml/results/get_datafeed_results_chart.ts new file mode 100644 index 0000000000000..b50676b8591ef --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/results/get_datafeed_results_chart.ts @@ -0,0 +1,126 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { Datafeed, Job } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; +import { ANNOTATION_TYPE } from '@kbn/ml-plugin/common/constants/annotations'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + // @ts-expect-error not full interface + const JOB_CONFIG: Job = { + job_id: `fq_multi_1_ae`, + description: + 'mean/min/max(responsetime) partition=airline on farequote dataset with 1h bucket span', + groups: ['farequote', 'automated', 'multi-metric'], + analysis_config: { + bucket_span: '1h', + influencers: ['airline'], + detectors: [ + { function: 'mean', field_name: 'responsetime', partition_field_name: 'airline' }, + { function: 'min', field_name: 'responsetime', partition_field_name: 'airline' }, + { function: 'max', field_name: 'responsetime', partition_field_name: 'airline' }, + ], + }, + data_description: { time_field: '@timestamp' }, + analysis_limits: { model_memory_limit: '20mb' }, + model_plot_config: { enabled: true }, + }; + + // @ts-expect-error not full interface + const DATAFEED_CONFIG: Datafeed = { + datafeed_id: 'datafeed-fq_multi_1_ae', + indices: ['ft_farequote'], + job_id: 'fq_multi_1_ae', + query: { bool: { must: [{ match_all: {} }] } }, + }; + + async function createMockJobs() { + await ml.api.createAndRunAnomalyDetectionLookbackJob(JOB_CONFIG, DATAFEED_CONFIG); + await ml.api.indexAnnotation({ + timestamp: 1454950800000, + end_timestamp: 1454950860000, + annotation: 'Test annotation', + job_id: JOB_CONFIG.job_id, + type: ANNOTATION_TYPE.ANNOTATION, + event: 'user', + detector_index: 1, + partition_field_name: 'airline', + partition_field_value: 'AAL', + }); + } + + const requestBody = { + jobId: JOB_CONFIG.job_id, + start: 1454889600000, // February 8, 2016 12:00:00 AM GMT + end: 1454976000000, // February 9, 2016 12:00:00 AM GMT + }; + + describe('GetDatafeedResultsChart', () => { + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + await ml.testResources.setKibanaTimeZoneToUTC(); + await createMockJobs(); + }); + + after(async () => { + await ml.api.cleanMlIndices(); + }); + + it('it should fetch datafeed chart data', async () => { + const { body, status } = await supertest + .post(`/api/ml/results/datafeed_results_chart`) + .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) + .set(COMMON_REQUEST_HEADERS) + .send(requestBody); + ml.api.assertResponseStatusCode(200, status, body); + + expect(body.bucketResults.length).to.eql(24); + expect(body.datafeedResults.length).to.eql(24); + expect(body.annotationResultsRect.length).to.eql(1); + expect(body.annotationResultsLine.length).to.eql(0); + }); + + it('should validate request body', async () => { + const incompleteRequestBody = { + // MISSING JOB ID + start: 1454889600000, // February 8, 2016 12:00:00 AM GMT + end: 1454976000000, // February 9, 2016 12:00:00 AM GMT + }; + + const { body, status } = await supertest + .post(`/api/ml/results/datafeed_results_chart`) + .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) + .set(COMMON_REQUEST_HEADERS) + .send(incompleteRequestBody); + ml.api.assertResponseStatusCode(400, status, body); + + expect(body.error).to.eql('Bad Request'); + expect(body.message).to.eql( + '[request body.jobId]: expected value of type [string] but got [undefined]' + ); + }); + + it('it should not allow fetching of datafeed chart data without required permissions', async () => { + const { body, status } = await supertest + .post(`/api/ml/results/datafeed_results_chart`) + .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED)) + .set(COMMON_REQUEST_HEADERS) + .send(requestBody); + ml.api.assertResponseStatusCode(403, status, body); + + expect(body.error).to.eql('Forbidden'); + expect(body.message).to.eql('Forbidden'); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/results/index.ts b/x-pack/test/api_integration/apis/ml/results/index.ts index e9accf88eadab..81687e155eb5c 100644 --- a/x-pack/test/api_integration/apis/ml/results/index.ts +++ b/x-pack/test/api_integration/apis/ml/results/index.ts @@ -17,5 +17,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./max_anomaly_score')); loadTestFile(require.resolve('./get_partition_fields_values')); loadTestFile(require.resolve('./get_anomaly_search')); + loadTestFile(require.resolve('./get_datafeed_results_chart')); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/cluster/list_mb.js b/x-pack/test/api_integration/apis/monitoring/cluster/list_mb.js index 946a5c4fb5e77..4b6c73893bb0c 100644 --- a/x-pack/test/api_integration/apis/monitoring/cluster/list_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/cluster/list_mb.js @@ -13,33 +13,38 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('list mb', function () { - // Archive contains non-cgroup data which collides with the in-cgroup services present by default on cloud deployments - this.tags(['skipCloud']); - - describe('with trial license clusters', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/multicluster_mb'; - const timeRange = { - min: '2017-08-15T21:00:00Z', - max: '2017-08-16T00:00:00Z', - }; - const codePaths = ['all']; - - before('load clusters archive', () => { - return setup(archive); - }); + describe('list - metricbeat and package', function () { + ['mb', 'package'].forEach((source) => { + describe(`list ${source}`, function () { + // Archive contains non-cgroup data which collides with the in-cgroup services present by default on cloud deployments + this.tags(['skipCloud']); - after('unload clusters archive', () => { - return tearDown(); - }); + const archive = `x-pack/test/functional/es_archives/monitoring/multicluster_${source}`; + + describe('with trial license clusters', () => { + const timeRange = { + min: '2017-08-15T21:00:00Z', + max: '2017-08-16T00:00:00Z', + }; + const codePaths = ['all']; + + before('load clusters archive', () => { + return setup(archive); + }); + + after('unload clusters archive', () => { + return tearDown(archive); + }); - it('should load multiple clusters', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, codePaths }) - .expect(200); - expect(body).to.eql(multiclusterFixture); + it('should load multiple clusters', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, codePaths }) + .expect(200); + expect(body).to.eql(multiclusterFixture); + }); + }); }); }); }); diff --git a/x-pack/test/api_integration/apis/monitoring/cluster/overview_mb.js b/x-pack/test/api_integration/apis/monitoring/cluster/overview_mb.js index 5ca42e46f2008..57aa54e148745 100644 --- a/x-pack/test/api_integration/apis/monitoring/cluster/overview_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/cluster/overview_mb.js @@ -13,33 +13,38 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('overview mb', function () { - // TODO: https://github.com/elastic/stack-monitoring/issues/31 - this.tags(['skipCloud']); - - describe('with trial license clusters', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_mb'; - const timeRange = { - min: '2017-08-23T21:29:35Z', - max: '2017-08-23T21:47:25Z', - }; - const codePaths = ['all']; - - before('load clusters archive', () => { - return setup(archive); - }); + describe('overview - metricbeat and package', function () { + ['mb', 'package'].forEach((source) => { + describe(`overview ${source}`, function () { + // TODO: https://github.com/elastic/stack-monitoring/issues/31 + this.tags(['skipCloud']); - after('unload clusters archive', () => { - return tearDown(); - }); + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_${source}`; + + describe('with trial license clusters', () => { + const timeRange = { + min: '2017-08-23T21:29:35Z', + max: '2017-08-23T21:47:25Z', + }; + const codePaths = ['all']; + + before('load clusters archive', () => { + return setup(archive); + }); + + after('unload clusters archive', () => { + return tearDown(archive); + }); - it('should load multiple clusters', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/y1qOsQPiRrGtmdEuM3APJw') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, codePaths }) - .expect(200); - expect(body).to.eql(overviewFixture); + it('should load multiple clusters', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/y1qOsQPiRrGtmdEuM3APJw') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, codePaths }) + .expect(200); + expect(body).to.eql(overviewFixture); + }); + }); }); }); }); diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_mb.js index d7b2b2b13d9d2..7d1df6f7f32a4 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_mb.js @@ -12,32 +12,36 @@ import { getLifecycleMethods } from '../data_stream'; export default function ({ getService }) { const supertest = getService('supertest'); - describe('ccr mb', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/ccr_mb'; - const { setup, tearDown } = getLifecycleMethods(getService); - const timeRange = { - min: '2018-09-19T00:00:00.000Z', - max: '2018-09-19T23:59:59.000Z', - }; + describe('ccr - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`ccr ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/ccr_${source}`; + const { setup, tearDown } = getLifecycleMethods(getService); + const timeRange = { + min: '2018-09-19T00:00:00.000Z', + max: '2018-09-19T23:59:59.000Z', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should return all followers and a grouping of stats by follower index', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/ccr') - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - }) - .expect(200); + it('should return all followers and a grouping of stats by follower index', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/ccr') + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + }) + .expect(200); - expect(body).to.eql(ccrFixture); + expect(body).to.eql(ccrFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_shard_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_shard_mb.js index 532a3b298f9b1..3dcee77f52cf8 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_shard_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/ccr_shard_mb.js @@ -14,35 +14,40 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('ccr shard mb', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/ccr_mb'; - const timeRange = { - min: '2018-09-19T00:00:00.000Z', - max: '2018-09-19T23:59:59.000Z', - }; - - before('load archive', () => { - return setup(archive); - }); + describe('ccr shard - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + const archive = `x-pack/test/functional/es_archives/monitoring/ccr_${source}`; - after('unload archive', () => { - return tearDown(); - }); + describe(`ccr shard ${source}`, () => { + const timeRange = { + min: '2018-09-19T00:00:00.000Z', + max: '2018-09-19T23:59:59.000Z', + }; + + before('load archive', () => { + return setup(archive); + }); + + after('unload archive', () => { + return tearDown(archive); + }); + + it('should return specific shard details', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/ccr/follower/shard/0' + ) + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + }) + .expect(200); - it('should return specific shard details', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/ccr/follower/shard/0' - ) - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - }) - .expect(200); - - // These will be inherently different, but they are only shown in JSON format in the UI so that's okay - const keysToIgnore = ['stat', 'oldestStat']; - expect(omit(body, keysToIgnore)).to.eql(omit(ccrShardFixture, keysToIgnore)); + // These will be inherently different, but they are only shown in JSON format in the UI so that's okay + const keysToIgnore = ['stat', 'oldestStat']; + expect(omit(body, keysToIgnore)).to.eql(omit(ccrShardFixture, keysToIgnore)); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/index_detail_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/index_detail_mb.js index 2bce60939b5f4..b14c2b8997df2 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/index_detail_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/index_detail_mb.js @@ -14,50 +14,53 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('index detail mb', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_mb'; - const timeRange = { - min: '2017-10-05T20:31:48.000Z', - max: '2017-10-05T20:35:12.000Z', - }; - - before('load archive', () => { - return setup(archive); - }); + describe('index detail - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`index detail ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_${source}`; + const timeRange = { + min: '2017-10-05T20:31:48.000Z', + max: '2017-10-05T20:35:12.000Z', + }; - after('unload archive', () => { - return tearDown(); - }); + before('load archive', () => { + return setup(archive); + }); - it('should summarize index with chart metrics data for the non-advanced view', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices/avocado-tweets-2017.10.02' - ) - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - is_advanced: false, - }) - .expect(200); - - expect(body).to.eql(indexDetailFixture); - }); + after('unload archive', () => { + return tearDown(archive); + }); + + it('should summarize index with chart metrics data for the non-advanced view', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices/avocado-tweets-2017.10.02' + ) + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + is_advanced: false, + }) + .expect(200); + + expect(body).to.eql(indexDetailFixture); + }); + + it('should summarize index with chart metrics data for the advanced view', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices/avocado-tweets-2017.10.02' + ) + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + is_advanced: true, + }) + .expect(200); - it('should summarize index with chart metrics data for the advanced view', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices/avocado-tweets-2017.10.02' - ) - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - is_advanced: true, - }) - .expect(200); - - expect(body).to.eql(indexDetailAdvancedFixture); + expect(body).to.eql(indexDetailAdvancedFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/indices_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/indices_mb.js index dcd8dbb77a213..c425f2a7ba02b 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/indices_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/indices_mb.js @@ -14,86 +14,88 @@ import { getLifecycleMethods } from '../data_stream'; export default function ({ getService }) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('indices mb', () => { - describe('shard-relocation', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_mb'; - const timeRange = { - min: '2017-10-05T20:31:48.000Z', - max: '2017-10-05T20:35:12.000Z', - }; + describe('indices - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`indices ${source}`, () => { + describe('shard-relocation', () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_${source}`; + const timeRange = { + min: '2017-10-05T20:31:48.000Z', + max: '2017-10-05T20:35:12.000Z', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should summarize the non-system indices with stats', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices?show_system_indices=false' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); - expect(body).to.eql(relocatingShardsFixture); - }); + it('should summarize the non-system indices with stats', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices?show_system_indices=false' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); + expect(body).to.eql(relocatingShardsFixture); + }); - it('should summarize all indices with stats', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices?show_system_indices=true' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); + it('should summarize all indices with stats', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/indices?show_system_indices=true' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); - expect(body).to.eql(relocationShardsAllFixture); - }); - }); + expect(body).to.eql(relocationShardsAllFixture); + }); + }); - describe('health-red', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum'; - const timeRange = { - min: '2017-10-06T19:53:06.000Z', - max: '2017-10-06T20:15:30.000Z', - }; + describe('health-red', () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_${source}`; + const timeRange = { + min: '2017-10-06T19:53:06.000Z', + max: '2017-10-06T20:15:30.000Z', + }; - before('load clusters archive', () => { - return esArchiver.load(archive); - }); + before('load clusters archive', () => { + return setup(archive); + }); - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); + after('unload clusters archive', () => { + return tearDown(archive); + }); - it('should summarize the non-system indices with stats', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch/indices?show_system_indices=false' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); - expect(body).to.eql(indicesRedClusterFixture); - }); + it('should summarize the non-system indices with stats', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch/indices?show_system_indices=false' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); + expect(body).to.eql(indicesRedClusterFixture); + }); - it('should summarize all indices with stats', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch/indices?show_system_indices=true' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); + it('should summarize all indices with stats', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch/indices?show_system_indices=true' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); - expect(body).to.eql(indicesRedClusterAllFixture); + expect(body).to.eql(indicesRedClusterAllFixture); + }); + }); }); }); }); diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_advanced_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_advanced_mb.js index 9f20bce50f9b1..33c9fa94cb6f6 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_advanced_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_advanced_mb.js @@ -13,35 +13,38 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('node detail advanced mb', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_mb'; - const timeRange = { - min: '2017-10-05T20:31:48.000Z', - max: '2017-10-05T20:35:12.000Z', - }; + describe('node detail advanced - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`node detail advanced ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_${source}`; + const timeRange = { + min: '2017-10-05T20:31:48.000Z', + max: '2017-10-05T20:35:12.000Z', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should summarize node with metrics', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/nodes/jUT5KdxfRbORSCWkb5zjmA' - ) - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - is_advanced: true, - }) - .expect(200); + it('should summarize node with metrics', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/nodes/jUT5KdxfRbORSCWkb5zjmA' + ) + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + is_advanced: true, + }) + .expect(200); - expect(body).to.eql(nodeDetailFixture); + expect(body).to.eql(nodeDetailFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_mb.js index c978424951d9e..d432204dcc04a 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/node_detail_mb.js @@ -13,39 +13,42 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('node detail mb', function () { - // TODO: https://github.com/elastic/stack-monitoring/issues/31 - this.tags(['skipCloud']); - - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_mb'; - const timeRange = { - min: '2017-10-05T20:31:48.000Z', - max: '2017-10-05T20:35:12.000Z', - }; - - before('load archive', () => { - return setup(archive); - }); - - after('unload archive', () => { - return tearDown(); - }); - - it('should summarize node with metrics', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/nodes/jUT5KdxfRbORSCWkb5zjmA' - ) - .set('kbn-xsrf', 'xxx') - .send({ - timeRange, - is_advanced: false, - showSystemIndices: false, - }) - .expect(200); - - expect(body).to.eql(nodeDetailFixture); + describe('node detail - metricbeat and package', function () { + ['mb', 'package'].forEach((source) => { + describe(`node detail ${source}`, function () { + // TODO: https://github.com/elastic/stack-monitoring/issues/31 + this.tags(['skipCloud']); + + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_${source}`; + const timeRange = { + min: '2017-10-05T20:31:48.000Z', + max: '2017-10-05T20:35:12.000Z', + }; + + before('load archive', () => { + return setup(archive); + }); + + after('unload archive', () => { + return tearDown(archive); + }); + + it('should summarize node with metrics', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch/nodes/jUT5KdxfRbORSCWkb5zjmA' + ) + .set('kbn-xsrf', 'xxx') + .send({ + timeRange, + is_advanced: false, + showSystemIndices: false, + }) + .expect(200); + + expect(body).to.eql(nodeDetailFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/nodes_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/nodes_mb.js index accc064e14a84..ff0bb499bc77e 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/nodes_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/nodes_mb.js @@ -7,341 +7,43 @@ import expect from '@kbn/expect'; import nodesListingFixtureGreen from './fixtures/nodes_listing_green.json'; -import nodesListingFixtureRed from './fixtures/nodes_listing_red.json'; -import nodesListingFixtureCgroup from './fixtures/nodes_listing_cgroup.json'; -import nodesListingFixturePagination from './fixtures/nodes_listing_pagination.json'; import { getLifecycleMethods } from '../data_stream'; export default function ({ getService }) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('nodes mb', () => { - describe('with green platinum cluster', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_mb'; - const timeRange = { - min: '2018-02-13T17:04:50.000Z', - max: '2018-02-13T17:51:55.000Z', - }; - const pagination = { - size: 10, - index: 0, - }; - - before('load clusters archive', () => { - return setup(archive); - }); - - after('unload clusters archive', () => { - return tearDown(); - }); - - it('should return data for 2 active nodes', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/fHJwISmKTFO8bj57oFBLUQ/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); - expect(body).to.eql(nodesListingFixtureGreen); - }); - }); - - describe('with red platinum cluster', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum'; - const timeRange = { - min: '2017-10-06T19:53:06.000Z', - max: '2017-10-06T20:15:30.000Z', - }; - const pagination = { - size: 10, - index: 0, - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should return data for offline nodes', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); - expect(body).to.eql(nodesListingFixtureRed); - }); - }); - - describe('with green trial cluster and node in cpu group', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_green_trial_two_nodes_one_cgrouped'; - const timeRange = { - min: '2018-02-13T19:18:02.000Z', - max: '2018-02-13T19:26:14.000Z', - }; - const pagination = { - size: 10, - index: 0, - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should return cpu info for cgroup node and cpu info for "regular" node', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Cbo7k85ZRdy--yxmqeykog/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); - expect(body).to.eql(nodesListingFixtureCgroup); - }); - }); - - describe('with pagination', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_lots_of_nodes'; - const timeRange = { - min: '2019-10-03T19:41:01.402Z', - max: '2019-10-03T19:41:13.132Z', - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should work with the default pagination', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); - - const names = body.nodes.map((node) => node.name); - expect(body.nodes.length).to.be(pagination.size); - expect(names).to.eql(nodesListingFixturePagination.defaultPagination); - }); - - it('should work with going to page 2', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const { body: body1 } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); - const names1 = body1.nodes.map((node) => node.name); - - const { body: body2 } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination: { size: 12, index: 1 } }) - .expect(200); - const names2 = body2.nodes.map((node) => node.name); - - for (const name1 of names1) { - expect(names2.includes(name1)).to.be(false); - } - expect(names2.length).to.be(12); - expect(names2).to.eql(nodesListingFixturePagination.secondPagePagination); - }); - }); - - describe('with sorting', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_lots_of_nodes'; - const timeRange = { - min: '2019-10-03T19:41:01.402Z', - max: '2019-10-03T19:41:13.132Z', - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should work with the default sorting', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const sort = { - field: 'name', - direction: 'asc', - }; - - const { body: body1 } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); - - const { body: body2 } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort: { ...sort, direction: 'desc' } }) - .expect(200); - - const names1 = body1.nodes.map((node) => node.name); - const names2 = body2.nodes.map((node) => node.name); - - expect(names1).to.eql(nodesListingFixturePagination.sortByNameAsc); - expect(names2).to.eql(nodesListingFixturePagination.sortByNameDesc); - for (const name1 of names1) { - expect(names2.includes(name1)).to.be(false); - } - }); - - it('should work with sorting by cpu usage', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const sort = { - field: 'node_cpu_utilization', - direction: 'asc', - }; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); - - const cpuUsage = body.nodes.map((node) => ({ - name: node.name, - cpu_usage: node.node_cpu_utilization.summary, - })); - expect(cpuUsage).to.eql(nodesListingFixturePagination.sortByCpuUsage); - }); - - it('should work with sorting by load average', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const sort = { - field: 'node_load_average', - direction: 'asc', - }; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); - - const loadAverage = body.nodes.map((node) => ({ - name: node.name, - load_average: node.node_load_average.summary, - })); - expect(loadAverage).to.eql(nodesListingFixturePagination.sortByLoadAverage); - }); - - it('should work with sorting by jvm memory', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const sort = { - field: 'node_jvm_mem_percent', - direction: 'asc', - }; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); - - const jvmMemory = body.nodes.map((node) => ({ - name: node.name, - jvm_memory: node.node_jvm_mem_percent.summary, - })); - expect(jvmMemory).to.eql(nodesListingFixturePagination.sortByJvmMemory); - }); - - it('should work with sorting by free space', async () => { - const pagination = { - size: 10, - index: 0, - }; - - const sort = { - field: 'node_free_space', - direction: 'asc', - }; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); - - const freeSpace = body.nodes.map((node) => ({ - name: node.name, - free_space: node.node_free_space.summary, - })); - expect(freeSpace).to.eql(nodesListingFixturePagination.sortByFreeSpace); - }); - }); - - describe('with filtering', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_lots_of_nodes'; - const timeRange = { - min: '2019-10-03T19:41:01.402Z', - max: '2019-10-03T19:41:13.132Z', - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should work with a simple query', async () => { - const pagination = { - size: 10, - index: 0, - }; - const queryText = '41'; - - const { body } = await supertest - .post('/api/monitoring/v1/clusters/Pawu2etQQ9uPwl22Vm_Tug/elasticsearch/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, queryText }) - .expect(200); - - const names = body.nodes.map((node) => node.name); - expect(names).to.eql(nodesListingFixturePagination.simpleQuery); + describe('nodes - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`nodes ${source}`, () => { + describe('with green platinum cluster', () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_${source}`; + const timeRange = { + min: '2018-02-13T17:04:50.000Z', + max: '2018-02-13T17:51:55.000Z', + }; + const pagination = { + size: 10, + index: 0, + }; + + before('load clusters archive', () => { + return setup(archive); + }); + + after('unload clusters archive', () => { + return tearDown(); + }); + + it('should return data for 2 active nodes', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/fHJwISmKTFO8bj57oFBLUQ/elasticsearch/nodes') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, pagination }) + .expect(200); + expect(body).to.eql(nodesListingFixtureGreen); + }); + }); }); }); }); diff --git a/x-pack/test/api_integration/apis/monitoring/elasticsearch/overview_mb.js b/x-pack/test/api_integration/apis/monitoring/elasticsearch/overview_mb.js index 870406f3bb469..6fec13a096a55 100644 --- a/x-pack/test/api_integration/apis/monitoring/elasticsearch/overview_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/elasticsearch/overview_mb.js @@ -8,90 +8,39 @@ import expect from '@kbn/expect'; import overviewFixtureGreenPlatinum from './fixtures/overview_green_platinum.json'; -import overviewFixtureRedPlatinum from './fixtures/overview_red_platinum.json'; -import overviewFixtureShardsRelocating from './fixtures/overview_shards_relocating.json'; import { getLifecycleMethods } from '../data_stream'; export default function ({ getService }) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('overview mb', () => { - describe('with green platinum cluster', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_mb'; - const timeRange = { - min: '2018-02-13T17:04:50.000Z', - max: '2018-02-13T17:51:55.000Z', - }; - - before('load clusters archive', () => { - return setup(archive); - }); - - after('unload clusters archive', async () => { - return tearDown(); - }); - - it('should summarize elasticsearch with metrics', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/fHJwISmKTFO8bj57oFBLUQ/elasticsearch') - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); - expect(body).to.eql(overviewFixtureGreenPlatinum); - }); - }); - - describe('with red platinum cluster', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum'; - const timeRange = { - min: '2017-10-06T19:53:06.000Z', - max: '2017-10-06T20:15:30.000Z', - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should summarize elasticsearch with metrics', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/1LYuyvCCQFS3FAO_h65PQw/elasticsearch') - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); - expect(body).to.eql(overviewFixtureRedPlatinum); - }); - }); - - describe('with shards relocating', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation'; - const timeRange = { - min: '2017-10-05T20:31:17.081Z', - max: '2017-10-05T20:35:39.428Z', - }; - - before('load clusters archive', () => { - return esArchiver.load(archive); - }); - - after('unload clusters archive', () => { - return esArchiver.unload(archive); - }); - - it('should summarize elasticsearch with metrics', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/YCxj-RAgSZCP6GuOQ8M1EQ/elasticsearch') - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); - expect(body).to.eql(overviewFixtureShardsRelocating); + describe('overview - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`overview ${source}`, () => { + describe('with green platinum cluster', () => { + const archive = `x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_${source}`; + const timeRange = { + min: '2018-02-13T17:04:50.000Z', + max: '2018-02-13T17:51:55.000Z', + }; + + before('load clusters archive', () => { + return setup(archive); + }); + + after('unload clusters archive', async () => { + return tearDown(archive); + }); + + it('should summarize elasticsearch with metrics', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/fHJwISmKTFO8bj57oFBLUQ/elasticsearch') + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); + expect(body).to.eql(overviewFixtureGreenPlatinum); + }); + }); }); }); }); diff --git a/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/data.json.gz b/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/data.json.gz new file mode 100644 index 0000000000000..e496354a5be28 Binary files /dev/null and b/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/data.json.gz differ diff --git a/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/mappings.json b/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/mappings.json new file mode 100644 index 0000000000000..5d05af5111803 --- /dev/null +++ b/x-pack/test/api_integration/apis/monitoring/es_archives/logstash_package/mappings.json @@ -0,0 +1,966 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_8.json b/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_8.json index e283406909808..fde54ff12067a 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_8.json +++ b/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_8.json @@ -1,1523 +1,1523 @@ { - "metrics": { - "logstash_os_load": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cpu.load_average.1m", - "metricAgg": "max", - "label": "1m", - "title": "System Load", - "description": "Load average over the last minute.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - 3 - ], - [ - 1655471950000, - 3 - ], - [ - 1655471960000, - 3 - ], - [ - 1655471970000, - 3 - ], - [ - 1655471980000, - 2 - ], - [ - 1655471990000, - 2 - ], - [ - 1655472000000, - 2 - ], - [ - 1655472010000, - 2 - ], - [ - 1655472020000, - 2 - ], - [ - 1655472030000, - 2 - ], - [ - 1655472040000, - 2 - ], - [ - 1655472050000, - 2 - ], - [ - 1655472060000, - 2 - ], - [ - 1655472070000, - 2 - ], - [ - 1655472080000, - 2 - ], - [ - 1655472090000, - 2 - ], - [ - 1655472100000, - 2 - ], - [ - 1655472110000, - 2 - ], - [ - 1655472120000, - 1 - ], - [ - 1655472130000, - 1 - ], - [ - 1655472140000, - 1 - ], - [ - 1655472150000, - 1 - ], - [ - 1655472160000, - 1 - ], - [ - 1655472170000, - 2 - ], - [ - 1655472180000, - 2 - ], - [ - 1655472190000, - 2 - ], - [ - 1655472200000, - 2 - ], - [ - 1655472210000, - 2 - ], - [ - 1655472220000, - 2 - ], - [ - 1655472230000, - 2 - ], - [ - 1655472240000, - 3 - ], - [ - 1655472250000, - 3 - ], - [ - 1655472260000, - 2 - ], - [ - 1655472270000, - 2 - ], - [ - 1655472280000, - 2 - ], - [ - 1655472290000, - 2 - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cpu.load_average.5m", - "metricAgg": "max", - "label": "5m", - "title": "System Load", - "description": "Load average over the last 5 minutes.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cpu.load_average.15m", - "metricAgg": "max", - "label": "15m", - "title": "System Load", - "description": "Load average over the last 15 minutes.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - } - ], - "logstash_events_input_rate": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.events.in", - "metricAgg": "max", - "label": "Events Received Rate", - "description": "Number of events received per second by the Logstash node at the inputs stage.", - "units": "/s", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - 10 - ], - [ - 1655471950000, - 10 - ], - [ - 1655471960000, - 10 - ], - [ - 1655471970000, - 10 - ], - [ - 1655471980000, - 10 - ], - [ - 1655471990000, - 10 - ], - [ - 1655472000000, - 10 - ], - [ - 1655472010000, - 10 - ], - [ - 1655472020000, - 10 - ], - [ - 1655472030000, - 10 - ], - [ - 1655472040000, - 10 - ], - [ - 1655472050000, - 10 - ], - [ - 1655472060000, - 10 - ], - [ - 1655472070000, - 10 - ], - [ - 1655472080000, - 10 - ], - [ - 1655472090000, - 10 - ], - [ - 1655472100000, - 10 - ], - [ - 1655472110000, - 10 - ], - [ - 1655472120000, - 10 - ], - [ - 1655472130000, - 10 - ], - [ - 1655472140000, - 10 - ], - [ - 1655472150000, - 10 - ], - [ - 1655472160000, - 10 - ], - [ - 1655472170000, - 10 - ], - [ - 1655472180000, - 10 - ], - [ - 1655472190000, - 10 - ], - [ - 1655472200000, - 10 - ], - [ - 1655472210000, - 10 - ], - [ - 1655472220000, - 10 - ], - [ - 1655472230000, - 10 - ], - [ - 1655472240000, - 10 - ], - [ - 1655472250000, - 10 - ], - [ - 1655472260000, - 10 - ], - [ - 1655472270000, - 10 - ], - [ - 1655472280000, - 10 - ], - [ - 1655472290000, - 10 - ] - ] - } - ], - "logstash_events_output_rate": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.events.out", - "metricAgg": "max", - "label": "Events Emitted Rate", - "description": "Number of events emitted per second by the Logstash node at the outputs stage.", - "units": "/s", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - 7 - ], - [ - 1655471950000, - 4.3 - ], - [ - 1655471960000, - 7.3 - ], - [ - 1655471970000, - 8.2 - ], - [ - 1655471980000, - 6 - ], - [ - 1655471990000, - 3.7 - ], - [ - 1655472000000, - 10.3 - ], - [ - 1655472010000, - 10.5 - ], - [ - 1655472020000, - 6.2 - ], - [ - 1655472030000, - 4.4 - ], - [ - 1655472040000, - 2.1 - ], - [ - 1655472050000, - 10.8 - ], - [ - 1655472060000, - 12.9 - ], - [ - 1655472070000, - 4.4 - ], - [ - 1655472080000, - 0 - ], - [ - 1655472090000, - 5.9 - ], - [ - 1655472100000, - 10.4 - ], - [ - 1655472110000, - 10.8 - ], - [ - 1655472120000, - 0.7 - ], - [ - 1655472130000, - 5.6 - ], - [ - 1655472140000, - 8.3 - ], - [ - 1655472150000, - 9.3 - ], - [ - 1655472160000, - 10.7 - ], - [ - 1655472170000, - 1.3 - ], - [ - 1655472180000, - 4.3 - ], - [ - 1655472190000, - 13.7 - ], - [ - 1655472200000, - 13.1 - ], - [ - 1655472210000, - 4.2 - ], - [ - 1655472220000, - 0 - ], - [ - 1655472230000, - 3.7 - ], - [ - 1655472240000, - 10.2 - ], - [ - 1655472250000, - 0 - ], - [ - 1655472260000, - 8.2 - ], - [ - 1655472270000, - 5.9 - ], - [ - 1655472280000, - 8.8 - ], - [ - 1655472290000, - 2.5 - ] + "metrics": { + "logstash_os_load": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cpu.load_average.1m", + "metricAgg": "max", + "label": "1m", + "title": "System Load", + "description": "Load average over the last minute.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 3.84765625 + ], + [ + 1655471950000, + 3.703125 + ], + [ + 1655471960000, + 3.44140625 + ], + [ + 1655471970000, + 3.072265625 + ], + [ + 1655471980000, + 2.75390625 + ], + [ + 1655471990000, + 2.802734375 + ], + [ + 1655472000000, + 2.826171875 + ], + [ + 1655472010000, + 2.69921875 + ], + [ + 1655472020000, + 2.603515625 + ], + [ + 1655472030000, + 2.658203125 + ], + [ + 1655472040000, + 2.40234375 + ], + [ + 1655472050000, + 2.78125 + ], + [ + 1655472060000, + 2.5078125 + ], + [ + 1655472070000, + 2.201171875 + ], + [ + 1655472080000, + 2.08984375 + ], + [ + 1655472090000, + 2.08203125 + ], + [ + 1655472100000, + 2.0625 + ], + [ + 1655472110000, + 2.05859375 + ], + [ + 1655472120000, + 1.8154296875 + ], + [ + 1655472130000, + 1.9296875 + ], + [ + 1655472140000, + 1.712890625 + ], + [ + 1655472150000, + 1.990234375 + ], + [ + 1655472160000, + 1.837890625 + ], + [ + 1655472170000, + 2.390625 + ], + [ + 1655472180000, + 2.484375 + ], + [ + 1655472190000, + 2.5625 + ], + [ + 1655472200000, + 2.2421875 + ], + [ + 1655472210000, + 2.4453125 + ], + [ + 1655472220000, + 2.142578125 + ], + [ + 1655472230000, + 2.568359375 + ], + [ + 1655472240000, + 3.408203125 + ], + [ + 1655472250000, + 3.271484375 + ], + [ + 1655472260000, + 2.99609375 + ], + [ + 1655472270000, + 2.85546875 + ], + [ + 1655472280000, + 2.796875 + ], + [ + 1655472290000, + 2.75390625 + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cpu.load_average.5m", + "metricAgg": "max", + "label": "5m", + "title": "System Load", + "description": "Load average over the last 5 minutes.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cpu.load_average.15m", + "metricAgg": "max", + "label": "15m", + "title": "System Load", + "description": "Load average over the last 15 minutes.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + } + ], + "logstash_events_input_rate": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.events.in", + "metricAgg": "max", + "label": "Events Received Rate", + "description": "Number of events received per second by the Logstash node at the inputs stage.", + "units": "/s", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + 10 + ], + [ + 1655471950000, + 10 + ], + [ + 1655471960000, + 10 + ], + [ + 1655471970000, + 10 + ], + [ + 1655471980000, + 10 + ], + [ + 1655471990000, + 10 + ], + [ + 1655472000000, + 10 + ], + [ + 1655472010000, + 10 + ], + [ + 1655472020000, + 10 + ], + [ + 1655472030000, + 10 + ], + [ + 1655472040000, + 10 + ], + [ + 1655472050000, + 10 + ], + [ + 1655472060000, + 10 + ], + [ + 1655472070000, + 10 + ], + [ + 1655472080000, + 10 + ], + [ + 1655472090000, + 10 + ], + [ + 1655472100000, + 10 + ], + [ + 1655472110000, + 10 + ], + [ + 1655472120000, + 10 + ], + [ + 1655472130000, + 10 + ], + [ + 1655472140000, + 10 + ], + [ + 1655472150000, + 10 + ], + [ + 1655472160000, + 10 + ], + [ + 1655472170000, + 10 + ], + [ + 1655472180000, + 10 + ], + [ + 1655472190000, + 10 + ], + [ + 1655472200000, + 10 + ], + [ + 1655472210000, + 10 + ], + [ + 1655472220000, + 10 + ], + [ + 1655472230000, + 10 + ], + [ + 1655472240000, + 10 + ], + [ + 1655472250000, + 10 + ], + [ + 1655472260000, + 10 + ], + [ + 1655472270000, + 10 + ], + [ + 1655472280000, + 10 + ], + [ + 1655472290000, + 10 + ] + ] + } + ], + "logstash_events_output_rate": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.events.out", + "metricAgg": "max", + "label": "Events Emitted Rate", + "description": "Number of events emitted per second by the Logstash node at the outputs stage.", + "units": "/s", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + 7 + ], + [ + 1655471950000, + 4.3 + ], + [ + 1655471960000, + 7.3 + ], + [ + 1655471970000, + 8.2 + ], + [ + 1655471980000, + 6 + ], + [ + 1655471990000, + 3.7 + ], + [ + 1655472000000, + 10.3 + ], + [ + 1655472010000, + 10.5 + ], + [ + 1655472020000, + 6.2 + ], + [ + 1655472030000, + 4.4 + ], + [ + 1655472040000, + 2.1 + ], + [ + 1655472050000, + 10.8 + ], + [ + 1655472060000, + 12.9 + ], + [ + 1655472070000, + 4.4 + ], + [ + 1655472080000, + 0 + ], + [ + 1655472090000, + 5.9 + ], + [ + 1655472100000, + 10.4 + ], + [ + 1655472110000, + 10.8 + ], + [ + 1655472120000, + 0.7 + ], + [ + 1655472130000, + 5.6 + ], + [ + 1655472140000, + 8.3 + ], + [ + 1655472150000, + 9.3 + ], + [ + 1655472160000, + 10.7 + ], + [ + 1655472170000, + 1.3 + ], + [ + 1655472180000, + 4.3 + ], + [ + 1655472190000, + 13.7 + ], + [ + 1655472200000, + 13.1 + ], + [ + 1655472210000, + 4.2 + ], + [ + 1655472220000, + 0 + ], + [ + 1655472230000, + 3.7 + ], + [ + 1655472240000, + 10.2 + ], + [ + 1655472250000, + 0 + ], + [ + 1655472260000, + 8.2 + ], + [ + 1655472270000, + 5.9 + ], + [ + 1655472280000, + 8.8 + ], + [ + 1655472290000, + 2.5 + ] + ] + } + ], + "logstash_events_latency": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.events.out", + "metricAgg": "sum", + "label": "Event Latency", + "description": "Average time spent by events in the filter and output stages, which is the total time it takes to process events divided by number of events emitted.", + "units": "ms", + "format": "0,0.[00]", + "hasCalculation": true, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + 2003.279069767442 + ], + [ + 1655471960000, + 2003.150684931507 + ], + [ + 1655471970000, + 1978.9146341463418 + ], + [ + 1655471980000, + 1969.45 + ], + [ + 1655471990000, + 2003.4864864864862 + ], + [ + 1655472000000, + 2002.9708737864075 + ], + [ + 1655472010000, + 1984.1809523809525 + ], + [ + 1655472020000, + 1970.5483870967741 + ], + [ + 1655472030000, + 2002.7954545454543 + ], + [ + 1655472040000, + 2002.6666666666667 + ], + [ + 1655472050000, + 2002.9629629629628 + ], + [ + 1655472060000, + 2002.7519379844962 + ], + [ + 1655472070000, + 2002.931818181818 + ], + [ + 1655472080000, + 0 + ], + [ + 1655472090000, + 2002.6440677966102 + ], + [ + 1655472100000, + 1983.9326923076924 + ], + [ + 1655472110000, + 2002.8425925925926 + ], + [ + 1655472120000, + 2003.4285714285718 + ], + [ + 1655472130000, + 2002.964285714286 + ], + [ + 1655472140000, + 2002.9518072289154 + ], + [ + 1655472150000, + 2002.9462365591398 + ], + [ + 1655472160000, + 2003.0093457943926 + ], + [ + 1655472170000, + 2002.5384615384617 + ], + [ + 1655472180000, + 2002.7906976744187 + ], + [ + 1655472190000, + 1973.7956204379564 + ], + [ + 1655472200000, + 1957.0381679389313 + ], + [ + 1655472210000, + 2002.6666666666667 + ], + [ + 1655472220000, + 0 + ], + [ + 1655472230000, + 2003.2432432432431 + ], + [ + 1655472240000, + 2003.029411764706 + ], + [ + 1655472250000, + 0 + ], + [ + 1655472260000, + 2003.0243902439024 + ], + [ + 1655472270000, + 2003.0338983050847 + ], + [ + 1655472280000, + 2002.9772727272727 + ], + [ + 1655472290000, + 2002.6799999999998 + ] + ] + } + ], + "logstash_node_cpu_metric": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.process.cpu.percent", + "metricAgg": "max", + "label": "CPU Utilization", + "description": "Percentage of CPU usage reported by the OS (100% is the max).", + "units": "%", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 0 + ], + [ + 1655471950000, + 0 + ], + [ + 1655471960000, + 0 + ], + [ + 1655471970000, + 0 + ], + [ + 1655471980000, + 0 + ], + [ + 1655471990000, + 0 + ], + [ + 1655472000000, + 0 + ], + [ + 1655472010000, + 0 + ], + [ + 1655472020000, + 0 + ], + [ + 1655472030000, + 0 + ], + [ + 1655472040000, + 0 + ], + [ + 1655472050000, + 0 + ], + [ + 1655472060000, + 0 + ], + [ + 1655472070000, + 0 + ], + [ + 1655472080000, + 0 + ], + [ + 1655472090000, + 0 + ], + [ + 1655472100000, + 0 + ], + [ + 1655472110000, + 0 + ], + [ + 1655472120000, + 0 + ], + [ + 1655472130000, + 0 + ], + [ + 1655472140000, + 0 + ], + [ + 1655472150000, + 0 + ], + [ + 1655472160000, + 0 + ], + [ + 1655472170000, + 0 + ], + [ + 1655472180000, + 0 + ], + [ + 1655472190000, + 0 + ], + [ + 1655472200000, + 0 + ], + [ + 1655472210000, + 0 + ], + [ + 1655472220000, + 0 + ], + [ + 1655472230000, + 0 + ], + [ + 1655472240000, + 0 + ], + [ + 1655472250000, + 0 + ], + [ + 1655472260000, + 0 + ], + [ + 1655472270000, + 0 + ], + [ + 1655472280000, + 0 + ], + [ + 1655472290000, + 0 + ] + ] + } + ], + "logstash_jvm_usage": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.jvm.mem.heap_max_in_bytes", + "metricAgg": "max", + "label": "Max Heap", + "title": "JVM Heap", + "description": "Total heap available to Logstash running in the JVM.", + "units": "B", + "format": "0.0 b", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 1037959168 + ], + [ + 1655471950000, + 1037959168 + ], + [ + 1655471960000, + 1037959168 + ], + [ + 1655471970000, + 1037959168 + ], + [ + 1655471980000, + 1037959168 + ], + [ + 1655471990000, + 1037959168 + ], + [ + 1655472000000, + 1037959168 + ], + [ + 1655472010000, + 1037959168 + ], + [ + 1655472020000, + 1037959168 + ], + [ + 1655472030000, + 1037959168 + ], + [ + 1655472040000, + 1037959168 + ], + [ + 1655472050000, + 1037959168 + ], + [ + 1655472060000, + 1037959168 + ], + [ + 1655472070000, + 1037959168 + ], + [ + 1655472080000, + 1037959168 + ], + [ + 1655472090000, + 1037959168 + ], + [ + 1655472100000, + 1037959168 + ], + [ + 1655472110000, + 1037959168 + ], + [ + 1655472120000, + 1037959168 + ], + [ + 1655472130000, + 1037959168 + ], + [ + 1655472140000, + 1037959168 + ], + [ + 1655472150000, + 1037959168 + ], + [ + 1655472160000, + 1037959168 + ], + [ + 1655472170000, + 1037959168 + ], + [ + 1655472180000, + 1037959168 + ], + [ + 1655472190000, + 1037959168 + ], + [ + 1655472200000, + 1037959168 + ], + [ + 1655472210000, + 1037959168 + ], + [ + 1655472220000, + 1037959168 + ], + [ + 1655472230000, + 1037959168 + ], + [ + 1655472240000, + 1037959168 + ], + [ + 1655472250000, + 1037959168 + ], + [ + 1655472260000, + 1037959168 + ], + [ + 1655472270000, + 1037959168 + ], + [ + 1655472280000, + 1037959168 + ], + [ + 1655472290000, + 1037959168 + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.jvm.mem.heap_used_in_bytes", + "metricAgg": "max", + "label": "Used Heap", + "title": "JVM Heap", + "description": "Total heap used by Logstash running in the JVM.", + "units": "B", + "format": "0.0 b", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 248983808 + ], + [ + 1655471950000, + 254463104 + ], + [ + 1655471960000, + 260278488 + ], + [ + 1655471970000, + 265273976 + ], + [ + 1655471980000, + 269846232 + ], + [ + 1655471990000, + 274251248 + ], + [ + 1655472000000, + 278416256 + ], + [ + 1655472010000, + 282938928 + ], + [ + 1655472020000, + 287769440 + ], + [ + 1655472030000, + 292220848 + ], + [ + 1655472040000, + 295623816 + ], + [ + 1655472050000, + 299332480 + ], + [ + 1655472060000, + 305022864 + ], + [ + 1655472070000, + 310001816 + ], + [ + 1655472080000, + 312599256 + ], + [ + 1655472090000, + 317015008 + ], + [ + 1655472100000, + 320427488 + ], + [ + 1655472110000, + 325544640 + ], + [ + 1655472120000, + 329544016 + ], + [ + 1655472130000, + 332205376 + ], + [ + 1655472140000, + 337552416 + ], + [ + 1655472150000, + 341823888 + ], + [ + 1655472160000, + 345948696 + ], + [ + 1655472170000, + 348979208 + ], + [ + 1655472180000, + 353352704 + ], + [ + 1655472190000, + 358819752 + ], + [ + 1655472200000, + 363752360 + ], + [ + 1655472210000, + 367726528 + ], + [ + 1655472220000, + 371043320 + ], + [ + 1655472230000, + 374659232 + ], + [ + 1655472240000, + 379147672 + ], + [ + 1655472250000, + 383031600 + ], + [ + 1655472260000, + 392741408 + ], + [ + 1655472270000, + 395632912 + ], + [ + 1655472280000, + 400452624 + ], + [ + 1655472290000, + 405401144 + ] + ] + } ] - } - ], - "logstash_events_latency": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.events.out", - "metricAgg": "sum", - "label": "Event Latency", - "description": "Average time spent by events in the filter and output stages, which is the total time it takes to process events divided by number of events emitted.", - "units": "ms", - "format": "0,0.[00]", - "hasCalculation": true, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - 2003.279069767442 - ], - [ - 1655471960000, - 2003.150684931507 - ], - [ - 1655471970000, - 1978.9146341463418 - ], - [ - 1655471980000, - 1969.45 - ], - [ - 1655471990000, - 2003.4864864864862 - ], - [ - 1655472000000, - 2002.9708737864075 - ], - [ - 1655472010000, - 1984.1809523809525 - ], - [ - 1655472020000, - 1970.5483870967741 - ], - [ - 1655472030000, - 2002.7954545454543 - ], - [ - 1655472040000, - 2002.6666666666667 - ], - [ - 1655472050000, - 2002.9629629629628 - ], - [ - 1655472060000, - 2002.7519379844962 - ], - [ - 1655472070000, - 2002.931818181818 - ], - [ - 1655472080000, - 0 - ], - [ - 1655472090000, - 2002.6440677966102 - ], - [ - 1655472100000, - 1983.9326923076924 - ], - [ - 1655472110000, - 2002.8425925925926 - ], - [ - 1655472120000, - 2003.4285714285718 - ], - [ - 1655472130000, - 2002.964285714286 - ], - [ - 1655472140000, - 2002.9518072289154 - ], - [ - 1655472150000, - 2002.9462365591398 - ], - [ - 1655472160000, - 2003.0093457943926 - ], - [ - 1655472170000, - 2002.5384615384617 - ], - [ - 1655472180000, - 2002.7906976744187 - ], - [ - 1655472190000, - 1973.7956204379564 - ], - [ - 1655472200000, - 1957.0381679389313 - ], - [ - 1655472210000, - 2002.6666666666667 - ], - [ - 1655472220000, - 0 - ], - [ - 1655472230000, - 2003.2432432432431 - ], - [ - 1655472240000, - 2003.029411764706 - ], - [ - 1655472250000, - 0 - ], - [ - 1655472260000, - 2003.0243902439024 - ], - [ - 1655472270000, - 2003.0338983050847 - ], - [ - 1655472280000, - 2002.9772727272727 - ], - [ - 1655472290000, - 2002.6799999999998 - ] - ] - } - ], - "logstash_node_cpu_metric": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.process.cpu.percent", - "metricAgg": "max", - "label": "CPU Utilization", - "description": "Percentage of CPU usage reported by the OS (100% is the max).", - "units": "%", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - 0 - ], - [ - 1655471950000, - 0 - ], - [ - 1655471960000, - 0 - ], - [ - 1655471970000, - 0 - ], - [ - 1655471980000, - 0 - ], - [ - 1655471990000, - 0 - ], - [ - 1655472000000, - 0 - ], - [ - 1655472010000, - 0 - ], - [ - 1655472020000, - 0 - ], - [ - 1655472030000, - 0 - ], - [ - 1655472040000, - 0 - ], - [ - 1655472050000, - 0 - ], - [ - 1655472060000, - 0 - ], - [ - 1655472070000, - 0 - ], - [ - 1655472080000, - 0 - ], - [ - 1655472090000, - 0 - ], - [ - 1655472100000, - 0 - ], - [ - 1655472110000, - 0 - ], - [ - 1655472120000, - 0 - ], - [ - 1655472130000, - 0 - ], - [ - 1655472140000, - 0 - ], - [ - 1655472150000, - 0 - ], - [ - 1655472160000, - 0 - ], - [ - 1655472170000, - 0 - ], - [ - 1655472180000, - 0 - ], - [ - 1655472190000, - 0 - ], - [ - 1655472200000, - 0 - ], - [ - 1655472210000, - 0 - ], - [ - 1655472220000, - 0 - ], - [ - 1655472230000, - 0 - ], - [ - 1655472240000, - 0 - ], - [ - 1655472250000, - 0 - ], - [ - 1655472260000, - 0 - ], - [ - 1655472270000, - 0 - ], - [ - 1655472280000, - 0 - ], - [ - 1655472290000, - 0 - ] - ] - } - ], - "logstash_jvm_usage": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.jvm.mem.heap_max_in_bytes", - "metricAgg": "max", - "label": "Max Heap", - "title": "JVM Heap", - "description": "Total heap available to Logstash running in the JVM.", - "units": "B", - "format": "0.0 b", - "hasCalculation": false, - "isDerivative": false + }, + "nodeSummary": { + "ephemeral_id": "88c01586-1891-4a0e-a2ca-ca5c988f8cbb", + "host": "kevins-macbook-pro.home", + "http_address": "127.0.0.1:9600", + "name": "kevins-macbook-pro.home", + "pipeline": { + "batch_size": 125, + "workers": 16 }, - "data": [ - [ - 1655471940000, - 1037959168 - ], - [ - 1655471950000, - 1037959168 - ], - [ - 1655471960000, - 1037959168 - ], - [ - 1655471970000, - 1037959168 - ], - [ - 1655471980000, - 1037959168 - ], - [ - 1655471990000, - 1037959168 - ], - [ - 1655472000000, - 1037959168 - ], - [ - 1655472010000, - 1037959168 - ], - [ - 1655472020000, - 1037959168 - ], - [ - 1655472030000, - 1037959168 - ], - [ - 1655472040000, - 1037959168 - ], - [ - 1655472050000, - 1037959168 - ], - [ - 1655472060000, - 1037959168 - ], - [ - 1655472070000, - 1037959168 - ], - [ - 1655472080000, - 1037959168 - ], - [ - 1655472090000, - 1037959168 - ], - [ - 1655472100000, - 1037959168 - ], - [ - 1655472110000, - 1037959168 - ], - [ - 1655472120000, - 1037959168 - ], - [ - 1655472130000, - 1037959168 - ], - [ - 1655472140000, - 1037959168 - ], - [ - 1655472150000, - 1037959168 - ], - [ - 1655472160000, - 1037959168 - ], - [ - 1655472170000, - 1037959168 - ], - [ - 1655472180000, - 1037959168 - ], - [ - 1655472190000, - 1037959168 - ], - [ - 1655472200000, - 1037959168 - ], - [ - 1655472210000, - 1037959168 - ], - [ - 1655472220000, - 1037959168 - ], - [ - 1655472230000, - 1037959168 - ], - [ - 1655472240000, - 1037959168 - ], - [ - 1655472250000, - 1037959168 - ], - [ - 1655472260000, - 1037959168 - ], - [ - 1655472270000, - 1037959168 - ], - [ - 1655472280000, - 1037959168 - ], - [ - 1655472290000, - 1037959168 - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 + "snapshot": false, + "status": "green", + "uuid": "f9efd237-3bbf-4a9b-9ce7-a16141b9d981", + "version": "8.2.2", + "availability": false, + "events": { + "duration_in_millis": 5145881, + "filtered": 2579, + "in": 3978, + "out": 2579 }, - "metric": { - "app": "logstash", - "field": "logstash_stats.jvm.mem.heap_used_in_bytes", - "metricAgg": "max", - "label": "Used Heap", - "title": "JVM Heap", - "description": "Total heap used by Logstash running in the JVM.", - "units": "B", - "format": "0.0 b", - "hasCalculation": false, - "isDerivative": false + "reloads": { + "failures": 0, + "successes": 0 }, - "data": [ - [ - 1655471940000, - 248983808 - ], - [ - 1655471950000, - 254463104 - ], - [ - 1655471960000, - 260278488 - ], - [ - 1655471970000, - 265273976 - ], - [ - 1655471980000, - 269846232 - ], - [ - 1655471990000, - 274251248 - ], - [ - 1655472000000, - 278416256 - ], - [ - 1655472010000, - 282938928 - ], - [ - 1655472020000, - 287769440 - ], - [ - 1655472030000, - 292220848 - ], - [ - 1655472040000, - 295623816 - ], - [ - 1655472050000, - 299332480 - ], - [ - 1655472060000, - 305022864 - ], - [ - 1655472070000, - 310001816 - ], - [ - 1655472080000, - 312599256 - ], - [ - 1655472090000, - 317015008 - ], - [ - 1655472100000, - 320427488 - ], - [ - 1655472110000, - 325544640 - ], - [ - 1655472120000, - 329544016 - ], - [ - 1655472130000, - 332205376 - ], - [ - 1655472140000, - 337552416 - ], - [ - 1655472150000, - 341823888 - ], - [ - 1655472160000, - 345948696 - ], - [ - 1655472170000, - 348979208 - ], - [ - 1655472180000, - 353352704 - ], - [ - 1655472190000, - 358819752 - ], - [ - 1655472200000, - 363752360 - ], - [ - 1655472210000, - 367726528 - ], - [ - 1655472220000, - 371043320 - ], - [ - 1655472230000, - 374659232 - ], - [ - 1655472240000, - 379147672 - ], - [ - 1655472250000, - 383031600 - ], - [ - 1655472260000, - 392741408 - ], - [ - 1655472270000, - 395632912 - ], - [ - 1655472280000, - 400452624 - ], - [ - 1655472290000, - 405401144 - ] - ] - } - ] - }, - "nodeSummary": { - "ephemeral_id": "88c01586-1891-4a0e-a2ca-ca5c988f8cbb", - "host": "kevins-macbook-pro.home", - "http_address": "127.0.0.1:9600", - "name": "kevins-macbook-pro.home", - "pipeline": { - "batch_size": 125, - "workers": 16 - }, - "snapshot": false, - "status": "green", - "uuid": "f9efd237-3bbf-4a9b-9ce7-a16141b9d981", - "version": "8.2.2", - "availability": false, - "events": { - "duration_in_millis": 5145881, - "filtered": 2579, - "in": 3978, - "out": 2579 - }, - "reloads": { - "failures": 0, - "successes": 0 - }, - "uptime": 407358 - } + "uptime": 407358 + } } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_advanced_8.json b/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_advanced_8.json index 41760111cf055..3a3e619f065c0 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_advanced_8.json +++ b/x-pack/test/api_integration/apis/monitoring/logstash/fixtures/node_detail_advanced_8.json @@ -1,1521 +1,1521 @@ { - "metrics": { - "logstash_node_cpu_utilization": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.process.cpu.percent", - "metricAgg": "max", - "label": "CPU Utilization", - "description": "Percentage of CPU usage reported by the OS (100% is the max).", - "units": "%", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - 0 - ], - [ - 1655471950000, - 0 - ], - [ - 1655471960000, - 0 - ], - [ - 1655471970000, - 0 - ], - [ - 1655471980000, - 0 - ], - [ - 1655471990000, - 0 - ], - [ - 1655472000000, - 0 - ], - [ - 1655472010000, - 0 - ], - [ - 1655472020000, - 0 - ], - [ - 1655472030000, - 0 - ], - [ - 1655472040000, - 0 - ], - [ - 1655472050000, - 0 - ], - [ - 1655472060000, - 0 - ], - [ - 1655472070000, - 0 - ], - [ - 1655472080000, - 0 - ], - [ - 1655472090000, - 0 - ], - [ - 1655472100000, - 0 - ], - [ - 1655472110000, - 0 - ], - [ - 1655472120000, - 0 - ], - [ - 1655472130000, - 0 - ], - [ - 1655472140000, - 0 - ], - [ - 1655472150000, - 0 - ], - [ - 1655472160000, - 0 - ], - [ - 1655472170000, - 0 - ], - [ - 1655472180000, - 0 - ], - [ - 1655472190000, - 0 - ], - [ - 1655472200000, - 0 - ], - [ - 1655472210000, - 0 - ], - [ - 1655472220000, - 0 - ], - [ - 1655472230000, - 0 - ], - [ - 1655472240000, - 0 - ], - [ - 1655472250000, - 0 - ], - [ - 1655472260000, - 0 - ], - [ - 1655472270000, - 0 - ], - [ - 1655472280000, - 0 - ], - [ - 1655472290000, - 0 - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.process.cpu.percent", - "metricAgg": "max", - "label": "Cgroup CPU Utilization", - "title": "CPU Utilization", - "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", - "units": "%", - "format": "0,0.[00]", - "hasCalculation": true, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - } - ], - "logstash_node_cgroup_cpu": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cgroup.cpuacct.usage_nanos", - "metricAgg": "max", - "label": "Cgroup Usage", - "title": "Cgroup CPU Performance", - "description": "The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.", - "units": "ns", - "format": "0,0.[0]a", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cgroup.cpu.stat.time_throttled_nanos", - "metricAgg": "max", - "label": "Cgroup Throttling", - "title": "Cgroup CPU Performance", - "description": "The amount of throttled time, reported in nanoseconds, of the Cgroup.", - "units": "ns", - "format": "0,0.[0]a", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - } - ], - "logstash_node_cgroup_stats": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cgroup.cpu.stat.number_of_elapsed_periods", - "metricAgg": "max", - "label": "Cgroup Elapsed Periods", - "title": "Cgroup CFS Stats", - "description": "The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] + "metrics": { + "logstash_node_cpu_utilization": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.process.cpu.percent", + "metricAgg": "max", + "label": "CPU Utilization", + "description": "Percentage of CPU usage reported by the OS (100% is the max).", + "units": "%", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 0 + ], + [ + 1655471950000, + 0 + ], + [ + 1655471960000, + 0 + ], + [ + 1655471970000, + 0 + ], + [ + 1655471980000, + 0 + ], + [ + 1655471990000, + 0 + ], + [ + 1655472000000, + 0 + ], + [ + 1655472010000, + 0 + ], + [ + 1655472020000, + 0 + ], + [ + 1655472030000, + 0 + ], + [ + 1655472040000, + 0 + ], + [ + 1655472050000, + 0 + ], + [ + 1655472060000, + 0 + ], + [ + 1655472070000, + 0 + ], + [ + 1655472080000, + 0 + ], + [ + 1655472090000, + 0 + ], + [ + 1655472100000, + 0 + ], + [ + 1655472110000, + 0 + ], + [ + 1655472120000, + 0 + ], + [ + 1655472130000, + 0 + ], + [ + 1655472140000, + 0 + ], + [ + 1655472150000, + 0 + ], + [ + 1655472160000, + 0 + ], + [ + 1655472170000, + 0 + ], + [ + 1655472180000, + 0 + ], + [ + 1655472190000, + 0 + ], + [ + 1655472200000, + 0 + ], + [ + 1655472210000, + 0 + ], + [ + 1655472220000, + 0 + ], + [ + 1655472230000, + 0 + ], + [ + 1655472240000, + 0 + ], + [ + 1655472250000, + 0 + ], + [ + 1655472260000, + 0 + ], + [ + 1655472270000, + 0 + ], + [ + 1655472280000, + 0 + ], + [ + 1655472290000, + 0 + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.process.cpu.percent", + "metricAgg": "max", + "label": "Cgroup CPU Utilization", + "title": "CPU Utilization", + "description": "CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.", + "units": "%", + "format": "0,0.[00]", + "hasCalculation": true, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + } + ], + "logstash_node_cgroup_cpu": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cgroup.cpuacct.usage_nanos", + "metricAgg": "max", + "label": "Cgroup Usage", + "title": "Cgroup CPU Performance", + "description": "The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.", + "units": "ns", + "format": "0,0.[0]a", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cgroup.cpu.stat.time_throttled_nanos", + "metricAgg": "max", + "label": "Cgroup Throttling", + "title": "Cgroup CPU Performance", + "description": "The amount of throttled time, reported in nanoseconds, of the Cgroup.", + "units": "ns", + "format": "0,0.[0]a", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + } + ], + "logstash_node_cgroup_stats": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cgroup.cpu.stat.number_of_elapsed_periods", + "metricAgg": "max", + "label": "Cgroup Elapsed Periods", + "title": "Cgroup CFS Stats", + "description": "The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.os.cgroup.cpu.stat.number_of_times_throttled", + "metricAgg": "max", + "label": "Cgroup Throttled Count", + "title": "Cgroup CFS Stats", + "description": "The number of times that the CPU was throttled by the Cgroup.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": true + }, + "data": [ + [ + 1655471940000, + null + ], + [ + 1655471950000, + null + ], + [ + 1655471960000, + null + ], + [ + 1655471970000, + null + ], + [ + 1655471980000, + null + ], + [ + 1655471990000, + null + ], + [ + 1655472000000, + null + ], + [ + 1655472010000, + null + ], + [ + 1655472020000, + null + ], + [ + 1655472030000, + null + ], + [ + 1655472040000, + null + ], + [ + 1655472050000, + null + ], + [ + 1655472060000, + null + ], + [ + 1655472070000, + null + ], + [ + 1655472080000, + null + ], + [ + 1655472090000, + null + ], + [ + 1655472100000, + null + ], + [ + 1655472110000, + null + ], + [ + 1655472120000, + null + ], + [ + 1655472130000, + null + ], + [ + 1655472140000, + null + ], + [ + 1655472150000, + null + ], + [ + 1655472160000, + null + ], + [ + 1655472170000, + null + ], + [ + 1655472180000, + null + ], + [ + 1655472190000, + null + ], + [ + 1655472200000, + null + ], + [ + 1655472210000, + null + ], + [ + 1655472220000, + null + ], + [ + 1655472230000, + null + ], + [ + 1655472240000, + null + ], + [ + 1655472250000, + null + ], + [ + 1655472260000, + null + ], + [ + 1655472270000, + null + ], + [ + 1655472280000, + null + ], + [ + 1655472290000, + null + ] + ] + } + ], + "logstash_queue_events_count": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.queue.events_count", + "metricAgg": "max", + "label": "Events Queued", + "title": "Persistent Queue Events", + "description": "Average number of events in the persistent queue waiting to be processed by the filter and output stages.", + "units": "", + "format": "0,0.[00]", + "hasCalculation": false, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 7 + ], + [ + 1655471950000, + 2 + ], + [ + 1655471960000, + 0 + ], + [ + 1655471970000, + 15 + ], + [ + 1655471980000, + 7 + ], + [ + 1655471990000, + 2 + ], + [ + 1655472000000, + 2 + ], + [ + 1655472010000, + 14 + ], + [ + 1655472020000, + 28 + ], + [ + 1655472030000, + 21 + ], + [ + 1655472040000, + 61 + ], + [ + 1655472050000, + 14 + ], + [ + 1655472060000, + 6 + ], + [ + 1655472070000, + 0 + ], + [ + 1655472080000, + 101 + ], + [ + 1655472090000, + 76 + ], + [ + 1655472100000, + 6 + ], + [ + 1655472110000, + 23 + ], + [ + 1655472120000, + 23 + ], + [ + 1655472130000, + 123 + ], + [ + 1655472140000, + 51 + ], + [ + 1655472150000, + 23 + ], + [ + 1655472160000, + 2 + ], + [ + 1655472170000, + 102 + ], + [ + 1655472180000, + 78 + ], + [ + 1655472190000, + 22 + ], + [ + 1655472200000, + 17 + ], + [ + 1655472210000, + 14 + ], + [ + 1655472220000, + 70 + ], + [ + 1655472230000, + 45 + ], + [ + 1655472240000, + 17 + ], + [ + 1655472250000, + 75 + ], + [ + 1655472260000, + 52 + ], + [ + 1655472270000, + 153 + ], + [ + 1655472280000, + 1 + ], + [ + 1655472290000, + 16 + ] + ] + } + ], + "logstash_pipeline_queue_size": [ + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.pipelines.queue.queue_size_in_bytes", + "label": "Queue Size", + "title": "Persistent Queue Size", + "description": "Current size of all persistent queues in the Logstash pipelines on this node.", + "units": "B", + "format": "0,0.0 b", + "hasCalculation": true, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 141265 + ], + [ + 1655471950000, + 173965 + ], + [ + 1655471960000, + 206665 + ], + [ + 1655471970000, + 239692 + ], + [ + 1655471980000, + 272392 + ], + [ + 1655471990000, + 305092 + ], + [ + 1655472000000, + 337792 + ], + [ + 1655472010000, + 370489 + ], + [ + 1655472020000, + 403189 + ], + [ + 1655472030000, + 435886 + ], + [ + 1655472040000, + 468586 + ], + [ + 1655472050000, + 501286 + ], + [ + 1655472060000, + 533986 + ], + [ + 1655472070000, + 566686 + ], + [ + 1655472080000, + 599713 + ], + [ + 1655472090000, + 632413 + ], + [ + 1655472100000, + 665110 + ], + [ + 1655472110000, + 697810 + ], + [ + 1655472120000, + 730510 + ], + [ + 1655472130000, + 763210 + ], + [ + 1655472140000, + 795910 + ], + [ + 1655472150000, + 828610 + ], + [ + 1655472160000, + 861307 + ], + [ + 1655472170000, + 894007 + ], + [ + 1655472180000, + 927034 + ], + [ + 1655472190000, + 959731 + ], + [ + 1655472200000, + 992431 + ], + [ + 1655472210000, + 1025131 + ], + [ + 1655472220000, + 1057831 + ], + [ + 1655472230000, + 1090531 + ], + [ + 1655472240000, + 1123231 + ], + [ + 1655472250000, + 1155931 + ], + [ + 1655472260000, + 1188631 + ], + [ + 1655472270000, + 1221331 + ], + [ + 1655472280000, + 1254358 + ], + [ + 1655472290000, + 1287058 + ] + ] + }, + { + "bucket_size": "10 seconds", + "timeRange": { + "min": 1655471940000, + "max": 1655472300000 + }, + "metric": { + "app": "logstash", + "field": "logstash_stats.pipelines.queue.max_queue_size_in_bytes", + "label": "Max Queue Size", + "description": "Maximum size set for the persistent queues on this node.", + "units": "B", + "format": "0,0.0 b", + "hasCalculation": true, + "isDerivative": false + }, + "data": [ + [ + 1655471940000, + 1073741824 + ], + [ + 1655471950000, + 1073741824 + ], + [ + 1655471960000, + 1073741824 + ], + [ + 1655471970000, + 1073741824 + ], + [ + 1655471980000, + 1073741824 + ], + [ + 1655471990000, + 1073741824 + ], + [ + 1655472000000, + 1073741824 + ], + [ + 1655472010000, + 1073741824 + ], + [ + 1655472020000, + 1073741824 + ], + [ + 1655472030000, + 1073741824 + ], + [ + 1655472040000, + 1073741824 + ], + [ + 1655472050000, + 1073741824 + ], + [ + 1655472060000, + 1073741824 + ], + [ + 1655472070000, + 1073741824 + ], + [ + 1655472080000, + 1073741824 + ], + [ + 1655472090000, + 1073741824 + ], + [ + 1655472100000, + 1073741824 + ], + [ + 1655472110000, + 1073741824 + ], + [ + 1655472120000, + 1073741824 + ], + [ + 1655472130000, + 1073741824 + ], + [ + 1655472140000, + 1073741824 + ], + [ + 1655472150000, + 1073741824 + ], + [ + 1655472160000, + 1073741824 + ], + [ + 1655472170000, + 1073741824 + ], + [ + 1655472180000, + 1073741824 + ], + [ + 1655472190000, + 1073741824 + ], + [ + 1655472200000, + 1073741824 + ], + [ + 1655472210000, + 1073741824 + ], + [ + 1655472220000, + 1073741824 + ], + [ + 1655472230000, + 1073741824 + ], + [ + 1655472240000, + 1073741824 + ], + [ + 1655472250000, + 1073741824 + ], + [ + 1655472260000, + 1073741824 + ], + [ + 1655472270000, + 1073741824 + ], + [ + 1655472280000, + 1073741824 + ], + [ + 1655472290000, + 1073741824 + ] + ] + } ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.os.cgroup.cpu.stat.number_of_times_throttled", - "metricAgg": "max", - "label": "Cgroup Throttled Count", - "title": "Cgroup CFS Stats", - "description": "The number of times that the CPU was throttled by the Cgroup.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": true - }, - "data": [ - [ - 1655471940000, - null - ], - [ - 1655471950000, - null - ], - [ - 1655471960000, - null - ], - [ - 1655471970000, - null - ], - [ - 1655471980000, - null - ], - [ - 1655471990000, - null - ], - [ - 1655472000000, - null - ], - [ - 1655472010000, - null - ], - [ - 1655472020000, - null - ], - [ - 1655472030000, - null - ], - [ - 1655472040000, - null - ], - [ - 1655472050000, - null - ], - [ - 1655472060000, - null - ], - [ - 1655472070000, - null - ], - [ - 1655472080000, - null - ], - [ - 1655472090000, - null - ], - [ - 1655472100000, - null - ], - [ - 1655472110000, - null - ], - [ - 1655472120000, - null - ], - [ - 1655472130000, - null - ], - [ - 1655472140000, - null - ], - [ - 1655472150000, - null - ], - [ - 1655472160000, - null - ], - [ - 1655472170000, - null - ], - [ - 1655472180000, - null - ], - [ - 1655472190000, - null - ], - [ - 1655472200000, - null - ], - [ - 1655472210000, - null - ], - [ - 1655472220000, - null - ], - [ - 1655472230000, - null - ], - [ - 1655472240000, - null - ], - [ - 1655472250000, - null - ], - [ - 1655472260000, - null - ], - [ - 1655472270000, - null - ], - [ - 1655472280000, - null - ], - [ - 1655472290000, - null - ] - ] - } - ], - "logstash_queue_events_count": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.queue.events_count", - "metricAgg": "max", - "label": "Events Queued", - "title": "Persistent Queue Events", - "description": "Average number of events in the persistent queue waiting to be processed by the filter and output stages.", - "units": "", - "format": "0,0.[00]", - "hasCalculation": false, - "isDerivative": false - }, - "data": [ - [ - 1655471940000, - 7 - ], - [ - 1655471950000, - 2 - ], - [ - 1655471960000, - 0 - ], - [ - 1655471970000, - 15 - ], - [ - 1655471980000, - 7 - ], - [ - 1655471990000, - 2 - ], - [ - 1655472000000, - 2 - ], - [ - 1655472010000, - 14 - ], - [ - 1655472020000, - 28 - ], - [ - 1655472030000, - 21 - ], - [ - 1655472040000, - 61 - ], - [ - 1655472050000, - 14 - ], - [ - 1655472060000, - 6 - ], - [ - 1655472070000, - 0 - ], - [ - 1655472080000, - 101 - ], - [ - 1655472090000, - 76 - ], - [ - 1655472100000, - 6 - ], - [ - 1655472110000, - 23 - ], - [ - 1655472120000, - 23 - ], - [ - 1655472130000, - 123 - ], - [ - 1655472140000, - 51 - ], - [ - 1655472150000, - 23 - ], - [ - 1655472160000, - 2 - ], - [ - 1655472170000, - 102 - ], - [ - 1655472180000, - 78 - ], - [ - 1655472190000, - 22 - ], - [ - 1655472200000, - 17 - ], - [ - 1655472210000, - 14 - ], - [ - 1655472220000, - 70 - ], - [ - 1655472230000, - 45 - ], - [ - 1655472240000, - 17 - ], - [ - 1655472250000, - 75 - ], - [ - 1655472260000, - 52 - ], - [ - 1655472270000, - 153 - ], - [ - 1655472280000, - 1 - ], - [ - 1655472290000, - 16 - ] - ] - } - ], - "logstash_pipeline_queue_size": [ - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 - }, - "metric": { - "app": "logstash", - "field": "logstash_stats.pipelines.queue.queue_size_in_bytes", - "label": "Queue Size", - "title": "Persistent Queue Size", - "description": "Current size of all persistent queues in the Logstash pipelines on this node.", - "units": "B", - "format": "0,0.0 b", - "hasCalculation": true, - "isDerivative": false + }, + "nodeSummary": { + "ephemeral_id": "88c01586-1891-4a0e-a2ca-ca5c988f8cbb", + "host": "kevins-macbook-pro.home", + "http_address": "127.0.0.1:9600", + "name": "kevins-macbook-pro.home", + "pipeline": { + "batch_size": 125, + "workers": 16 }, - "data": [ - [ - 1655471940000, - 141265 - ], - [ - 1655471950000, - 173965 - ], - [ - 1655471960000, - 206665 - ], - [ - 1655471970000, - 239692 - ], - [ - 1655471980000, - 272392 - ], - [ - 1655471990000, - 305092 - ], - [ - 1655472000000, - 337792 - ], - [ - 1655472010000, - 370489 - ], - [ - 1655472020000, - 403189 - ], - [ - 1655472030000, - 435886 - ], - [ - 1655472040000, - 468586 - ], - [ - 1655472050000, - 501286 - ], - [ - 1655472060000, - 533986 - ], - [ - 1655472070000, - 566686 - ], - [ - 1655472080000, - 599713 - ], - [ - 1655472090000, - 632413 - ], - [ - 1655472100000, - 665110 - ], - [ - 1655472110000, - 697810 - ], - [ - 1655472120000, - 730510 - ], - [ - 1655472130000, - 763210 - ], - [ - 1655472140000, - 795910 - ], - [ - 1655472150000, - 828610 - ], - [ - 1655472160000, - 861307 - ], - [ - 1655472170000, - 894007 - ], - [ - 1655472180000, - 927034 - ], - [ - 1655472190000, - 959731 - ], - [ - 1655472200000, - 992431 - ], - [ - 1655472210000, - 1025131 - ], - [ - 1655472220000, - 1057831 - ], - [ - 1655472230000, - 1090531 - ], - [ - 1655472240000, - 1123231 - ], - [ - 1655472250000, - 1155931 - ], - [ - 1655472260000, - 1188631 - ], - [ - 1655472270000, - 1221331 - ], - [ - 1655472280000, - 1254358 - ], - [ - 1655472290000, - 1287058 - ] - ] - }, - { - "bucket_size": "10 seconds", - "timeRange": { - "min": 1655471940000, - "max": 1655472300000 + "snapshot": false, + "status": "green", + "uuid": "f9efd237-3bbf-4a9b-9ce7-a16141b9d981", + "version": "8.2.2", + "availability": false, + "events": { + "duration_in_millis": 5145881, + "filtered": 2579, + "in": 3978, + "out": 2579 }, - "metric": { - "app": "logstash", - "field": "logstash_stats.pipelines.queue.max_queue_size_in_bytes", - "label": "Max Queue Size", - "description": "Maximum size set for the persistent queues on this node.", - "units": "B", - "format": "0,0.0 b", - "hasCalculation": true, - "isDerivative": false + "reloads": { + "failures": 0, + "successes": 0 }, - "data": [ - [ - 1655471940000, - 1073741824 - ], - [ - 1655471950000, - 1073741824 - ], - [ - 1655471960000, - 1073741824 - ], - [ - 1655471970000, - 1073741824 - ], - [ - 1655471980000, - 1073741824 - ], - [ - 1655471990000, - 1073741824 - ], - [ - 1655472000000, - 1073741824 - ], - [ - 1655472010000, - 1073741824 - ], - [ - 1655472020000, - 1073741824 - ], - [ - 1655472030000, - 1073741824 - ], - [ - 1655472040000, - 1073741824 - ], - [ - 1655472050000, - 1073741824 - ], - [ - 1655472060000, - 1073741824 - ], - [ - 1655472070000, - 1073741824 - ], - [ - 1655472080000, - 1073741824 - ], - [ - 1655472090000, - 1073741824 - ], - [ - 1655472100000, - 1073741824 - ], - [ - 1655472110000, - 1073741824 - ], - [ - 1655472120000, - 1073741824 - ], - [ - 1655472130000, - 1073741824 - ], - [ - 1655472140000, - 1073741824 - ], - [ - 1655472150000, - 1073741824 - ], - [ - 1655472160000, - 1073741824 - ], - [ - 1655472170000, - 1073741824 - ], - [ - 1655472180000, - 1073741824 - ], - [ - 1655472190000, - 1073741824 - ], - [ - 1655472200000, - 1073741824 - ], - [ - 1655472210000, - 1073741824 - ], - [ - 1655472220000, - 1073741824 - ], - [ - 1655472230000, - 1073741824 - ], - [ - 1655472240000, - 1073741824 - ], - [ - 1655472250000, - 1073741824 - ], - [ - 1655472260000, - 1073741824 - ], - [ - 1655472270000, - 1073741824 - ], - [ - 1655472280000, - 1073741824 - ], - [ - 1655472290000, - 1073741824 - ] - ] - } - ] - }, - "nodeSummary": { - "uuid": "f9efd237-3bbf-4a9b-9ce7-a16141b9d981", - "ephemeral_id": "88c01586-1891-4a0e-a2ca-ca5c988f8cbb", - "version": "8.2.2", - "snapshot": false, - "http_address": "127.0.0.1:9600", - "name": "kevins-macbook-pro.home", - "host": "kevins-macbook-pro.home", - "status": "green", - "pipeline": { - "workers": 16, - "batch_size": 125 - }, - "availability": false, - "events": { - "duration_in_millis": 5145881, - "in": 3978, - "filtered": 2579, - "out": 2579 - }, - "reloads": { - "failures": 0, - "successes": 0 - }, - "uptime": 407358 - } + "uptime": 407358 + } } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/multicluster_pipelines_mb.js b/x-pack/test/api_integration/apis/monitoring/logstash/multicluster_pipelines_mb.js index 521731c920a6f..a7d5194c35f79 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/multicluster_pipelines_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/logstash/multicluster_pipelines_mb.js @@ -13,34 +13,37 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('pipelines listing multicluster mb', () => { - const archive = - 'x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_mb'; - const timeRange = { - min: '2019-11-11T15:13:45.266Z', - max: '2019-11-11T15:17:05.399Z', - }; - const pagination = { - size: 10, - index: 0, - }; + describe('pipelines listing multicluster - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`pipelines listing multicluster ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_${source}`; + const timeRange = { + min: '2019-11-11T15:13:45.266Z', + max: '2019-11-11T15:17:05.399Z', + }; + const pagination = { + size: 10, + index: 0, + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should get the pipelines', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/hJS0FZ7wR9GGdYs8RNW8pw/logstash/pipelines') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination }) - .expect(200); + it('should get the pipelines', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/hJS0FZ7wR9GGdYs8RNW8pw/logstash/pipelines') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, pagination }) + .expect(200); - expect(body).to.eql(fixture); + expect(body).to.eql(fixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/node_detail_mb.js b/x-pack/test/api_integration/apis/monitoring/logstash/node_detail_mb.js index 0aed0c7b1c552..6a8068fe5b9b8 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/node_detail_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/logstash/node_detail_mb.js @@ -13,44 +13,47 @@ export default function ({ getService }) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); - // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/142642 - describe.skip('node detail mb', () => { - const archive = 'x-pack/test/api_integration/apis/monitoring/es_archives/logstash_8'; - const timeRange = { - min: '2022-06-17T13:19:00.000Z', - max: '2022-06-17T13:25:00.000Z', - }; - - before('load archive', () => { - return esArchiver.load(archive); - }); - - after('unload archive', () => { - return esArchiver.unload(archive); - }); - - it('should summarize the Logstash node with non-advanced chart data metrics', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/__standalone_cluster__/logstash/node/f9efd237-3bbf-4a9b-9ce7-a16141b9d981' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange, is_advanced: false }) - .expect(200); - - expect(body).to.eql(nodeDetailFixture); - }); - - it('should summarize the Logstash node with advanced chart data metrics', async () => { - const { body } = await supertest - .post( - '/api/monitoring/v1/clusters/__standalone_cluster__/logstash/node/f9efd237-3bbf-4a9b-9ce7-a16141b9d981' - ) - .set('kbn-xsrf', 'xxx') - .send({ timeRange, is_advanced: true }) - .expect(200); - - expect(body).to.eql(nodeDetailAdvancedFixture); + describe('node detail - metricbeat and package', () => { + ['logstash_8', 'logstash_package'].forEach((source) => { + describe(`node detail ${source}`, () => { + const archive = `x-pack/test/api_integration/apis/monitoring/es_archives/${source}`; + const timeRange = { + min: '2022-06-17T13:19:00.000Z', + max: '2022-06-17T13:25:00.000Z', + }; + + before('load archive', () => { + return esArchiver.load(archive); + }); + + after('unload archive', () => { + return esArchiver.unload(archive); + }); + + it('should summarize the Logstash node with non-advanced chart data metrics', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/__standalone_cluster__/logstash/node/f9efd237-3bbf-4a9b-9ce7-a16141b9d981' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange, is_advanced: false }) + .expect(200); + + expect(body).to.eql(nodeDetailFixture); + }); + + it('should summarize the Logstash node with advanced chart data metrics', async () => { + const { body } = await supertest + .post( + '/api/monitoring/v1/clusters/__standalone_cluster__/logstash/node/f9efd237-3bbf-4a9b-9ce7-a16141b9d981' + ) + .set('kbn-xsrf', 'xxx') + .send({ timeRange, is_advanced: true }) + .expect(200); + + expect(body).to.eql(nodeDetailAdvancedFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/nodes_mb.js b/x-pack/test/api_integration/apis/monitoring/logstash/nodes_mb.js index aac85aff13041..d518a37d81a04 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/nodes_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/logstash/nodes_mb.js @@ -13,29 +13,33 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('node listing mb', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb'; - const timeRange = { - min: '2018-01-22T09:33:13.000Z', - max: '2018-01-22T09:41:04.000Z', - }; + describe('node listing - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`node listing ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/logstash_pipelines_${source}`; + const timeRange = { + min: '2018-01-22T09:33:13.000Z', + max: '2018-01-22T09:41:04.000Z', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should summarize the Logstash nodes with stats', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/1rhApLfQShSh3JsNqYCkmA/logstash/nodes') - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); + it('should summarize the Logstash nodes with stats', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/1rhApLfQShSh3JsNqYCkmA/logstash/nodes') + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); - expect(body).to.eql(nodesFixture); + expect(body).to.eql(nodesFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/overview_mb.js b/x-pack/test/api_integration/apis/monitoring/logstash/overview_mb.js index 353cd7b4a852c..1c298e2a422da 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/overview_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/logstash/overview_mb.js @@ -13,29 +13,33 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('overview mb', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb'; - const timeRange = { - min: '2018-01-22T09:33:13.000Z', - max: '2018-01-22T09:41:04.000Z', - }; + describe('overview - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`overview ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/logstash_pipelines_${source}`; + const timeRange = { + min: '2018-01-22T09:33:13.000Z', + max: '2018-01-22T09:41:04.000Z', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should summarize two Logstash nodes with metrics', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/1rhApLfQShSh3JsNqYCkmA/logstash') - .set('kbn-xsrf', 'xxx') - .send({ timeRange }) - .expect(200); + it('should summarize two Logstash nodes with metrics', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/1rhApLfQShSh3JsNqYCkmA/logstash') + .set('kbn-xsrf', 'xxx') + .send({ timeRange }) + .expect(200); - expect(body).to.eql(overviewFixture); + expect(body).to.eql(overviewFixture); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/monitoring/logstash/pipelines_mb.js b/x-pack/test/api_integration/apis/monitoring/logstash/pipelines_mb.js index 7081af982d237..43a00c8185b58 100644 --- a/x-pack/test/api_integration/apis/monitoring/logstash/pipelines_mb.js +++ b/x-pack/test/api_integration/apis/monitoring/logstash/pipelines_mb.js @@ -13,74 +13,78 @@ export default function ({ getService }) { const supertest = getService('supertest'); const { setup, tearDown } = getLifecycleMethods(getService); - describe('pipelines mb', () => { - const archive = 'x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_mb'; - const timeRange = { - min: '2019-11-04T15:40:44.855Z', - max: '2019-11-04T15:50:38.667Z', - }; - const pagination = { - size: 10, - index: 0, - }; - const sort = { - field: 'id', - direction: 'asc', - }; + describe('pipelines - metricbeat and package', () => { + ['mb', 'package'].forEach((source) => { + describe(`pipelines ${source}`, () => { + const archive = `x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_${source}`; + const timeRange = { + min: '2019-11-04T15:40:44.855Z', + max: '2019-11-04T15:50:38.667Z', + }; + const pagination = { + size: 10, + index: 0, + }; + const sort = { + field: 'id', + direction: 'asc', + }; - before('load archive', () => { - return setup(archive); - }); + before('load archive', () => { + return setup(archive); + }); - after('unload archive', () => { - return tearDown(); - }); + after('unload archive', () => { + return tearDown(archive); + }); - it('should return paginated pipelines', async () => { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination, sort }) - .expect(200); + it('should return paginated pipelines', async () => { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, pagination, sort }) + .expect(200); - expect(body).to.eql(pipelinesFixture); - }); + expect(body).to.eql(pipelinesFixture); + }); - it('should get one of each after enough pagination', async () => { - async function getIds(page) { - const { body } = await supertest - .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') - .set('kbn-xsrf', 'xxx') - .send({ timeRange, pagination: { ...pagination, index: page }, sort }) - .expect(200); + it('should get one of each after enough pagination', async () => { + async function getIds(page) { + const { body } = await supertest + .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') + .set('kbn-xsrf', 'xxx') + .send({ timeRange, pagination: { ...pagination, index: page }, sort }) + .expect(200); - return body.pipelines.map((pipeline) => pipeline.id); - } + return body.pipelines.map((pipeline) => pipeline.id); + } - const ids = [...(await getIds(0)), ...(await getIds(1)), ...(await getIds(2))]; - expect(ids.length).to.be(26); - }); + const ids = [...(await getIds(0)), ...(await getIds(1)), ...(await getIds(2))]; + expect(ids.length).to.be(26); + }); - it('should not error out if there is missing data for part of the time series', async () => { - const customTimeRange = { - ...timeRange, - max: '2019-11-04T15:59:38.667Z', - }; + it('should not error out if there is missing data for part of the time series', async () => { + const customTimeRange = { + ...timeRange, + max: '2019-11-04T15:59:38.667Z', + }; - const customSort = { - ...sort, - field: 'logstash_cluster_pipeline_throughput', - }; + const customSort = { + ...sort, + field: 'logstash_cluster_pipeline_throughput', + }; - await supertest - .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') - .set('kbn-xsrf', 'xxx') - .send({ - timeRange: customTimeRange, - pagination: { ...pagination, index: 1 }, - sort: customSort, - }) - .expect(200); + await supertest + .post('/api/monitoring/v1/clusters/TUjQLdHNTh2SB9Wy0gOtWg/logstash/pipelines') + .set('kbn-xsrf', 'xxx') + .send({ + timeRange: customTimeRange, + pagination: { ...pagination, index: 1 }, + sort: customSort, + }) + .expect(200); + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index a16e850967bb3..c7661a978bcaf 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -79,6 +79,7 @@ export default function ({ getService }: FtrProviderContext) { 'packs_read', ], filesManagement: ['all', 'read', 'minimal_all', 'minimal_read'], + filesSharedImage: ['all', 'read', 'minimal_all', 'minimal_read'], }, reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], }; diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index 2b110aa30df7a..ef6cd6ea9d845 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -46,6 +46,7 @@ export default function ({ getService }: FtrProviderContext) { stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'], actions: ['all', 'read', 'minimal_all', 'minimal_read'], filesManagement: ['all', 'read', 'minimal_all', 'minimal_read'], + filesSharedImage: ['all', 'read', 'minimal_all', 'minimal_read'], }, global: ['all', 'read'], space: ['all', 'read'], @@ -133,6 +134,7 @@ export default function ({ getService }: FtrProviderContext) { advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], indexPatterns: ['all', 'read', 'minimal_all', 'minimal_read'], filesManagement: ['all', 'read', 'minimal_all', 'minimal_read'], + filesSharedImage: ['all', 'read', 'minimal_all', 'minimal_read'], savedObjectsManagement: ['all', 'read', 'minimal_all', 'minimal_read'], osquery: [ 'all', diff --git a/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts b/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts index 575de013a96dd..89bbb5f46108a 100644 --- a/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts +++ b/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts @@ -4,20 +4,32 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import uuid from 'uuid'; import { SimpleSavedObject } from '@kbn/core/public'; -import { SyntheticsMonitor, MonitorFields } from '@kbn/synthetics-plugin/common/runtime_types'; +import { + ConfigKey, + SyntheticsMonitor, + MonitorFields, +} from '@kbn/synthetics-plugin/common/runtime_types'; import { SYNTHETICS_API_URLS, API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; export default function ({ getService }: FtrProviderContext) { - // Failing: See https://github.com/elastic/kibana/issues/145270 + // Failing: See https://github.com/elastic/kibana/issues/146014 describe.skip('GetMonitorsOverview', function () { this.tags('skipCloud'); const supertest = getService('supertest'); + const kibanaServer = getService('kibanaServer'); + const security = getService('security'); + + const username = 'admin'; + const roleName = `synthetics_admin`; + const password = `${username}-password`; + const SPACE_ID = `test-space-${uuid.v4()}`; + const SPACE_NAME = `test-space-name ${uuid.v4()}`; let _monitors: MonitorFields[]; let monitors: MonitorFields[]; @@ -25,7 +37,7 @@ export default function ({ getService }: FtrProviderContext) { const deleteMonitor = async (id: string) => { try { await supertest - .delete(`${API_URLS.SYNTHETICS_MONITORS}/${id}`) + .delete(`/s/${SPACE_ID}${API_URLS.SYNTHETICS_MONITORS}/${id}`) .set('kbn-xsrf', 'true') .expect(200); } catch (e) { @@ -36,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) { const saveMonitor = async (monitor: MonitorFields) => { const res = await supertest - .post(API_URLS.SYNTHETICS_MONITORS) + .post(`/s/${SPACE_ID}${API_URLS.SYNTHETICS_MONITORS}`) .set('kbn-xsrf', 'true') .send(monitor); @@ -45,8 +57,24 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post(API_URLS.SYNTHETICS_ENABLEMENT).set('kbn-xsrf', 'true').expect(200); + await kibanaServer.spaces.create({ id: SPACE_ID, name: SPACE_NAME }); + await security.role.create(roleName, { + kibana: [ + { + feature: { + uptime: ['all'], + }, + spaces: ['*'], + }, + ], + }); + await security.user.create(username, { + password, + roles: [roleName], + full_name: 'a kibana user', + }); const { body } = await supertest - .get(API_URLS.SYNTHETICS_MONITORS) + .get(`/s/${SPACE_ID}${API_URLS.SYNTHETICS_MONITORS}`) .set('kbn-xsrf', 'true') .expect(200); await Promise.all([ @@ -68,6 +96,12 @@ export default function ({ getService }: FtrProviderContext) { } }); + after(async () => { + await kibanaServer.spaces.delete(SPACE_ID); + await security.user.delete(username); + await security.role.delete(roleName); + }); + describe('returns total number of monitor combinations', () => { it('returns the correct response', async () => { let savedMonitors: SimpleSavedObject[] = []; @@ -76,7 +110,7 @@ export default function ({ getService }: FtrProviderContext) { savedMonitors = savedResponse; const apiResponse = await supertest.get( - SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW + '?perPage=20' + `/s/${SPACE_ID}${SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW}` ); expect(apiResponse.body.total).eql(monitors.length * 2); @@ -99,9 +133,11 @@ export default function ({ getService }: FtrProviderContext) { const savedResponse = await Promise.all(monitors.map(saveMonitor)); savedMonitors = savedResponse; - const apiResponse = await supertest.get(SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW).query({ - query: '19', - }); + const apiResponse = await supertest + .get(`/s/${SPACE_ID}${SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW}`) + .query({ + query: '19', + }); expect(apiResponse.body.total).eql(2); expect(apiResponse.body.allMonitorIds.sort()).eql( @@ -119,5 +155,98 @@ export default function ({ getService }: FtrProviderContext) { } }); }); + + describe('Overview Item', () => { + it('returns the correct response', async () => { + let savedMonitors: Array<SimpleSavedObject<SyntheticsMonitor>> = []; + const customHeartbeatId = 'example_custom_heartbeat_id'; + try { + const savedResponse = await Promise.all( + [ + monitors[0], + { ...monitors[1], custom_heartbeat_id: 'example_custom_heartbeat_id' }, + ].map(saveMonitor) + ); + savedMonitors = savedResponse; + + const apiResponse = await supertest.get( + `/s/${SPACE_ID}${SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW}` + ); + expect(apiResponse.body.monitors).eql([ + { + id: savedMonitors[0].attributes[ConfigKey.MONITOR_QUERY_ID], + configId: savedMonitors[0].id, + name: 'test-monitor-name 0', + location: { + id: 'eu-west-01', + label: 'Europe West', + geo: { + lat: 33.2343132435, + lon: 73.2342343434, + }, + url: 'https://example-url.com', + isServiceManaged: true, + }, + isEnabled: true, + }, + { + id: savedMonitors[0].attributes[ConfigKey.MONITOR_QUERY_ID], + configId: savedMonitors[0].id, + name: 'test-monitor-name 0', + location: { + id: 'eu-west-02', + label: 'Europe West', + geo: { + lat: 33.2343132435, + lon: 73.2342343434, + }, + url: 'https://example-url.com', + isServiceManaged: true, + }, + isEnabled: true, + }, + { + id: savedMonitors[1].attributes[ConfigKey.MONITOR_QUERY_ID], + configId: savedMonitors[1].id, + name: 'test-monitor-name 1', + location: { + id: 'eu-west-01', + label: 'Europe West', + geo: { + lat: 33.2343132435, + lon: 73.2342343434, + }, + url: 'https://example-url.com', + isServiceManaged: true, + }, + isEnabled: true, + }, + { + id: savedMonitors[1].attributes[ConfigKey.MONITOR_QUERY_ID], + configId: savedMonitors[1].id, + name: 'test-monitor-name 1', + location: { + id: 'eu-west-02', + label: 'Europe West', + geo: { + lat: 33.2343132435, + lon: 73.2342343434, + }, + url: 'https://example-url.com', + isServiceManaged: true, + }, + isEnabled: true, + }, + ]); + expect(savedMonitors[1].attributes[ConfigKey.MONITOR_QUERY_ID]).eql(customHeartbeatId); + } finally { + await Promise.all( + savedMonitors.map((monitor) => { + return deleteMonitor(monitor.id); + }) + ); + } + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts index 235ae17b7c9e7..a46eff97826a8 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts @@ -13,6 +13,8 @@ export default function ({ getService }: FtrProviderContext) { describe('pingHistogram', () => { const supertest = getService('supertest'); + const timeZone = 'UTC'; + it('will fetch histogram data for all monitors', async () => { const dateStart = '2019-09-11T03:31:04.380Z'; const dateEnd = '2019-09-11T03:40:34.410Z'; @@ -20,6 +22,7 @@ export default function ({ getService }: FtrProviderContext) { const apiResponse = await supertest.get(API_URLS.PING_HISTOGRAM).query({ dateStart, dateEnd, + timeZone, }); const data = apiResponse.body; @@ -35,6 +38,7 @@ export default function ({ getService }: FtrProviderContext) { monitorId, dateStart, dateEnd, + timeZone, }); const data = apiResponse.body; @@ -51,6 +55,7 @@ export default function ({ getService }: FtrProviderContext) { dateStart, dateEnd, filters, + timeZone, }); const data = apiResponse.body; diff --git a/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts index e9c8167b0a878..066f5532d925c 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import type { FailedTransactionsCorrelationsResponse } from '@kbn/apm-plugin/common/correlations/failed_transactions_correlations/types'; -import { EVENT_OUTCOME } from '@kbn/apm-plugin/common/elasticsearch_fieldnames'; +import { EVENT_OUTCOME } from '@kbn/apm-plugin/common/es_fields/apm'; import { EventOutcome } from '@kbn/apm-plugin/common/event_outcome'; import { LatencyDistributionChartType } from '@kbn/apm-plugin/common/latency_distribution_chart_types'; import { FtrProviderContext } from '../../common/ftr_provider_context'; diff --git a/x-pack/test/apm_api_integration/tests/event_metadata/event_metadata.spec.ts b/x-pack/test/apm_api_integration/tests/event_metadata/event_metadata.spec.ts index 85e9bc73aa0db..a2c3328f633b3 100644 --- a/x-pack/test/apm_api_integration/tests/event_metadata/event_metadata.spec.ts +++ b/x-pack/test/apm_api_integration/tests/event_metadata/event_metadata.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { PROCESSOR_EVENT } from '@kbn/apm-plugin/common/elasticsearch_fieldnames'; +import { PROCESSOR_EVENT } from '@kbn/apm-plugin/common/es_fields/apm'; import { FtrProviderContext } from '../../common/ftr_provider_context'; export default function ApiTest({ getService }: FtrProviderContext) { diff --git a/x-pack/test/apm_api_integration/tests/suggestions/suggestions.spec.ts b/x-pack/test/apm_api_integration/tests/suggestions/suggestions.spec.ts index db15db23776c7..c06ebde82eafb 100644 --- a/x-pack/test/apm_api_integration/tests/suggestions/suggestions.spec.ts +++ b/x-pack/test/apm_api_integration/tests/suggestions/suggestions.spec.ts @@ -9,7 +9,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, -} from '@kbn/apm-plugin/common/elasticsearch_fieldnames'; +} from '@kbn/apm-plugin/common/es_fields/apm'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { generateData } from './generate_data'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/import_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/import_rules.ts index d3739473a5985..48c4408e8555e 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/import_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/import_rules.ts @@ -973,7 +973,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); @@ -1143,7 +1143,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); @@ -1273,7 +1273,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); }); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts index eb69fd36fdb29..3ff748fa5259d 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts @@ -874,7 +874,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); @@ -1044,7 +1044,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); @@ -1174,7 +1174,7 @@ export default ({ getService }: FtrProviderContext): void => { errors: [], exceptions_errors: [], exceptions_success: true, - exceptions_success_count: 2, + exceptions_success_count: 1, }); }); }); diff --git a/x-pack/test/functional/apps/aiops/explain_log_rate_spikes.ts b/x-pack/test/functional/apps/aiops/explain_log_rate_spikes_farequote.ts similarity index 78% rename from x-pack/test/functional/apps/aiops/explain_log_rate_spikes.ts rename to x-pack/test/functional/apps/aiops/explain_log_rate_spikes_farequote.ts index aa4a622b5d502..cb163fe2e47a8 100644 --- a/x-pack/test/functional/apps/aiops/explain_log_rate_spikes.ts +++ b/x-pack/test/functional/apps/aiops/explain_log_rate_spikes_farequote.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import type { FtrProviderContext } from '../../ftr_provider_context'; -import type { TestData } from './types'; +import type { TestDataEsArchive } from './types'; import { farequoteDataViewTestData } from './test_data'; const ES_INDEX = 'ft_farequote'; @@ -23,14 +23,14 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { // aiops / Explain Log Rate Spikes lives in the ML UI so we need some related services. const ml = getService('ml'); - function runTests(testData: TestData) { + function runTests(testData: TestDataEsArchive) { it(`${testData.suiteTitle} loads the source data in explain log rate spikes`, async () => { await elasticChart.setNewChartUiDebugFlag(true); await ml.testExecution.logTestStep( `${testData.suiteTitle} loads the saved search selection page` ); - await aiops.explainLogRateSpikes.navigateToIndexPatternSelection(); + await aiops.explainLogRateSpikesPage.navigateToIndexPatternSelection(); await ml.testExecution.logTestStep( `${testData.suiteTitle} loads the explain log rate spikes page` @@ -42,10 +42,10 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { it(`${testData.suiteTitle} displays index details`, async () => { await ml.testExecution.logTestStep(`${testData.suiteTitle} displays the time range step`); - await aiops.explainLogRateSpikes.assertTimeRangeSelectorSectionExists(); + await aiops.explainLogRateSpikesPage.assertTimeRangeSelectorSectionExists(); await ml.testExecution.logTestStep(`${testData.suiteTitle} loads data for full time range`); - await aiops.explainLogRateSpikes.clickUseFullDataButton( + await aiops.explainLogRateSpikesPage.clickUseFullDataButton( testData.expected.totalDocCountFormatted ); await headerPage.waitUntilLoadingHasFinished(); @@ -53,53 +53,53 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { await ml.testExecution.logTestStep( `${testData.suiteTitle} displays elements in the doc count panel correctly` ); - await aiops.explainLogRateSpikes.assertTotalDocCountHeaderExists(); - await aiops.explainLogRateSpikes.assertTotalDocCountChartExists(); + await aiops.explainLogRateSpikesPage.assertTotalDocCountHeaderExists(); + await aiops.explainLogRateSpikesPage.assertTotalDocCountChartExists(); await ml.testExecution.logTestStep( `${testData.suiteTitle} displays elements in the page correctly` ); - await aiops.explainLogRateSpikes.assertSearchPanelExists(); + await aiops.explainLogRateSpikesPage.assertSearchPanelExists(); await ml.testExecution.logTestStep('displays empty prompt'); - await aiops.explainLogRateSpikes.assertNoWindowParametersEmptyPromptExists(); + await aiops.explainLogRateSpikesPage.assertNoWindowParametersEmptyPromptExists(); await ml.testExecution.logTestStep('clicks the document count chart to start analysis'); - await aiops.explainLogRateSpikes.clickDocumentCountChart(); - await aiops.explainLogRateSpikes.assertAnalysisSectionExists(); + await aiops.explainLogRateSpikesPage.clickDocumentCountChart(testData.chartClickCoordinates); + await aiops.explainLogRateSpikesPage.assertAnalysisSectionExists(); await ml.testExecution.logTestStep('displays the no results found prompt'); - await aiops.explainLogRateSpikes.assertNoResultsFoundEmptyPromptExists(); + await aiops.explainLogRateSpikesPage.assertNoResultsFoundEmptyPromptExists(); await ml.testExecution.logTestStep('adjusts the brushes to get analysis results'); - await aiops.explainLogRateSpikes.assertRerunAnalysisButtonExists(false); + await aiops.explainLogRateSpikesPage.assertRerunAnalysisButtonExists(false); // Get the current width of the deviation brush for later comparison. - const brushSelectionWidthBefore = await aiops.explainLogRateSpikes.getBrushSelectionWidth( + const brushSelectionWidthBefore = await aiops.explainLogRateSpikesPage.getBrushSelectionWidth( 'aiopsBrushDeviation' ); // Get the px values for the timestamp we want to move the brush to. - const { targetPx, intervalPx } = await aiops.explainLogRateSpikes.getPxForTimestamp( - testData.brushTargetTimestamp + const { targetPx, intervalPx } = await aiops.explainLogRateSpikesPage.getPxForTimestamp( + testData.brushDeviationTargetTimestamp ); // Adjust the right brush handle - await aiops.explainLogRateSpikes.adjustBrushHandler( + await aiops.explainLogRateSpikesPage.adjustBrushHandler( 'aiopsBrushDeviation', 'handle--e', targetPx + intervalPx ); // Adjust the left brush handle - await aiops.explainLogRateSpikes.adjustBrushHandler( + await aiops.explainLogRateSpikesPage.adjustBrushHandler( 'aiopsBrushDeviation', 'handle--w', targetPx ); // Get the new brush selection width for later comparison. - const brushSelectionWidthAfter = await aiops.explainLogRateSpikes.getBrushSelectionWidth( + const brushSelectionWidthAfter = await aiops.explainLogRateSpikesPage.getBrushSelectionWidth( 'aiopsBrushDeviation' ); @@ -110,18 +110,18 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { expect(brushSelectionWidthBefore).not.to.be(brushSelectionWidthAfter); expect(brushSelectionWidthAfter).not.to.be.greaterThan(intervalPx * 2); - await aiops.explainLogRateSpikes.assertRerunAnalysisButtonExists(true); + await aiops.explainLogRateSpikesPage.assertRerunAnalysisButtonExists(true); await ml.testExecution.logTestStep('rerun the analysis with adjusted settings'); - await aiops.explainLogRateSpikes.clickRerunAnalysisButton(true); - await aiops.explainLogRateSpikes.assertProgressTitle('Progress: 100% — Done.'); + await aiops.explainLogRateSpikesPage.clickRerunAnalysisButton(true); + await aiops.explainLogRateSpikesPage.assertProgressTitle('Progress: 100% — Done.'); // The group switch should be disabled by default - await aiops.explainLogRateSpikes.assertSpikeAnalysisGroupSwitchExists(false); + await aiops.explainLogRateSpikesPage.assertSpikeAnalysisGroupSwitchExists(false); // Enabled grouping - await aiops.explainLogRateSpikes.clickSpikeAnalysisGroupSwitch(false); + await aiops.explainLogRateSpikesPage.clickSpikeAnalysisGroupSwitch(false); await aiops.explainLogRateSpikesAnalysisGroupsTable.assertSpikeAnalysisTableExists(); diff --git a/x-pack/test/functional/apps/aiops/explain_log_rate_spikes_logs.ts b/x-pack/test/functional/apps/aiops/explain_log_rate_spikes_logs.ts new file mode 100644 index 0000000000000..2e7f7d881450c --- /dev/null +++ b/x-pack/test/functional/apps/aiops/explain_log_rate_spikes_logs.ts @@ -0,0 +1,225 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import type { FtrProviderContext } from '../../ftr_provider_context'; +import type { TestDataGenerated } from './types'; +import { artificialLogDataViewTestData } from './test_data'; + +export default function ({ getPageObject, getService }: FtrProviderContext) { + const es = getService('es'); + const headerPage = getPageObject('header'); + const elasticChart = getService('elasticChart'); + const aiops = getService('aiops'); + const log = getService('log'); + + // aiops / Explain Log Rate Spikes lives in the ML UI so we need some related services. + const ml = getService('ml'); + + function runTests(testData: TestDataGenerated) { + it(`${testData.suiteTitle} loads the source data in explain log rate spikes`, async () => { + await elasticChart.setNewChartUiDebugFlag(true); + + await ml.testExecution.logTestStep( + `${testData.suiteTitle} loads the saved search selection page` + ); + await aiops.explainLogRateSpikesPage.navigateToIndexPatternSelection(); + + await ml.testExecution.logTestStep( + `${testData.suiteTitle} loads the explain log rate spikes page` + ); + await ml.jobSourceSelection.selectSourceForExplainLogRateSpikes( + testData.sourceIndexOrSavedSearch + ); + }); + + it(`${testData.suiteTitle} displays index details`, async () => { + await ml.testExecution.logTestStep(`${testData.suiteTitle} displays the time range step`); + await aiops.explainLogRateSpikesPage.assertTimeRangeSelectorSectionExists(); + + await ml.testExecution.logTestStep(`${testData.suiteTitle} loads data for full time range`); + await aiops.explainLogRateSpikesPage.clickUseFullDataButton( + testData.expected.totalDocCountFormatted + ); + await headerPage.waitUntilLoadingHasFinished(); + + await ml.testExecution.logTestStep( + `${testData.suiteTitle} displays elements in the doc count panel correctly` + ); + await aiops.explainLogRateSpikesPage.assertTotalDocCountHeaderExists(); + await aiops.explainLogRateSpikesPage.assertTotalDocCountChartExists(); + + await ml.testExecution.logTestStep( + `${testData.suiteTitle} displays elements in the page correctly` + ); + await aiops.explainLogRateSpikesPage.assertSearchPanelExists(); + + await ml.testExecution.logTestStep('displays empty prompt'); + await aiops.explainLogRateSpikesPage.assertNoWindowParametersEmptyPromptExists(); + + await ml.testExecution.logTestStep('clicks the document count chart to start analysis'); + await aiops.explainLogRateSpikesPage.clickDocumentCountChart(testData.chartClickCoordinates); + await aiops.explainLogRateSpikesPage.assertAnalysisSectionExists(); + + await ml.testExecution.logTestStep('displays the no results found prompt'); + await aiops.explainLogRateSpikesPage.assertNoResultsFoundEmptyPromptExists(); + + await ml.testExecution.logTestStep('adjusts the brushes to get analysis results'); + await aiops.explainLogRateSpikesPage.assertRerunAnalysisButtonExists(false); + + // Get the current width of the deviation brush for later comparison. + const brushSelectionWidthBefore = await aiops.explainLogRateSpikesPage.getBrushSelectionWidth( + 'aiopsBrushDeviation' + ); + + // Get the px values for the timestamp we want to move the brush to. + const { targetPx, intervalPx } = await aiops.explainLogRateSpikesPage.getPxForTimestamp( + testData.brushDeviationTargetTimestamp + ); + + // Adjust the right brush handle + await aiops.explainLogRateSpikesPage.adjustBrushHandler( + 'aiopsBrushDeviation', + 'handle--e', + targetPx + intervalPx * testData.brushIntervalFactor + ); + + // Adjust the left brush handle + await aiops.explainLogRateSpikesPage.adjustBrushHandler( + 'aiopsBrushDeviation', + 'handle--w', + targetPx - intervalPx * testData.brushIntervalFactor + ); + + if (testData.brushBaselineTargetTimestamp) { + // Get the px values for the timestamp we want to move the brush to. + const { targetPx: targetBaselinePx } = + await aiops.explainLogRateSpikesPage.getPxForTimestamp( + testData.brushBaselineTargetTimestamp + ); + + // Adjust the right brush handle + await aiops.explainLogRateSpikesPage.adjustBrushHandler( + 'aiopsBrushBaseline', + 'handle--e', + targetBaselinePx + intervalPx * testData.brushIntervalFactor + ); + + // Adjust the left brush handle + await aiops.explainLogRateSpikesPage.adjustBrushHandler( + 'aiopsBrushBaseline', + 'handle--w', + targetBaselinePx - intervalPx * testData.brushIntervalFactor + ); + } + // Get the new brush selection width for later comparison. + const brushSelectionWidthAfter = await aiops.explainLogRateSpikesPage.getBrushSelectionWidth( + 'aiopsBrushDeviation' + ); + + // Assert the adjusted brush: The selection width should have changed and + // we test if the selection is smaller than two bucket intervals. + // Finally, the adjusted brush should trigger + // a warning on the "Rerun analysis" button. + expect(brushSelectionWidthBefore).not.to.be(brushSelectionWidthAfter); + expect(brushSelectionWidthAfter).not.to.be.greaterThan(intervalPx * 21); + + await aiops.explainLogRateSpikesPage.assertRerunAnalysisButtonExists(true); + + await ml.testExecution.logTestStep('rerun the analysis with adjusted settings'); + + await aiops.explainLogRateSpikesPage.clickRerunAnalysisButton(true); + await aiops.explainLogRateSpikesPage.assertProgressTitle('Progress: 100% — Done.'); + + // The group switch should be disabled by default + await aiops.explainLogRateSpikesPage.assertSpikeAnalysisGroupSwitchExists(false); + + // Enabled grouping + await aiops.explainLogRateSpikesPage.clickSpikeAnalysisGroupSwitch(false); + + await aiops.explainLogRateSpikesAnalysisGroupsTable.assertSpikeAnalysisTableExists(); + + const analysisGroupsTable = + await aiops.explainLogRateSpikesAnalysisGroupsTable.parseAnalysisTable(); + expect(analysisGroupsTable).to.be.eql(testData.expected.analysisGroupsTable); + + await ml.testExecution.logTestStep('expand table row'); + await aiops.explainLogRateSpikesAnalysisGroupsTable.assertExpandRowButtonExists(); + await aiops.explainLogRateSpikesAnalysisGroupsTable.expandRow(); + + const analysisTable = await aiops.explainLogRateSpikesAnalysisTable.parseAnalysisTable(); + expect(analysisTable).to.be.eql(testData.expected.analysisTable); + }); + } + + describe('explain log rate spikes - artificial log data', function () { + this.tags(['aiops']); + + before(async () => { + try { + await es.indices.delete({ index: artificialLogDataViewTestData.sourceIndexOrSavedSearch }); + } catch (e) { + log.error( + `Error deleting index '${artificialLogDataViewTestData.sourceIndexOrSavedSearch}' in before() callback` + ); + } + // Create index with mapping + await es.indices.create({ + index: artificialLogDataViewTestData.sourceIndexOrSavedSearch, + mappings: { + properties: { + user: { type: 'keyword' }, + response_code: { type: 'keyword' }, + url: { type: 'keyword' }, + version: { type: 'keyword' }, + '@timestamp': { type: 'date' }, + }, + }, + }); + + await es.bulk({ + refresh: 'wait_for', + body: artificialLogDataViewTestData.bulkBody, + }); + + await ml.testResources.createIndexPatternIfNeeded( + artificialLogDataViewTestData.sourceIndexOrSavedSearch, + '@timestamp' + ); + + await ml.testResources.setKibanaTimeZoneToUTC(); + + await ml.securityUI.loginAsMlPowerUser(); + }); + + after(async () => { + await elasticChart.setNewChartUiDebugFlag(false); + await ml.testResources.deleteIndexPatternByTitle( + artificialLogDataViewTestData.sourceIndexOrSavedSearch + ); + try { + await es.indices.delete({ index: artificialLogDataViewTestData.sourceIndexOrSavedSearch }); + } catch (e) { + log.error( + `Error deleting index '${artificialLogDataViewTestData.sourceIndexOrSavedSearch}' in after() callback` + ); + } + }); + + describe('with artificial logs', function () { + // Run tests on full farequote index. + it(`${artificialLogDataViewTestData.suiteTitle} loads the explain log rate spikes page`, async () => { + // Start navigation from the base of the ML app. + await ml.navigation.navigateToMl(); + await elasticChart.setNewChartUiDebugFlag(true); + }); + + runTests(artificialLogDataViewTestData); + }); + }); +} diff --git a/x-pack/test/functional/apps/aiops/index.ts b/x-pack/test/functional/apps/aiops/index.ts index 88dea0b1d3e7e..9552ed3d8c61a 100644 --- a/x-pack/test/functional/apps/aiops/index.ts +++ b/x-pack/test/functional/apps/aiops/index.ts @@ -33,6 +33,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { await ml.testResources.resetKibanaTimeZone(); }); - loadTestFile(require.resolve('./explain_log_rate_spikes')); + loadTestFile(require.resolve('./explain_log_rate_spikes_farequote')); + loadTestFile(require.resolve('./explain_log_rate_spikes_logs')); }); } diff --git a/x-pack/test/functional/apps/aiops/test_data.ts b/x-pack/test/functional/apps/aiops/test_data.ts index 12398d1f3573f..f8ce5c219c7c6 100644 --- a/x-pack/test/functional/apps/aiops/test_data.ts +++ b/x-pack/test/functional/apps/aiops/test_data.ts @@ -5,13 +5,17 @@ * 2.0. */ -import { TestData } from './types'; +import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -export const farequoteDataViewTestData: TestData = { +import type { GeneratedDoc, TestDataEsArchive, TestDataGenerated } from './types'; + +export const farequoteDataViewTestData: TestDataEsArchive = { suiteTitle: 'farequote index pattern', isSavedSearch: false, sourceIndexOrSavedSearch: 'ft_farequote', - brushTargetTimestamp: 1455033600000, + brushDeviationTargetTimestamp: 1455033600000, + brushIntervalFactor: 1, + chartClickCoordinates: [0, 0], expected: { totalDocCountFormatted: '86,374', analysisGroupsTable: [ @@ -32,3 +36,113 @@ export const farequoteDataViewTestData: TestData = { ], }, }; + +const REFERENCE_TS = 1669018354793; +const DAY_MS = 86400000; +const ES_INDEX = 'aiops_frequent_items_test'; + +const DEVIATION_TS = REFERENCE_TS - DAY_MS * 2; +const BASELINE_TS = DEVIATION_TS - DAY_MS * 1; + +export const artificialLogDataViewTestData: TestDataGenerated = { + suiteTitle: 'artificial index pattern', + isSavedSearch: false, + sourceIndexOrSavedSearch: 'aiops_frequent_items_test', + brushBaselineTargetTimestamp: BASELINE_TS + DAY_MS / 2, + brushDeviationTargetTimestamp: DEVIATION_TS + DAY_MS / 2, + brushIntervalFactor: 10, + chartClickCoordinates: [-200, 30], + bulkBody: getArtificialLogsBulkBody(), + expected: { + totalDocCountFormatted: '8,400', + analysisGroupsTable: [ + { group: 'user: Peter', docCount: '2081' }, + { group: 'response_code: 500url: login.php', docCount: '834' }, + ], + analysisTable: [ + { + fieldName: 'user', + fieldValue: 'Peter', + logRate: 'Chart type:bar chart', + pValue: '2.78e-22', + impact: 'High', + }, + ], + }, +}; + +function getArtificialLogsBulkBody() { + const bulkBody: estypes.BulkRequest<GeneratedDoc, GeneratedDoc>['body'] = []; + const action = { index: { _index: ES_INDEX } }; + let tsOffset = 0; + + // Creates docs evenly spread across baseline and deviation time frame + [BASELINE_TS, DEVIATION_TS].forEach((ts) => { + ['Peter', 'Paul', 'Mary'].forEach((user) => { + ['200', '404', '500'].forEach((responseCode) => { + ['login.php', 'user.php', 'home.php'].forEach((url) => { + // Don't add docs that match the exact pattern of the filter we want to base the test queries on + if ( + !( + user === 'Peter' && + responseCode === '500' && + (url === 'home.php' || url === 'login.php') + ) + ) { + tsOffset = 0; + [...Array(100)].forEach(() => { + tsOffset += DAY_MS / 100; + const doc: GeneratedDoc = { + user, + response_code: responseCode, + url, + version: 'v1.0.0', + '@timestamp': ts + tsOffset, + }; + + bulkBody.push(action); + bulkBody.push(doc); + }); + } + }); + }); + }); + }); + + // Now let's add items to the dataset to make some specific significant terms being returned as results + ['200', '404'].forEach((responseCode) => { + ['login.php', 'user.php', 'home.php'].forEach((url) => { + tsOffset = 0; + [...Array(300)].forEach(() => { + tsOffset += DAY_MS / 300; + bulkBody.push(action); + bulkBody.push({ + user: 'Peter', + response_code: responseCode, + url, + version: 'v1.0.0', + '@timestamp': DEVIATION_TS + tsOffset, + }); + }); + }); + }); + + ['Paul', 'Mary'].forEach((user) => { + ['login.php', 'home.php'].forEach((url) => { + tsOffset = 0; + [...Array(400)].forEach(() => { + tsOffset += DAY_MS / 400; + bulkBody.push(action); + bulkBody.push({ + user, + response_code: '500', + url, + version: 'v1.0.0', + '@timestamp': DEVIATION_TS + tsOffset, + }); + }); + }); + }); + + return bulkBody; +} diff --git a/x-pack/test/functional/apps/aiops/types.ts b/x-pack/test/functional/apps/aiops/types.ts index 5c88fac3595b5..acbf96a9db45c 100644 --- a/x-pack/test/functional/apps/aiops/types.ts +++ b/x-pack/test/functional/apps/aiops/types.ts @@ -5,12 +5,17 @@ * 2.0. */ -export interface TestData { +import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +export interface TestDataEsArchive { suiteTitle: string; isSavedSearch?: boolean; sourceIndexOrSavedSearch: string; rowsPerPage?: 10 | 25 | 50; - brushTargetTimestamp: number; + brushBaselineTargetTimestamp?: number; + brushDeviationTargetTimestamp: number; + brushIntervalFactor: number; + chartClickCoordinates: [number, number]; expected: { totalDocCountFormatted: string; analysisGroupsTable: Array<{ group: string; docCount: string }>; @@ -23,3 +28,15 @@ export interface TestData { }>; }; } + +export interface GeneratedDoc { + user: string; + response_code: string; + url: string; + version: string; + '@timestamp': number; +} + +export interface TestDataGenerated extends TestDataEsArchive { + bulkBody: estypes.BulkRequest<GeneratedDoc, GeneratedDoc>['body']; +} diff --git a/x-pack/test/functional/apps/lens/group1/index.ts b/x-pack/test/functional/apps/lens/group1/index.ts index 302289319adbf..622953098b725 100644 --- a/x-pack/test/functional/apps/lens/group1/index.ts +++ b/x-pack/test/functional/apps/lens/group1/index.ts @@ -63,7 +63,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext }); after(async () => { - await esArchiver.unload(esArchive); + await esNode.unload(esArchive); await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.importExport.unload(fixtureDirs.lensBasic); await kibanaServer.importExport.unload(fixtureDirs.lensDefault); diff --git a/x-pack/test/functional/apps/ml/permissions/read_ml_access.ts b/x-pack/test/functional/apps/ml/permissions/read_ml_access.ts index 10477c5a4797a..6d32e399493fe 100644 --- a/x-pack/test/functional/apps/ml/permissions/read_ml_access.ts +++ b/x-pack/test/functional/apps/ml/permissions/read_ml_access.ts @@ -106,7 +106,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should redirect to the Overview page from the unrecognized routes', async () => { - await PageObjects.common.navigateToUrl('ml', 'magic-ai'); + await PageObjects.common.navigateToUrl('ml', 'magic-ai', { + shouldUseHashForSubUrl: false, + insertTimestamp: false, + }); await ml.testExecution.logTestStep('should display a warning banner'); await ml.overviewPage.assertPageNotFoundBannerText('magic-ai'); diff --git a/x-pack/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts b/x-pack/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts index a0b35cbe1c2ef..99b943e95f75a 100644 --- a/x-pack/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts +++ b/x-pack/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts @@ -43,12 +43,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { return await testSubjects.isDisplayed('remoteClusterListTable'); }); const remotes = await pageObjects.remoteClusters.getRemoteClustersList(); - expect(remotes.length).to.eql(1); - expect(remotes[0].remoteName).to.eql('ftr-remote'); - expect(remotes[0].remoteAddress).to.contain('localhost'); - expect(remotes[0].remoteStatus).to.eql('Connected'); - expect(remotes[0].remoteConnectionCount).to.eql('1'); - expect(remotes[0].remoteMode).to.eql('default'); + const filteredRemotes = remotes.filter((remote) => remote.remoteName === 'ftr-remote'); + expect(filteredRemotes.length).to.eql(1); + expect(filteredRemotes[0].remoteAddress).to.contain('localhost'); + expect(filteredRemotes[0].remoteStatus).to.eql('Connected'); + expect(filteredRemotes[0].remoteConnectionCount).to.eql('1'); + expect(filteredRemotes[0].remoteMode).to.eql('default'); }); }); @@ -93,11 +93,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.common.navigateToApp('indexManagement'); await retry.waitForWithTimeout('indice table to be visible', 15000, async () => { return await testSubjects.isDisplayed('indicesList'); + const indicesList = await pageObjects.indexManagement.getIndexList(); + const followerIndex = indicesList.filter( + (follower) => follower.indexName === followerName + ); + expect(followerIndex[0].indexDocuments).to.eql('1'); }); - - const indicesList = await pageObjects.indexManagement.getIndexList(); - const followerIndex = indicesList[0]; - expect(followerIndex.indexDocuments).to.eql('1'); }); }); diff --git a/x-pack/test/functional/apps/visualize/index.ts b/x-pack/test/functional/apps/visualize/index.ts index c99182201eb5d..8919296caf081 100644 --- a/x-pack/test/functional/apps/visualize/index.ts +++ b/x-pack/test/functional/apps/visualize/index.ts @@ -17,5 +17,6 @@ export default function visualize({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./precalculated_histogram')); loadTestFile(require.resolve('./preserve_url')); loadTestFile(require.resolve('./reporting')); + loadTestFile(require.resolve('./telemetry')); }); } diff --git a/x-pack/test/functional/apps/visualize/telemetry.ts b/x-pack/test/functional/apps/visualize/telemetry.ts new file mode 100644 index 0000000000000..20620f20e2c97 --- /dev/null +++ b/x-pack/test/functional/apps/visualize/telemetry.ts @@ -0,0 +1,98 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +interface UiCounterEvent { + eventName: string; + total: number; +} + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['common', 'dashboard', 'timePicker']); + + const kibanaServer = getService('kibanaServer'); + const esArchiver = getService('esArchiver'); + const usageCollection = getService('usageCollection'); + const renderable = getService('renderable'); + const queryBar = getService('queryBar'); + const retry = getService('retry'); + + describe('smoke telemetry tests', function () { + let uiCounterEvents: UiCounterEvent[] = []; + + before(async function () { + await kibanaServer.savedObjects.cleanStandardList(); + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); + await kibanaServer.importExport.load( + `x-pack/test/functional/fixtures/kbn_archiver/dashboard/with_by_value_visualizations` + ); + + await retry.try(async () => { + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.loadSavedDashboard('visualizations'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.dashboard.waitForRenderComplete(); + + uiCounterEvents = await usageCollection.getUICounterEvents(); + + expect(uiCounterEvents.length).to.be.greaterThan(0); + }); + }); + + after(async () => { + await kibanaServer.importExport.unload( + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard/with_by_value_visualizations' + ); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + const checkTelemetry = (eventName: string) => { + const initialEvent = uiCounterEvents.find((e) => e.eventName === eventName); + + expect(initialEvent).to.be.ok(); + }; + + ['legacy_metric', 'donut', 'timelion', 'area_stacked', 'table', 'heatmap'].forEach((vis) => { + it(`should trigger render event for "agg based" ${vis} visualization`, async () => + checkTelemetry(`render_agg_based_${vis}`)); + }); + + ['vega', 'tsvb_top_n', 'lens_vis_dashboard'].forEach((vis) => { + it(`should trigger render event for ${vis} visualization`, async () => + checkTelemetry(`render_${vis}`)); + }); + + ['vertical_bar_stacked', 'dimension_date_histogram', 'dimension_count'].forEach((i) => { + it(`should correctly trigger "render_lens${i}" lens event`, async () => + checkTelemetry(`render_lens_${i}`)); + }); + + describe('should render visualization once', async () => { + let initialRenderCountMap: Record<string, number> = {}; + let afterRefreshRenderCountMap: Record<string, number> = {}; + + before(async function () { + const sharedItemsCount = Number(await PageObjects.dashboard.getSharedItemsCount()); + initialRenderCountMap = await renderable.getRenderCount(sharedItemsCount); + + await queryBar.clickQuerySubmitButton(); + await PageObjects.dashboard.waitForRenderComplete(); + + afterRefreshRenderCountMap = await renderable.getRenderCount(sharedItemsCount); + }); + + ['Lens', 'TSVB', 'Vega', 'Table', 'Timelion', 'Pie', 'Metric', 'Heatmap', 'Area'].forEach( + (key) => { + it(`should correctly render ${key} visualization once`, async () => + expect(afterRefreshRenderCountMap[key]).to.be(initialRenderCountMap[key] + 1)); + } + ); + }); + }); +} diff --git a/x-pack/test/functional/es_archives/monitoring/ccr_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/ccr_package/data.json.gz new file mode 100644 index 0000000000000..4088178b904ad Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/ccr_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/ccr_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/ccr_package/mappings.json new file mode 100644 index 0000000000000..22af8dee3978a --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/ccr_package/mappings.json @@ -0,0 +1,7713 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.ccr-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.ccr-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.ccr", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "ccr_auto_follow_stats": { + "properties": { + "follower": { + "properties": { + "failed_read_requests": { + "path": "elasticsearch.ccr.requests.failed.read.count", + "type": "alias" + } + } + }, + "number_of_failed_follow_indices": { + "path": "elasticsearch.ccr.auto_follow.failed.follow_indices.count", + "type": "alias" + }, + "number_of_failed_remote_cluster_state_requests": { + "path": "elasticsearch.ccr.auto_follow.failed.remote_cluster_state_requests.count", + "type": "alias" + }, + "number_of_successful_follow_indices": { + "path": "elasticsearch.ccr.auto_follow.success.follow_indices.count", + "type": "alias" + } + } + }, + "ccr_stats": { + "properties": { + "bytes_read": { + "path": "elasticsearch.ccr.bytes_read", + "type": "alias" + }, + "failed_read_requests": { + "path": "elasticsearch.ccr.requests.failed.read.count", + "type": "alias" + }, + "failed_write_requests": { + "path": "elasticsearch.ccr.requests.failed.write.count", + "type": "alias" + }, + "follower_aliases_version": { + "path": "elasticsearch.ccr.follower.aliases_version", + "type": "alias" + }, + "follower_global_checkpoint": { + "path": "elasticsearch.ccr.follower.global_checkpoint", + "type": "alias" + }, + "follower_index": { + "path": "elasticsearch.ccr.follower.index", + "type": "alias" + }, + "follower_mapping_version": { + "path": "elasticsearch.ccr.follower.mapping_version", + "type": "alias" + }, + "follower_max_seq_no": { + "path": "elasticsearch.ccr.follower.max_seq_no", + "type": "alias" + }, + "follower_settings_version": { + "path": "elasticsearch.ccr.follower.settings_version", + "type": "alias" + }, + "last_requested_seq_no": { + "path": "elasticsearch.ccr.last_requested_seq_no", + "type": "alias" + }, + "leader_global_checkpoint": { + "path": "elasticsearch.ccr.leader.global_checkpoint", + "type": "alias" + }, + "leader_index": { + "path": "elasticsearch.ccr.leader.index", + "type": "alias" + }, + "leader_max_seq_no": { + "path": "elasticsearch.ccr.leader.max_seq_no", + "type": "alias" + }, + "operations_read": { + "path": "elasticsearch.ccr.follower.operations.read.count", + "type": "alias" + }, + "operations_written": { + "path": "elasticsearch.ccr.follower.operations_written", + "type": "alias" + }, + "outstanding_read_requests": { + "path": "elasticsearch.ccr.requests.outstanding.read.count", + "type": "alias" + }, + "outstanding_write_requests": { + "path": "elasticsearch.ccr.requests.outstanding.write.count", + "type": "alias" + }, + "remote_cluster": { + "path": "elasticsearch.ccr.remote_cluster", + "type": "alias" + }, + "shard_id": { + "path": "elasticsearch.ccr.follower.shard.number", + "type": "alias" + }, + "successful_read_requests": { + "path": "elasticsearch.ccr.requests.successful.read.count", + "type": "alias" + }, + "successful_write_requests": { + "path": "elasticsearch.ccr.requests.successful.write.count", + "type": "alias" + }, + "total_read_remote_exec_time_millis": { + "path": "elasticsearch.ccr.total_time.read.remote_exec.ms", + "type": "alias" + }, + "total_read_time_millis": { + "path": "elasticsearch.ccr.total_time.read.ms", + "type": "alias" + }, + "total_write_time_millis": { + "path": "elasticsearch.ccr.total_time.write.ms", + "type": "alias" + }, + "write_buffer_operation_count": { + "path": "elasticsearch.ccr.write_buffer.operation.count", + "type": "alias" + }, + "write_buffer_size_in_bytes": { + "path": "elasticsearch.ccr.write_buffer.size.bytes", + "type": "alias" + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "ccr": { + "properties": { + "auto_follow": { + "properties": { + "failed": { + "properties": { + "follow_indices": { + "properties": { + "count": { + "type": "long" + } + } + }, + "remote_cluster_state_requests": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "success": { + "properties": { + "follow_indices": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "bytes_read": { + "type": "long" + }, + "follower": { + "properties": { + "aliases_version": { + "type": "long" + }, + "global_checkpoint": { + "type": "long" + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "mapping_version": { + "type": "long" + }, + "max_seq_no": { + "type": "long" + }, + "operations": { + "properties": { + "read": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "operations_written": { + "type": "long" + }, + "settings_version": { + "type": "long" + }, + "shard": { + "properties": { + "number": { + "type": "long" + } + } + }, + "time_since_last_read": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "last_requested_seq_no": { + "type": "long" + }, + "leader": { + "properties": { + "global_checkpoint": { + "type": "long" + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_seq_no": { + "type": "long" + } + } + }, + "read_exceptions": { + "type": "nested" + }, + "remote_cluster": { + "ignore_above": 1024, + "type": "keyword" + }, + "requests": { + "properties": { + "failed": { + "properties": { + "read": { + "properties": { + "count": { + "type": "long" + } + } + }, + "write": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "outstanding": { + "properties": { + "read": { + "properties": { + "count": { + "type": "long" + } + } + }, + "write": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "successful": { + "properties": { + "read": { + "properties": { + "count": { + "type": "long" + } + } + }, + "write": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "shard_id": { + "type": "long" + }, + "total_time": { + "properties": { + "read": { + "properties": { + "ms": { + "type": "long" + }, + "remote_exec": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "write_buffer": { + "properties": { + "operation": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.ccr.remote_cluster", + "elasticsearch.ccr.leader.index", + "elasticsearch.ccr.follower.index", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/data.json.gz new file mode 100644 index 0000000000000..1e969bb77a409 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/logstash/changing_pipelines_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/data.json.gz new file mode 100644 index 0000000000000..d80460974b2f0 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_multicluster_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/data.json.gz new file mode 100644 index 0000000000000..c42533016d52e Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/multicluster_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/multicluster_package/data.json.gz new file mode 100644 index 0000000000000..1141fdac5de13 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/multicluster_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/multicluster_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/multicluster_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/multicluster_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/data.json.gz new file mode 100644 index 0000000000000..a4da6199558f7 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_gold_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/data.json.gz new file mode 100644 index 0000000000000..e6edf706a6fc7 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/singlecluster_green_platinum_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/data.json.gz new file mode 100644 index 0000000000000..0f3c60233dae7 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/singlecluster_red_platinum_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/data.json.gz b/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/data.json.gz new file mode 100644 index 0000000000000..87a50015dc5f7 Binary files /dev/null and b/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/mappings.json b/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/mappings.json new file mode 100644 index 0000000000000..5684702273ac7 --- /dev/null +++ b/x-pack/test/functional/es_archives/monitoring/singlecluster_three_nodes_shard_relocation_package/mappings.json @@ -0,0 +1,7138 @@ +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.cluster_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.cluster_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.cluster_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_state": { + "properties": { + "master_node": { + "path": "elasticsearch.cluster.stats.state.master_node", + "type": "alias" + }, + "nodes_hash": { + "path": "elasticsearch.cluster.stats.state.nodes_hash", + "type": "alias" + }, + "state_uuid": { + "path": "elasticsearch.cluster.stats.state.state_uuid", + "type": "alias" + }, + "status": { + "path": "elasticsearch.cluster.stats.status", + "type": "alias" + }, + "version": { + "path": "elasticsearch.cluster.stats.state.version", + "type": "alias" + } + } + }, + "cluster_stats": { + "properties": { + "indices": { + "properties": { + "count": { + "path": "elasticsearch.cluster.stats.indices.total", + "type": "alias" + }, + "shards": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.indices.shards.count", + "type": "alias" + } + } + } + } + }, + "nodes": { + "properties": { + "count": { + "properties": { + "total": { + "path": "elasticsearch.cluster.stats.nodes.count", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "max_uptime_in_millis": { + "path": "elasticsearch.cluster.stats.nodes.jvm.max_uptime.ms", + "type": "alias" + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.cluster.stats.nodes.jvm.memory.heap.used.bytes", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "indices": { + "properties": { + "docs": { + "properties": { + "total": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "count": { + "type": "long" + }, + "primaries": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "type": "long" + } + } + }, + "license": { + "properties": { + "cluster_needs_tls": { + "type": "boolean" + }, + "expiry_date": { + "type": "date" + }, + "expiry_date_in_millis": { + "type": "long" + }, + "issue_date": { + "type": "date" + }, + "issue_date_in_millis": { + "type": "long" + }, + "issued_to": { + "ignore_above": 1024, + "type": "keyword" + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "max_nodes": { + "type": "long" + }, + "start_date_in_millis": { + "type": "long" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "nodes": { + "properties": { + "count": { + "type": "long" + }, + "data": { + "type": "long" + }, + "fs": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "max_uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "master": { + "type": "long" + }, + "stats": { + "properties": { + "data": { + "type": "long" + } + } + }, + "versions": { + "type": "text" + } + } + }, + "stack": { + "properties": { + "apm": { + "properties": { + "found": { + "type": "boolean" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + } + } + } + } + } + } + }, + "state": { + "properties": { + "master_node": { + "ignore_above": 1024, + "type": "keyword" + }, + "nodes": { + "type": "flattened" + }, + "nodes_hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "license": { + "properties": { + "status": { + "path": "elasticsearch.cluster.stats.license.status", + "type": "alias" + }, + "type": { + "path": "elasticsearch.cluster.stats.license.type", + "type": "alias" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "stack_stats": { + "properties": { + "apm": { + "properties": { + "found": { + "path": "elasticsearch.cluster.stats.stack.apm.found", + "type": "alias" + } + } + }, + "xpack": { + "properties": { + "ccr": { + "properties": { + "available": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.available", + "type": "alias" + }, + "enabled": { + "path": "elasticsearch.cluster.stats.stack.xpack.ccr.enabled", + "type": "alias" + } + } + } + } + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.stats.version", + "elasticsearch.cluster.stats.state.nodes_hash", + "elasticsearch.cluster.stats.state.master_node", + "elasticsearch.cluster.stats.state.version", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.cluster.stats.status", + "elasticsearch.cluster.stats.nodes.versions", + "elasticsearch.cluster.stats.license.issued_to", + "elasticsearch.cluster.stats.license.issuer", + "elasticsearch.cluster.stats.license.status", + "elasticsearch.cluster.stats.license.type", + "elasticsearch.cluster.stats.license.uid", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.version", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.enrich-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.enrich-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.enrich", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "enrich": { + "properties": { + "executed_searches": { + "properties": { + "total": { + "type": "long" + } + } + }, + "executing_policy": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "cancellable": { + "type": "boolean" + }, + "id": { + "type": "long" + }, + "parent_task_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "task": { + "ignore_above": 1024, + "type": "keyword" + }, + "time": { + "properties": { + "running": { + "properties": { + "nano": { + "type": "long" + } + } + }, + "start": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "queue": { + "properties": { + "size": { + "type": "long" + } + } + }, + "remote_requests": { + "properties": { + "current": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.enrich.executing_policy.name", + "elasticsearch.enrich.executing_policy.task.task", + "elasticsearch.enrich.executing_policy.task.action", + "elasticsearch.enrich.executing_policy.task.parent_task_id", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "created": { + "type": "long" + }, + "hidden": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "shards": { + "properties": { + "primaries": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bulk": { + "properties": { + "avg_size_in_bytes": { + "type": "long" + }, + "avg_time_in_millis": { + "type": "long" + }, + "total_operations": { + "type": "long" + }, + "total_size_in_bytes": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "evictions": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "type": "long" + }, + "index_total": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "query_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "external_total_time_in_millis": { + "type": "long" + }, + "total_time_in_millis": { + "type": "long" + } + } + }, + "request_cache": { + "properties": { + "evictions": { + "type": "long" + }, + "hit_count": { + "type": "long" + }, + "memory_size_in_bytes": { + "type": "long" + }, + "miss_count": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "type": "long" + }, + "query_total": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values_memory_in_bytes": { + "type": "long" + }, + "fixed_bit_set_memory_in_bytes": { + "type": "long" + }, + "index_writer_memory_in_bytes": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "memory_in_bytes": { + "type": "long" + }, + "norms_memory_in_bytes": { + "type": "long" + }, + "points_memory_in_bytes": { + "type": "long" + }, + "stored_fields_memory_in_bytes": { + "type": "long" + }, + "term_vectors_memory_in_bytes": { + "type": "long" + }, + "terms_memory_in_bytes": { + "type": "long" + }, + "version_map_memory_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "size_in_bytes": { + "type": "long" + } + } + } + } + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_stats": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "primaries": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.docs.count", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.primaries.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.primaries.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.primaries.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.primaries.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.primaries.segments.count", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.primaries.store.size_in_bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.fielddata.memory_size_in_bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.total.indexing.index_time_in_millis", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.total.indexing.index_total", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.index.total.indexing.throttle_time_in_millis", + "type": "alias" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "path": "elasticsearch.index.total.merges.total_size_in_bytes", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.query_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "path": "elasticsearch.index.total.refresh.total_time_in_millis", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.index.total.request_cache.memory_size_in_bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.total.search.query_time_in_millis", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.total.search.query_total", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.index.total.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.doc_values_memory_in_bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.fixed_bit_set_memory_in_bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.index_writer_memory_in_bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.index.total.segments.memory_in_bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.norms_memory_in_bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.points_memory_in_bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.stored_fields_memory_in_bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.term_vectors_memory_in_bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.terms_memory_in_bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.index.total.segments.version_map_memory_in_bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "path": "elasticsearch.index.total.store.size_in_bytes", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.uuid", + "elasticsearch.index.status", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_recovery-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_recovery-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_recovery", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovery": { + "properties": { + "id": { + "type": "long" + }, + "index": { + "properties": { + "files": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "recovered": { + "type": "long" + }, + "reused": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "size": { + "properties": { + "recovered_in_bytes": { + "type": "long" + }, + "reused_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "primary": { + "type": "boolean" + }, + "source": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stage": { + "ignore_above": 1024, + "type": "keyword" + }, + "start_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "stop_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "target": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "translog": { + "properties": { + "percent": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "type": "long" + }, + "total_on_start": { + "type": "long" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "verify_index": { + "properties": { + "check_index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index_recovery": { + "properties": { + "shards": { + "properties": { + "start_time_in_millis": { + "path": "elasticsearch.index.recovery.start_time.ms", + "type": "alias" + }, + "stop_time_in_millis": { + "path": "elasticsearch.index.recovery.stop_time.ms", + "type": "alias" + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.index.name", + "elasticsearch.index.recovery.index.files.percent", + "elasticsearch.index.recovery.name", + "elasticsearch.index.recovery.type", + "elasticsearch.index.recovery.stage", + "elasticsearch.index.recovery.translog.percent", + "elasticsearch.index.recovery.target.transport_address", + "elasticsearch.index.recovery.target.id", + "elasticsearch.index.recovery.target.host", + "elasticsearch.index.recovery.target.name", + "elasticsearch.index.recovery.source.transport_address", + "elasticsearch.index.recovery.source.id", + "elasticsearch.index.recovery.source.host", + "elasticsearch.index.recovery.source.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.index_summary-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.index_summary-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.index_summary", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "index": { + "properties": { + "summary": { + "properties": { + "primaries": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + }, + "count": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "total": { + "properties": { + "bulk": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "time": { + "properties": { + "avg": { + "properties": { + "bytes": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "is_throttled": { + "type": "boolean" + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query": { + "properties": { + "count": { + "type": "long" + }, + "time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "indices_stats": { + "properties": { + "_all": { + "properties": { + "primaries": { + "properties": { + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.index.summary.primaries.indexing.index.time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.index.summary.primaries.indexing.index.count", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "indexing": { + "properties": { + "index_total": { + "path": "elasticsearch.index.summary.total.indexing.index.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.index.summary.total.search.query.time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.index.summary.total.search.query.count", + "type": "alias" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "memory": { + "properties": { + "heap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "nonheap": { + "properties": { + "init": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "process": { + "properties": { + "mlockall": { + "type": "boolean" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.version", + "elasticsearch.node.jvm.version", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.node_stats-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + }, + "read": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "operations": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "free": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + } + } + } + } + }, + "indexing_pressure": { + "properties": { + "memory": { + "properties": { + "current": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "limit_in_bytes": { + "type": "long" + }, + "total": { + "properties": { + "all": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "combined_coordinating_and_primary": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "coordinating": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "primary": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + }, + "replica": { + "properties": { + "bytes": { + "type": "long" + }, + "rejections": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "indices": { + "properties": { + "bulk": { + "properties": { + "avg_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "avg_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "operations": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "total_size": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "docs": { + "properties": { + "count": { + "type": "long" + }, + "deleted": { + "type": "long" + } + } + }, + "fielddata": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "indexing": { + "properties": { + "index_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "index_total": { + "properties": { + "count": { + "type": "long" + } + } + }, + "throttle_time": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "query_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "request_cache": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "query_time": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "query_total": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "segments": { + "properties": { + "count": { + "type": "long" + }, + "doc_values": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "fixed_bit_set": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "index_writer": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "norms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "points": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "stored_fields": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "term_vectors": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "terms": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "version_map": { + "properties": { + "memory": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + }, + "ingest": { + "properties": { + "total": { + "properties": { + "count": { + "type": "long" + }, + "current": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "time_in_millis": { + "type": "long" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "collection": { + "properties": { + "count": { + "type": "long" + }, + "ms": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "double" + } + } + } + } + }, + "pools": { + "properties": { + "old": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "survivor": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "young": { + "properties": { + "max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "peak_max": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs": { + "properties": { + "quota": { + "properties": { + "us": { + "type": "long" + } + } + } + } + }, + "stat": { + "properties": { + "elapsed_periods": { + "properties": { + "count": { + "type": "long" + } + } + }, + "time_throttled": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "times_throttled": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage": { + "properties": { + "ns": { + "type": "long" + } + } + } + } + }, + "memory": { + "properties": { + "control_group": { + "ignore_above": 1024, + "type": "keyword" + }, + "limit": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "usage": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "cpu": { + "properties": { + "load_avg": { + "properties": { + "1m": { + "type": "half_float" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "pct": { + "type": "double" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "get": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "index": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "search": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + }, + "write": { + "properties": { + "queue": { + "properties": { + "count": { + "type": "long" + } + } + }, + "rejected": { + "properties": { + "count": { + "type": "long" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node_stats": { + "properties": { + "fs": { + "properties": { + "io_stats": { + "properties": { + "total": { + "properties": { + "operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.operations.count", + "type": "alias" + }, + "read_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.read.operations.count", + "type": "alias" + }, + "write_operations": { + "path": "elasticsearch.node.stats.fs.io_stats.total.write.operations.count", + "type": "alias" + } + } + } + } + }, + "summary": { + "properties": { + "available": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + } + } + }, + "total": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "total": { + "properties": { + "available_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.available.bytes", + "type": "alias" + }, + "total_in_bytes": { + "path": "elasticsearch.node.stats.fs.summary.total.bytes", + "type": "alias" + } + } + } + } + }, + "indices": { + "properties": { + "docs": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.docs.count", + "type": "alias" + } + } + }, + "fielddata": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.fielddata.memory.bytes", + "type": "alias" + } + } + }, + "indexing": { + "properties": { + "index_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.index_time.ms", + "type": "alias" + }, + "index_total": { + "path": "elasticsearch.node.stats.indices.indexing.index_total.count", + "type": "alias" + }, + "throttle_time_in_millis": { + "path": "elasticsearch.node.stats.indices.indexing.throttle_time.ms", + "type": "alias" + } + } + }, + "query_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.query_cache.memory.bytes", + "type": "alias" + } + } + }, + "request_cache": { + "properties": { + "memory_size_in_bytes": { + "path": "elasticsearch.node.stats.indices.request_cache.memory.bytes", + "type": "alias" + } + } + }, + "search": { + "properties": { + "query_time_in_millis": { + "path": "elasticsearch.node.stats.indices.search.query_time.ms", + "type": "alias" + }, + "query_total": { + "path": "elasticsearch.node.stats.indices.search.query_total.count", + "type": "alias" + } + } + }, + "segments": { + "properties": { + "count": { + "path": "elasticsearch.node.stats.indices.segments.count", + "type": "alias" + }, + "doc_values_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.doc_values.memory.bytes", + "type": "alias" + }, + "fixed_bit_set_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.fixed_bit_set.memory.bytes", + "type": "alias" + }, + "index_writer_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.index_writer.memory.bytes", + "type": "alias" + }, + "memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.memory.bytes", + "type": "alias" + }, + "norms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.norms.memory.bytes", + "type": "alias" + }, + "points_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.points.memory.bytes", + "type": "alias" + }, + "stored_fields_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.stored_fields.memory.bytes", + "type": "alias" + }, + "term_vectors_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.term_vectors.memory.bytes", + "type": "alias" + }, + "terms_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.terms.memory.bytes", + "type": "alias" + }, + "version_map_memory_in_bytes": { + "path": "elasticsearch.node.stats.indices.segments.version_map.memory.bytes", + "type": "alias" + } + } + }, + "store": { + "properties": { + "size": { + "properties": { + "bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + }, + "size_in_bytes": { + "path": "elasticsearch.node.stats.indices.store.size.bytes", + "type": "alias" + } + } + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms", + "type": "alias" + } + } + }, + "young": { + "properties": { + "collection_count": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.count", + "type": "alias" + }, + "collection_time_in_millis": { + "path": "elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms", + "type": "alias" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.max.bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.bytes", + "type": "alias" + }, + "heap_used_percent": { + "path": "elasticsearch.node.stats.jvm.mem.heap.used.pct", + "type": "alias" + } + } + } + } + }, + "node_id": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.cfs.quota.us", + "type": "alias" + }, + "stat": { + "properties": { + "number_of_elapsed_periods": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.elapsed_periods.count", + "type": "alias" + }, + "number_of_times_throttled": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.times_throttled.count", + "type": "alias" + }, + "time_throttled_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpu.stat.time_throttled.ns", + "type": "alias" + } + } + } + } + }, + "cpuacct": { + "properties": { + "usage_nanos": { + "path": "elasticsearch.node.stats.os.cgroup.cpuacct.usage.ns", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "control_group": { + "path": "elasticsearch.node.stats.os.cgroup.memory.control_group", + "type": "alias" + }, + "limit_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "type": "alias" + }, + "usage_in_bytes": { + "path": "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "type": "alias" + } + } + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "1m": { + "path": "elasticsearch.node.stats.os.cpu.load_avg.1m", + "type": "alias" + } + } + } + } + } + } + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "elasticsearch.node.stats.process.cpu.pct", + "type": "alias" + } + } + } + } + }, + "thread_pool": { + "properties": { + "bulk": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.bulk.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.bulk.rejected.count", + "type": "alias" + } + } + }, + "get": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.get.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.get.rejected.count", + "type": "alias" + } + } + }, + "index": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.index.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.index.rejected.count", + "type": "alias" + } + } + }, + "search": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.search.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.search.rejected.count", + "type": "alias" + } + } + }, + "write": { + "properties": { + "queue": { + "path": "elasticsearch.node.stats.thread_pool.write.queue.count", + "type": "alias" + }, + "rejected": { + "path": "elasticsearch.node.stats.thread_pool.write.rejected.count", + "type": "alias" + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.node.stats.os.cgroup.memory.control_group", + "elasticsearch.node.stats.os.cgroup.memory.limit.bytes", + "elasticsearch.node.stats.os.cgroup.memory.usage.bytes", + "elasticsearch.node.id", + "elasticsearch.node.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-elasticsearch.stack_monitoring.shard-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-elasticsearch.stack_monitoring.shard-*" + ], + "name": "metrics-elasticsearch.stack_monitoring.shard", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "elasticsearch" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "state": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "stats": { + "properties": { + "state": { + "properties": { + "state_uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "index": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "master": { + "type": "boolean" + }, + "mlockall": { + "type": "boolean" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "number": { + "type": "long" + }, + "primary": { + "type": "boolean" + }, + "relocating_node": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source_node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "shard": { + "properties": { + "index": { + "path": "elasticsearch.index.name", + "type": "alias" + }, + "node": { + "path": "elasticsearch.node.id", + "type": "alias" + }, + "primary": { + "path": "elasticsearch.shard.primary", + "type": "alias" + }, + "shard": { + "path": "elasticsearch.shard.number", + "type": "alias" + }, + "state": { + "path": "elasticsearch.shard.state", + "type": "alias" + } + } + }, + "source_node": { + "properties": { + "name": { + "path": "elasticsearch.node.name", + "type": "alias" + }, + "uuid": { + "path": "elasticsearch.node.id", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "service.address", + "service.type", + "service.name", + "error.message", + "elasticsearch.shard.state", + "elasticsearch.shard.relocating_node.name", + "elasticsearch.shard.relocating_node.id", + "elasticsearch.shard.source_node.name", + "elasticsearch.shard.source_node.uuid", + "elasticsearch.index.name", + "elasticsearch.cluster.name", + "elasticsearch.cluster.id", + "elasticsearch.cluster.state.id", + "elasticsearch.cluster.stats.state.state_uuid", + "elasticsearch.node.id", + "elasticsearch.node.name" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_actions": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.cluster_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.cluster_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.cluster_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "cluster_rules": { + "properties": { + "overdue": { + "properties": { + "count": { + "type": "long" + }, + "delay": { + "properties": { + "p50": { + "type": "float" + }, + "p99": { + "type": "float" + } + } + } + } + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_actions-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_actions-*" + ], + "name": "metrics-kibana.stack_monitoring.node_actions", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_actions": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.node_rules-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.node_rules-*" + ], + "name": "metrics-kibana.stack_monitoring.node_rules", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node_rules": { + "properties": { + "executions": { + "type": "long" + }, + "failures": { + "type": "long" + }, + "timeouts": { + "type": "long" + } + } + } + } + }, + "kibana_stats": { + "properties": { + "kibana": { + "properties": { + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.stats-*" + ], + "name": "metrics-kibana.stack_monitoring.stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "kibana.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "kibana": { + "properties": { + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "index": { + "ignore_above": 1024, + "type": "keyword" + }, + "kibana": { + "properties": { + "status": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "distro": { + "ignore_above": 1024, + "type": "keyword" + }, + "distroRelease": { + "ignore_above": 1024, + "type": "keyword" + }, + "load": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "type": "long" + }, + "total_in_bytes": { + "type": "long" + }, + "used_in_bytes": { + "type": "long" + } + } + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "platformRelease": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "properties": { + "ms": { + "scaling_factor": 1000, + "type": "scaled_float" + } + } + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "total": { + "properties": { + "bytes": { + "type": "long" + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "used": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "resident_set_size": { + "properties": { + "bytes": { + "type": "long" + } + } + } + } + }, + "uptime": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "request": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + }, + "response_time": { + "properties": { + "avg": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "max": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "usage": { + "properties": { + "index": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "kibana_stats": { + "properties": { + "concurrent_connections": { + "path": "kibana.stats.concurrent_connections", + "type": "alias" + }, + "kibana": { + "properties": { + "response_time": { + "properties": { + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "status": { + "path": "kibana.stats.status", + "type": "alias" + }, + "uuid": { + "path": "service.id", + "type": "alias" + }, + "version": { + "path": "service.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "load": { + "properties": { + "15m": { + "path": "kibana.stats.os.load.15m", + "type": "alias" + }, + "1m": { + "path": "kibana.stats.os.load.1m", + "type": "alias" + }, + "5m": { + "path": "kibana.stats.os.load.5m", + "type": "alias" + } + } + }, + "memory": { + "properties": { + "free_in_bytes": { + "path": "kibana.stats.os.memory.free_in_bytes", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "event_loop_delay": { + "path": "kibana.stats.process.event_loop_delay.ms", + "type": "alias" + }, + "memory": { + "properties": { + "heap": { + "properties": { + "size_limit": { + "path": "kibana.stats.process.memory.heap.size_limit.bytes", + "type": "alias" + } + } + }, + "resident_set_size_in_bytes": { + "path": "kibana.stats.process.memory.resident_set_size.bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "kibana.stats.process.uptime.ms", + "type": "alias" + } + } + }, + "requests": { + "properties": { + "disconnects": { + "path": "kibana.stats.request.disconnects", + "type": "alias" + }, + "total": { + "path": "kibana.stats.request.total", + "type": "alias" + } + } + }, + "response_times": { + "properties": { + "average": { + "path": "kibana.stats.response_time.avg.ms", + "type": "alias" + }, + "max": { + "path": "kibana.stats.response_time.max.ms", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.address", + "service.version", + "service.type", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "kibana.elasticsearch.cluster.id", + "kibana.stats.kibana.status", + "kibana.stats.usage.index", + "kibana.stats.name", + "kibana.stats.index", + "kibana.stats.host.name", + "kibana.stats.status", + "kibana.stats.transport_address", + "kibana.stats.os.distro", + "kibana.stats.os.distroRelease", + "kibana.stats.os.platform", + "kibana.stats.os.platformRelease" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-kibana.stack_monitoring.status-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-kibana.stack_monitoring.status-*" + ], + "name": "metrics-kibana.stack_monitoring.status", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "kibana" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + } + } + }, + "kibana": { + "properties": { + "status": { + "properties": { + "metrics": { + "properties": { + "concurrent_connections": { + "type": "long" + }, + "requests": { + "properties": { + "disconnects": { + "type": "long" + }, + "total": { + "type": "long" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "properties": { + "overall": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.id", + "service.name", + "service.version", + "service.type", + "service.address", + "ecs.version", + "error.message", + "kibana.status.name", + "kibana.status.status.overall.state" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node-*" + ], + "name": "metrics-logstash.stack_monitoring.node", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "jvm": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "properties": { + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "representation": { + "properties": { + "graph": { + "properties": { + "edges": { + "type": "object" + }, + "vertices": { + "type": "object" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "workers": { + "type": "long" + } + } + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "logstash_state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "path": "logstash.node.state.pipeline.hash", + "type": "alias" + }, + "id": { + "path": "logstash.node.state.pipeline.id", + "type": "alias" + } + } + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.cluster.id", + "logstash.elasticsearch.cluster.id", + "logstash.node.jvm.version", + "logstash.node.host", + "logstash.node.version", + "logstash.node.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.state.pipeline.ephemeral_id", + "logstash.node.state.pipeline.representation.hash", + "logstash.node.state.pipeline.representation.type", + "logstash.node.state.pipeline.representation.version" + ] + } + } + } + } + } + } +} + +{ + "type": "data_stream", + "value": { + "data_stream": "metrics-logstash.stack_monitoring.node_stats-default", + "template": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "data_stream": { + "allow_custom_routing": false, + "hidden": false + }, + "index_patterns": [ + "metrics-logstash.stack_monitoring.node_stats-*" + ], + "name": "metrics-logstash.stack_monitoring.node_stats", + "priority": 200, + "template": { + "mappings": { + "_meta": { + "managed": true, + "managed_by": "fleet", + "package": { + "name": "logstash" + } + }, + "date_detection": false, + "dynamic": false, + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "properties": { + "@timestamp": { + "type": "date" + }, + "cluster_uuid": { + "path": "logstash.elasticsearch.cluster.id", + "type": "alias" + }, + "data_stream": { + "properties": { + "dataset": { + "type": "constant_keyword" + }, + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "message": { + "type": "match_only_text" + } + } + }, + "event": { + "properties": { + "agent_id_status": { + "ignore_above": 1024, + "type": "keyword" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "ingested": { + "format": "strict_date_time_no_millis||strict_date_optional_time||epoch_millis", + "type": "date" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "logstash": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "elasticsearch": { + "properties": { + "cluster": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "node": { + "properties": { + "state": { + "properties": { + "pipeline": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + } + } + }, + "jvm": { + "properties": { + "gc": { + "properties": { + "collectors": { + "properties": { + "old": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + }, + "young": { + "properties": { + "collection_count": { + "type": "long" + }, + "collection_time_in_millis": { + "type": "long" + } + } + } + } + } + } + }, + "mem": { + "properties": { + "heap_max_in_bytes": { + "type": "long" + }, + "heap_used_in_bytes": { + "type": "long" + }, + "heap_used_percent": { + "type": "long" + } + } + }, + "uptime_in_millis": { + "type": "long" + } + } + }, + "logstash": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "http_address": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "pipeline": { + "properties": { + "batch_size": { + "type": "long" + }, + "workers": { + "type": "long" + } + } + }, + "snapshot": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpu": { + "properties": { + "cfs_quota_micros": { + "type": "long" + }, + "control_group": { + "type": "text" + }, + "stat": { + "type": "object" + } + } + }, + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "type": "half_float" + }, + "1m": { + "type": "half_float" + }, + "5m": { + "type": "half_float" + } + } + }, + "percent": { + "type": "double" + } + } + } + } + }, + "pipelines": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "events": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "filtered": { + "type": "long" + }, + "in": { + "type": "long" + }, + "out": { + "type": "long" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + }, + "max_queue_size_in_bytes": { + "type": "long" + }, + "queue_size_in_bytes": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "vertices": { + "properties": { + "duration_in_millis": { + "type": "long" + }, + "events_in": { + "type": "long" + }, + "events_out": { + "type": "long" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "long_counters": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "type": "long" + } + }, + "type": "nested" + }, + "pipeline_ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "queue_push_duration_in_millis": { + "type": "long" + } + }, + "type": "nested" + } + }, + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "type": "double" + } + } + }, + "max_file_descriptors": { + "type": "long" + }, + "open_file_descriptors": { + "type": "long" + } + } + }, + "queue": { + "properties": { + "events_count": { + "type": "long" + } + } + }, + "reloads": { + "properties": { + "failures": { + "type": "long" + }, + "successes": { + "type": "long" + } + } + }, + "timestamp": { + "type": "date" + } + } + } + } + } + } + }, + "logstash_stats": { + "properties": { + "events": { + "properties": { + "duration_in_millis": { + "path": "logstash.node.stats.events.duration_in_millis", + "type": "alias" + }, + "in": { + "path": "logstash.node.stats.events.in", + "type": "alias" + }, + "out": { + "path": "logstash.node.stats.events.out", + "type": "alias" + } + } + }, + "jvm": { + "properties": { + "mem": { + "properties": { + "heap_max_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_max_in_bytes", + "type": "alias" + }, + "heap_used_in_bytes": { + "path": "logstash.node.stats.jvm.mem.heap_used_in_bytes", + "type": "alias" + } + } + }, + "uptime_in_millis": { + "path": "logstash.node.stats.jvm.uptime_in_millis", + "type": "alias" + } + } + }, + "logstash": { + "properties": { + "uuid": { + "path": "logstash.node.stats.logstash.uuid", + "type": "alias" + }, + "version": { + "path": "logstash.node.stats.logstash.version", + "type": "alias" + } + } + }, + "os": { + "properties": { + "cgroup": { + "properties": { + "cpuacct": { + "type": "object" + } + } + }, + "cpu": { + "properties": { + "load_average": { + "properties": { + "15m": { + "path": "logstash.node.stats.os.cpu.load_average.15m", + "type": "alias" + }, + "1m": { + "path": "logstash.node.stats.os.cpu.load_average.1m", + "type": "alias" + }, + "5m": { + "path": "logstash.node.stats.os.cpu.load_average.5m", + "type": "alias" + } + } + }, + "stat": { + "type": "object" + } + } + } + } + }, + "pipelines": { + "type": "nested" + }, + "process": { + "properties": { + "cpu": { + "properties": { + "percent": { + "path": "logstash.node.stats.process.cpu.percent", + "type": "alias" + } + } + } + } + }, + "queue": { + "properties": { + "events_count": { + "path": "logstash.node.stats.queue.events_count", + "type": "alias" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "process": { + "properties": { + "pid": { + "type": "long" + } + } + }, + "service": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timestamp": { + "path": "@timestamp", + "type": "alias" + } + } + }, + "settings": { + "index": { + "codec": "best_compression", + "lifecycle": { + "name": "metrics" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "query": { + "default_field": [ + "service.hostname", + "service.id", + "service.type", + "service.version", + "service.address", + "service.name", + "ecs.version", + "event.dataset", + "event.module", + "host.name", + "error.message", + "logstash.elasticsearch.cluster.id", + "logstash.node.state.pipeline.id", + "logstash.node.state.pipeline.hash", + "logstash.node.stats.logstash.uuid", + "logstash.node.stats.logstash.version", + "logstash.node.stats.logstash.ephemeral_id", + "logstash.node.stats.logstash.host", + "logstash.node.stats.logstash.http_address", + "logstash.node.stats.logstash.name", + "logstash.node.stats.logstash.status", + "logstash.node.stats.os.cgroup.cpuacct.control_group", + "logstash.node.stats.os.cgroup.cpu.control_group", + "logstash.node.stats.pipelines.id", + "logstash.node.stats.pipelines.hash", + "logstash.node.stats.pipelines.ephemeral_id", + "logstash.node.stats.pipelines.queue.type", + "logstash.node.stats.pipelines.vertices.id", + "logstash.node.stats.pipelines.vertices.long_counters.name", + "logstash.node.stats.pipelines.vertices.pipeline_ephemeral_id", + "logstash.cluster.id" + ] + } + } + } + } + } + } +} diff --git a/x-pack/test/functional/fixtures/kbn_archiver/dashboard/with_by_value_visualizations.json b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/with_by_value_visualizations.json new file mode 100644 index 0000000000000..8b1d3669e95de --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/dashboard/with_by_value_visualizations.json @@ -0,0 +1,81 @@ +{ + "attributes": { + "fieldAttrs": "{}", + "fieldFormatMap": "{}", + "fields": "[]", + "name": "logs", + "runtimeFieldMap": "{}", + "sourceFilters": "[]", + "timeFieldName": "@timestamp", + "title": "logstash-*", + "typeMeta": "{}" + }, + "coreMigrationVersion": "8.6.0", + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2022-10-17T13:07:32.427Z", + "version": "WzExNCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "optionsJSON": "{\"useMargins\":true,\"syncColors\":false,\"syncTooltips\":false,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"8.6.0\",\"type\":\"lens\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"d10dbf3c-b1c0-4740-8cd5-2502dc688618\"},\"panelIndex\":\"d10dbf3c-b1c0-4740-8cd5-2502dc688618\",\"embeddableConfig\":{\"attributes\":{\"title\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"8e91e58e-3ba9-445a-9313-ccad555eeb0c\",\"name\":\"indexpattern-datasource-layer-79836924-c4e7-47eb-9268-7634192b6d6c\"}],\"state\":{\"visualization\":{\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"valueLabels\":\"hide\",\"fittingFunction\":\"None\",\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"preferredSeriesType\":\"bar_stacked\",\"layers\":[{\"layerId\":\"79836924-c4e7-47eb-9268-7634192b6d6c\",\"accessors\":[\"a1a93ece-ff88-4ad0-8745-4fea77562bcf\"],\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"layerType\":\"data\",\"xAccessor\":\"6ecd0bf2-d62b-4ad2-bd2a-7dcb35d299e8\"}]},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"formBased\":{\"layers\":{\"79836924-c4e7-47eb-9268-7634192b6d6c\":{\"columns\":{\"6ecd0bf2-d62b-4ad2-bd2a-7dcb35d299e8\":{\"label\":\"@timestamp\",\"dataType\":\"date\",\"operationType\":\"date_histogram\",\"sourceField\":\"@timestamp\",\"isBucketed\":true,\"scale\":\"interval\",\"params\":{\"interval\":\"auto\",\"includeEmptyRows\":true,\"dropPartials\":false}},\"a1a93ece-ff88-4ad0-8745-4fea77562bcf\":{\"label\":\"Count of records\",\"customLabel\":true,\"dataType\":\"number\",\"operationType\":\"count\",\"isBucketed\":false,\"scale\":\"ratio\",\"sourceField\":\"___records___\",\"params\":{\"emptyAsNull\":true}}},\"columnOrder\":[\"6ecd0bf2-d62b-4ad2-bd2a-7dcb35d299e8\",\"a1a93ece-ff88-4ad0-8745-4fea77562bcf\"],\"incompleteColumns\":{}}}},\"textBased\":{\"layers\":{}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"enhancements\":{},\"hidePanelTitles\":false},\"title\":\"Lens\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"9b0198af-d852-4dc1-83a7-a71582e883cd\"},\"panelIndex\":\"9b0198af-d852-4dc1-83a7-a71582e883cd\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"metrics\",\"params\":{\"time_range_mode\":\"entire_time_range\",\"id\":\"1d14ec25-6261-479f-afca-5f2861ae43d5\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"21fe29af-1439-4218-8077-0d32dc9bb2d3\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"palette\":{\"type\":\"palette\",\"name\":\"default\"},\"metrics\":[{\"id\":\"36e3cb36-dd8d-483b-8c29-93f2b45009c5\",\"type\":\"count\"}],\"separate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"default\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"override_index_pattern\":0,\"series_drop_last_bucket\":0}],\"time_field\":\"\",\"use_kibana_indexes\":true,\"interval\":\"\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"axis_scale\":\"normal\",\"show_legend\":1,\"truncate_legend\":1,\"max_lines_legend\":1,\"show_grid\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":0,\"isModelInvalid\":false,\"index_pattern_ref_name\":\"metrics_9b0198af-d852-4dc1-83a7-a71582e883cd_0_index_pattern\"},\"uiState\":{},\"data\":{\"aggs\":[],\"searchSource\":{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"TSVB\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"8e4a8d54-a4cf-4806-8d7f-1414d7227058\"},\"panelIndex\":\"8e4a8d54-a4cf-4806-8d7f-1414d7227058\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"vega\",\"params\":{\"spec\":\"{\\n \\\"$schema\\\": \\\"https://vega.github.io/schema/vega-lite/v5.json\\\",\\n \\\"title\\\": \\\"Event counts from all indexes\\\",\\n \\\"data\\\": {\\n \\\"url\\\": {\\n \\\"%context%\\\": true,\\n \\\"%timefield%\\\": \\\"@timestamp\\\",\\n \\\"index\\\": \\\"_all\\\",\\n \\\"body\\\": {\\n \\\"aggs\\\": {\\n \\\"time_buckets\\\": {\\n \\\"date_histogram\\\": {\\n \\\"field\\\": \\\"@timestamp\\\",\\n \\\"interval\\\": {\\\"%autointerval%\\\": true},\\n \\\"extended_bounds\\\": {\\n \\\"min\\\": {\\\"%timefilter%\\\": \\\"min\\\"},\\n \\\"max\\\": {\\\"%timefilter%\\\": \\\"max\\\"}\\n },\\n \\\"min_doc_count\\\": 0\\n }\\n }\\n },\\n \\\"size\\\": 0\\n }\\n },\\n \\\"format\\\": {\\\"property\\\": \\\"aggregations.time_buckets.buckets\\\"}\\n },\\n \\\"mark\\\": \\\"line\\\",\\n \\\"encoding\\\": {\\n \\\"x\\\": {\\\"field\\\": \\\"key\\\", \\\"type\\\": \\\"temporal\\\", \\\"axis\\\": {\\\"title\\\": false}},\\n \\\"y\\\": {\\n \\\"field\\\": \\\"doc_count\\\",\\n \\\"type\\\": \\\"quantitative\\\",\\n \\\"axis\\\": {\\\"title\\\": \\\"Document count\\\"}\\n }\\n }\\n}\"},\"uiState\":{},\"data\":{\"aggs\":[],\"searchSource\":{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Vega\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":15,\"w\":24,\"h\":15,\"i\":\"d30db421-d8db-4484-827c-e8ac77cfe567\"},\"panelIndex\":\"d30db421-d8db-4484-827c-e8ac77cfe567\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"showToolbar\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\",\"autoFitRowToContent\":false},\"uiState\":{},\"data\":{\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{\"emptyAsNull\":false},\"schema\":\"metric\"}],\"searchSource\":{\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Table\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":24,\"h\":15,\"i\":\"39e8def4-1952-4c76-9dfb-12e226d1bd77\"},\"panelIndex\":\"39e8def4-1952-4c76-9dfb-12e226d1bd77\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*)\",\"interval\":\"auto\"},\"uiState\":{},\"data\":{\"aggs\":[],\"searchSource\":{}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Timelion\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":30,\"w\":24,\"h\":15,\"i\":\"65e8baeb-c6d5-4bd4-9e14-03dd8db76801\"},\"panelIndex\":\"65e8baeb-c6d5-4bd4-9e14-03dd8db76801\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"legendDisplay\":\"hide\",\"legendPosition\":\"right\",\"nestedLegend\":false,\"truncateLegend\":true,\"maxLegendLines\":1,\"distinctColors\":false,\"isDonut\":true,\"emptySizeRatio\":0.3,\"palette\":{\"type\":\"palette\",\"name\":\"default\"},\"labels\":{\"show\":true,\"last_level\":false,\"values\":true,\"valuesFormat\":\"percent\",\"percentDecimals\":2,\"truncate\":100,\"position\":\"default\"}},\"uiState\":{},\"data\":{\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{\"emptyAsNull\":false},\"schema\":\"metric\"}],\"searchSource\":{\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Pie\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":45,\"w\":24,\"h\":15,\"i\":\"05e6c9d4-7dff-466d-a6b8-1f15ffd0414c\"},\"panelIndex\":\"05e6c9d4-7dff-466d-a6b8-1f15ffd0414c\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"uiState\":{},\"data\":{\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{\"emptyAsNull\":false},\"schema\":\"metric\"}],\"searchSource\":{\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Metric\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":45,\"w\":24,\"h\":15,\"i\":\"174718ba-152d-47e8-8cc5-25e50118993c\"},\"panelIndex\":\"174718ba-152d-47e8-8cc5-25e50118993c\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"colorsNumber\":4,\"colorSchema\":\"Green to Red\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"black\"}}]},\"uiState\":{\"vis\":{\"defaultColors\":{\"0 - 2.5\":\"rgb(0,104,55)\",\"2.5 - 5\":\"rgb(134,203,102)\",\"5 - 7.5\":\"rgb(254,254,189)\",\"7.5 - 10\":\"rgb(248,141,82)\"}}},\"data\":{\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{\"emptyAsNull\":false},\"schema\":\"metric\"}],\"searchSource\":{\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Heatmap\"},{\"version\":\"8.6.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":60,\"w\":24,\"h\":15,\"i\":\"624af60b-be8c-40d6-8553-a7ec56f2c9e9\"},\"panelIndex\":\"624af60b-be8c-40d6-8553-a7ec56f2c9e9\",\"embeddableConfig\":{\"savedVis\":{\"id\":\"\",\"title\":\"\",\"description\":\"\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{},\"style\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":true,\"truncate\":100},\"title\":{\"text\":\"\"},\"style\":{}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"circlesRadius\":1,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"detailedTooltip\":true,\"palette\":{\"type\":\"palette\",\"name\":\"default\"},\"addLegend\":true,\"legendPosition\":\"right\",\"fittingFunction\":\"linear\",\"times\":[],\"addTimeMarker\":false,\"truncateLegend\":true,\"maxLegendLines\":1,\"radiusRatio\":9,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}},\"uiState\":{},\"data\":{\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{\"emptyAsNull\":false},\"schema\":\"metric\"}],\"searchSource\":{\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"Area\"}]", + "timeRestore": false, + "title": "visualizations", + "version": 1 + }, + "coreMigrationVersion": "8.6.0", + "id": "d20cf9f0-4e1c-11ed-9841-7530949a111b", + "migrationVersion": { + "dashboard": "8.6.0" + }, + "references": [ + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "d10dbf3c-b1c0-4740-8cd5-2502dc688618:indexpattern-datasource-layer-79836924-c4e7-47eb-9268-7634192b6d6c", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "9b0198af-d852-4dc1-83a7-a71582e883cd:metrics_9b0198af-d852-4dc1-83a7-a71582e883cd_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "d30db421-d8db-4484-827c-e8ac77cfe567:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "65e8baeb-c6d5-4bd4-9e14-03dd8db76801:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "05e6c9d4-7dff-466d-a6b8-1f15ffd0414c:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "174718ba-152d-47e8-8cc5-25e50118993c:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "8e91e58e-3ba9-445a-9313-ccad555eeb0c", + "name": "624af60b-be8c-40d6-8553-a7ec56f2c9e9:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "dashboard", + "updated_at": "2022-10-17T13:14:45.648Z", + "version": "WzM5OCwxXQ==" +} diff --git a/x-pack/test/functional/services/aiops/explain_log_rate_spikes.ts b/x-pack/test/functional/services/aiops/explain_log_rate_spikes_page.ts similarity index 92% rename from x-pack/test/functional/services/aiops/explain_log_rate_spikes.ts rename to x-pack/test/functional/services/aiops/explain_log_rate_spikes_page.ts index 204dad2f3b7e7..ae768dd33163a 100644 --- a/x-pack/test/functional/services/aiops/explain_log_rate_spikes.ts +++ b/x-pack/test/functional/services/aiops/explain_log_rate_spikes_page.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import type { FtrProviderContext } from '../../ftr_provider_context'; -export function ExplainLogRateSpikesProvider({ getService }: FtrProviderContext) { +export function ExplainLogRateSpikesPageProvider({ getService }: FtrProviderContext) { const browser = getService('browser'); const elasticChart = getService('elasticChart'); const testSubjects = getService('testSubjects'); @@ -64,11 +64,15 @@ export function ExplainLogRateSpikesProvider({ getService }: FtrProviderContext) await testSubjects.existOrFail(`aiopsNoResultsFoundEmptyPrompt`); }, - async clickDocumentCountChart() { + async clickDocumentCountChart(chartClickCoordinates: [number, number]) { await elasticChart.waitForRenderComplete(); const el = await elasticChart.getCanvas(); - await browser.getActions().move({ x: 0, y: 0, origin: el._webElement }).click().perform(); + await browser + .getActions() + .move({ x: chartClickCoordinates[0], y: chartClickCoordinates[1], origin: el._webElement }) + .click() + .perform(); await this.assertHistogramBrushesExist(); }, @@ -154,7 +158,14 @@ export function ExplainLogRateSpikesProvider({ getService }: FtrProviderContext) // Get the total count of bars and index of a bar for a given timestamp in the charts debug data. const bars = chartDebugData?.bars?.[0].bars ?? []; const barsCount = bars.length; - const targetDeviationBarIndex = bars.findIndex((b) => b.x === timestamp); + + const closestTimestamp = bars + .map((d) => d.x) + .reduce(function (p, c) { + return Math.abs(c - timestamp) < Math.abs(p - timestamp) ? c : p; + }); + + const targetDeviationBarIndex = bars.findIndex((b) => b.x === closestTimestamp); // The pixel location based on the given timestamp, calculated by taking the share of the index value // over the total count of bars, normalized by the wrapping element's width. diff --git a/x-pack/test/functional/services/aiops/index.ts b/x-pack/test/functional/services/aiops/index.ts index 9fca53856a852..4b99fffd39fa4 100644 --- a/x-pack/test/functional/services/aiops/index.ts +++ b/x-pack/test/functional/services/aiops/index.ts @@ -7,18 +7,18 @@ import type { FtrProviderContext } from '../../ftr_provider_context'; -import { ExplainLogRateSpikesProvider } from './explain_log_rate_spikes'; +import { ExplainLogRateSpikesPageProvider } from './explain_log_rate_spikes_page'; import { ExplainLogRateSpikesAnalysisTableProvider } from './explain_log_rate_spikes_analysis_table'; import { ExplainLogRateSpikesAnalysisGroupsTableProvider } from './explain_log_rate_spikes_analysis_groups_table'; export function AiopsProvider(context: FtrProviderContext) { - const explainLogRateSpikes = ExplainLogRateSpikesProvider(context); + const explainLogRateSpikesPage = ExplainLogRateSpikesPageProvider(context); const explainLogRateSpikesAnalysisTable = ExplainLogRateSpikesAnalysisTableProvider(context); const explainLogRateSpikesAnalysisGroupsTable = ExplainLogRateSpikesAnalysisGroupsTableProvider(context); return { - explainLogRateSpikes, + explainLogRateSpikesPage, explainLogRateSpikesAnalysisTable, explainLogRateSpikesAnalysisGroupsTable, }; diff --git a/x-pack/test/functional/services/ml/overview_page.ts b/x-pack/test/functional/services/ml/overview_page.ts index 9fd536b24e760..ac860382f7b67 100644 --- a/x-pack/test/functional/services/ml/overview_page.ts +++ b/x-pack/test/functional/services/ml/overview_page.ts @@ -87,7 +87,7 @@ export function MachineLearningOverviewPageProvider({ getService }: FtrProviderC await this.assertPageNotFoundBannerExists(); const text = await testSubjects.getVisibleText('mlPageNotFoundBannerText'); expect(text).to.eql( - `The Machine Learning application doesn't recognize this route: /ml/${pathname}. You've been redirected to the Overview page.` + `The Machine Learning application doesn't recognize this route: /${pathname}. You've been redirected to the Overview page.` ); }, }; diff --git a/x-pack/test/functional/services/observability/overview/common.ts b/x-pack/test/functional/services/observability/overview/common.ts index e26e23e1e82db..4450344914bb9 100644 --- a/x-pack/test/functional/services/observability/overview/common.ts +++ b/x-pack/test/functional/services/observability/overview/common.ts @@ -15,7 +15,7 @@ const DATE_WITH_DATA = { const ALERTS_TITLE = 'Alerts'; const ALERTS_ACCORDION_SELECTOR = `accordion-${ALERTS_TITLE}`; -const ALERTS_SECTION_BUTTON_SELECTOR = `button[aria-controls="${ALERTS_TITLE}"]`; +const ALERTS_SECTION_BUTTON_CSS_SELECTOR = `[data-test-subj=${ALERTS_ACCORDION_SELECTOR}] button.euiAccordion__button`; const ALERTS_TABLE_NO_DATA_SELECTOR = 'alertsStateTableEmptyState'; const ALERTS_TABLE_WITH_DATA_SELECTOR = 'alertsTable'; const ALERTS_TABLE_LOADING_SELECTOR = 'internalAlertsPageLoading'; @@ -25,7 +25,7 @@ export function ObservabilityOverviewCommonProvider({ getService, }: FtrProviderContext) { const find = getService('find'); - const pageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['common', 'header']); const testSubjects = getService('testSubjects'); const retry = getService('retry'); @@ -39,12 +39,13 @@ export function ObservabilityOverviewCommonProvider({ }; const navigateToOverviewPage = async () => { - return await pageObjects.common.navigateToUrlWithBrowserHistory( + await pageObjects.common.navigateToUrlWithBrowserHistory( 'observability', '/overview', undefined, { ensureCurrentUrl: false } ); + await pageObjects.header.waitUntilLoadingHasFinished(); }; const waitForAlertsAccordionToAppear = async () => { @@ -54,15 +55,12 @@ export function ObservabilityOverviewCommonProvider({ }; const waitForAlertsTableLoadingToDisappear = async () => { - await retry.try(async () => { - await testSubjects.missingOrFail(ALERTS_TABLE_LOADING_SELECTOR, { timeout: 10000 }); - }); + await testSubjects.missingOrFail(ALERTS_TABLE_LOADING_SELECTOR, { timeout: 30_000 }); }; const openAlertsSection = async () => { await waitForAlertsAccordionToAppear(); - const alertSectionButton = await find.byCssSelector(ALERTS_SECTION_BUTTON_SELECTOR); - return await alertSectionButton.click(); + await find.clickByCssSelector(ALERTS_SECTION_BUTTON_CSS_SELECTOR); }; const openAlertsSectionAndWaitToAppear = async () => { diff --git a/x-pack/test/observability_functional/apps/observability/pages/overview/alert_table.ts b/x-pack/test/observability_functional/apps/observability/pages/overview/alert_table.ts index c4dea3334bc3c..42d4dba9ee855 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/overview/alert_table.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/overview/alert_table.ts @@ -10,12 +10,10 @@ import { FtrProviderContext } from '../../../../ftr_provider_context'; const ALL_ALERTS = 10; -export default ({ getPageObjects, getService }: FtrProviderContext) => { - const PageObjects = getPageObjects(['header']); +export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); - // Failing: See https://github.com/elastic/kibana/issues/140507 - describe.skip('Observability overview', function () { + describe('Observability overview', function () { this.tags('includeFirefox'); const observability = getService('observability'); @@ -32,7 +30,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Without alerts', function () { it('navigate and open alerts section', async () => { await observability.overview.common.navigateToOverviewPage(); - await PageObjects.header.waitUntilLoadingHasFinished(); await observability.overview.common.openAlertsSectionAndWaitToAppear(); }); @@ -46,7 +43,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('With alerts', function () { it('navigate and open alerts section', async () => { await observability.overview.common.navigateToOverviewPageWithAlerts(); - await PageObjects.header.waitUntilLoadingHasFinished(); await observability.overview.common.openAlertsSectionAndWaitToAppear(); }); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts index b5c72abac6329..87c8247c171bd 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts @@ -43,9 +43,7 @@ export default ({ getService }: FtrProviderContext) => { const SPACE1 = 'space1'; - // Failing: See https://github.com/elastic/kibana/issues/129219 - // Failing: See https://github.com/elastic/kibana/issues/129219 - describe.skip('ruleRegistryAlertsSearchStrategy', () => { + describe('ruleRegistryAlertsSearchStrategy', () => { let kibanaVersion: string; before(async () => { kibanaVersion = await kbnClient.version.get(); diff --git a/yarn.lock b/yarn.lock index 1348827b2539c..c9b082c63b66d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -150,7 +150,7 @@ dependencies: eslint-rule-composer "^0.3.0" -"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.20.3", "@babel/generator@^7.7.2": +"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.20.4", "@babel/generator@^7.7.2": version "7.20.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== @@ -2705,6 +2705,10 @@ version "0.0.0" uid "" +"@kbn/ambient-common-types@link:bazel-bin/packages/kbn-ambient-common-types": + version "0.0.0" + uid "" + "@kbn/ambient-storybook-types@link:bazel-bin/packages/kbn-ambient-storybook-types": version "0.0.0" uid "" @@ -3741,6 +3745,14 @@ version "0.0.0" uid "" +"@kbn/peggy-loader@link:bazel-bin/packages/kbn-peggy-loader": + version "0.0.0" + uid "" + +"@kbn/peggy@link:bazel-bin/packages/kbn-peggy": + version "0.0.0" + uid "" + "@kbn/performance-testing-dataset-extractor@link:bazel-bin/packages/kbn-performance-testing-dataset-extractor": version "0.0.0" uid "" @@ -4399,6 +4411,36 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@msgpackr-extract/msgpackr-extract-darwin-arm64@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-2.2.0.tgz#901c5937e1441572ea23e631fe6deca68482fe76" + integrity sha512-Z9LFPzfoJi4mflGWV+rv7o7ZbMU5oAU9VmzCgL240KnqDW65Y2HFCT3MW06/ITJSnbVLacmcEJA8phywK7JinQ== + +"@msgpackr-extract/msgpackr-extract-darwin-x64@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-2.2.0.tgz#fb877fe6bae3c4d3cea29786737840e2ae689066" + integrity sha512-vq0tT8sjZsy4JdSqmadWVw6f66UXqUCabLmUVHZwUFzMgtgoIIQjT4VVRHKvlof3P/dMCkbMJ5hB1oJ9OWHaaw== + +"@msgpackr-extract/msgpackr-extract-linux-arm64@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-2.2.0.tgz#986179c38b10ac41fbdaf7d036c825cbc72855d9" + integrity sha512-hlxxLdRmPyq16QCutUtP8Tm6RDWcyaLsRssaHROatgnkOxdleMTgetf9JsdncL8vLh7FVy/RN9i3XR5dnb9cRA== + +"@msgpackr-extract/msgpackr-extract-linux-arm@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-2.2.0.tgz#15f2c6fe9e0adc06c21af7e95f484ff4880d79ce" + integrity sha512-SaJ3Qq4lX9Syd2xEo9u3qPxi/OB+5JO/ngJKK97XDpa1C587H9EWYO6KD8995DAjSinWvdHKRrCOXVUC5fvGOg== + +"@msgpackr-extract/msgpackr-extract-linux-x64@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-2.2.0.tgz#30cae5c9a202f3e1fa1deb3191b18ffcb2f239a2" + integrity sha512-94y5PJrSOqUNcFKmOl7z319FelCLAE0rz/jPCWS+UtdMZvpa4jrQd+cJPQCLp2Fes1yAW/YUQj/Di6YVT3c3Iw== + +"@msgpackr-extract/msgpackr-extract-win32-x64@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-2.2.0.tgz#016d855b6bc459fd908095811f6826e45dd4ba64" + integrity sha512-XrC0JzsqQSvOyM3t04FMLO6z5gCuhPE6k4FXuLK5xf52ZbdvcFe1yBmo7meCew9B8G2f0T9iu9t3kfTYRYROgA== + "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": version "2.1.8-no-fsevents.3" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" @@ -6234,10 +6276,10 @@ resolved "https://registry.yarnpkg.com/@types/async/-/async-3.2.15.tgz#26d4768fdda0e466f18d6c9918ca28cc89a4e1fe" integrity sha512-PAmPfzvFA31mRoqZyTVsgJMsvbynR429UTTxhmfsUCrWGh3/fxOrzqBtaTPJsn4UtzTv4Vb0+/O7CARWb69N4g== -"@types/babel__core@*", "@types/babel__core@^7.1.14", "@types/babel__core@^7.1.19": - version "7.1.19" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" - integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== +"@types/babel__core@*", "@types/babel__core@^7.1.14", "@types/babel__core@^7.1.20": + version "7.1.20" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" + integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -7476,10 +7518,10 @@ resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-2.4.28.tgz#9ce8fa048c1e8c85cb71d7fe4d704e000226036f" integrity sha512-SMA+fUwULwK7sd/ZJicUztiPs8F1yCPwF3O23Z9uQ32ME5Ha0NmDK9+QTsYE4O2tHXChzXomSWWeIhCnoN1LqA== -"@types/selenium-webdriver@^4.1.6": - version "4.1.8" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.1.8.tgz#ec20feef480574c0c343b1ae179dc4f4b002155e" - integrity sha512-k5F++V1mGDxRVxVsZauiBwIMDR9rt1LSOa+nN/1ZghSDED2L6c7EWtzo9jnJDet73LVsOyW6CtCAmZBgMNnnuQ== +"@types/selenium-webdriver@^4.1.9": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.1.9.tgz#90b24668bf1ec0a049fbc7aeebd4f7ab672440fa" + integrity sha512-QNCYI3Rgjf3bZ2GZwXnUpOJUPR8p7+c9Um9MEKggLaUaF8UfjitH5aPCV1PF0DHVEiPYsXayGVS6+67DO3VILw== dependencies: "@types/ws" "*" @@ -10313,7 +10355,7 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^107.0.2: +chromedriver@^107.0.3: version "107.0.3" resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-107.0.3.tgz#330c0808bb14a53f13ab7e2b0c78adf3cdb4c14b" integrity sha512-jmzpZgctCRnhYAn0l/NIjP4vYN3L8GFVbterTrRr2Ly3W5rFMb9H8EKGuM5JCViPKSit8FbE718kZTEt3Yvffg== @@ -10983,10 +11025,10 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.9: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== -core-js@^3.0.4, core-js@^3.26.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: - version "3.26.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.0.tgz#a516db0ed0811be10eac5d94f3b8463d03faccfe" - integrity sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw== +core-js@^3.0.4, core-js@^3.26.1, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: + version "3.26.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.1.tgz#7a9816dabd9ee846c1c0fe0e8fcad68f3709134e" + integrity sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA== core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -12718,7 +12760,22 @@ elastic-apm-http-client@11.0.2, elastic-apm-http-client@^11.0.1: semver "^6.3.0" stream-chopper "^3.0.1" -elastic-apm-node@^3.38.0, elastic-apm-node@^3.40.0: +elastic-apm-http-client@11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/elastic-apm-http-client/-/elastic-apm-http-client-11.0.3.tgz#1d357af449d66695ef10019c21efe6377ad8815e" + integrity sha512-y+P9ByvfxjZbnLejgGaCAnwEe+FWMVshoMmjeLEEEVlQTLiFUHy7vhYyCQVqgbZzQ6zpaGPqPU2woKglKW4RHw== + dependencies: + agentkeepalive "^4.2.1" + breadth-filter "^2.0.0" + end-of-stream "^1.4.4" + fast-safe-stringify "^2.0.7" + fast-stream-to-buffer "^1.0.0" + object-filter-sequence "^1.0.0" + readable-stream "^3.4.0" + semver "^6.3.0" + stream-chopper "^3.0.1" + +elastic-apm-node@^3.38.0: version "3.40.0" resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.40.0.tgz#ed805ec817db7687ba9a77bcc0db6131e8cbc8cf" integrity sha512-gs9Z7boZW2o3ZMVbdjoJKXv4F2AcfMh52DW1WxEE/FSFa6lymj6GmCEFywuP8SqdpRZbh6yohJoGOpl7sheNJg== @@ -12756,6 +12813,44 @@ elastic-apm-node@^3.38.0, elastic-apm-node@^3.40.0: traverse "^0.6.6" unicode-byte-truncate "^1.0.0" +elastic-apm-node@^3.40.1: + version "3.40.1" + resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.40.1.tgz#ae3669d480fdacf62ace40d12a6f1a3c46b37940" + integrity sha512-vdyEZ7BPKJP2a1PkCsg350XXGZj03bwOiGrZdqgflocYxns5QwFbhvMKaVq7hWWWS8/sACesrLLELyQgdOpFsw== + dependencies: + "@elastic/ecs-pino-format" "^1.2.0" + "@opentelemetry/api" "^1.1.0" + after-all-results "^2.0.0" + async-cache "^1.1.0" + async-value-promise "^1.1.1" + basic-auth "^2.0.1" + cookie "^0.5.0" + core-util-is "^1.0.2" + elastic-apm-http-client "11.0.3" + end-of-stream "^1.4.4" + error-callsites "^2.0.4" + error-stack-parser "^2.0.6" + escape-string-regexp "^4.0.0" + fast-safe-stringify "^2.0.7" + http-headers "^3.0.2" + is-native "^1.0.1" + lru-cache "^6.0.0" + measured-reporting "^1.51.1" + monitor-event-loop-delay "^1.0.0" + object-filter-sequence "^1.0.0" + object-identity-map "^1.0.2" + original-url "^1.2.3" + pino "^6.11.2" + relative-microtime "^2.0.0" + require-in-the-middle "^5.2.0" + semver "^6.3.0" + set-cookie-serde "^1.0.0" + shallow-clone-shim "^2.0.0" + source-map "^0.8.0-beta.0" + sql-summary "^1.0.1" + traverse "^0.6.6" + unicode-byte-truncate "^1.0.0" + elasticsearch@^16.4.0: version "16.7.0" resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-16.7.0.tgz#9055e3f586934d8de5fd407b04050e9d54173333" @@ -18425,7 +18520,7 @@ listr@^0.14.1: p-map "^2.0.0" rxjs "^6.3.3" -lmdb-store@^1.6.11: +lmdb-store@^1: version "1.6.11" resolved "https://registry.yarnpkg.com/lmdb-store/-/lmdb-store-1.6.11.tgz#801da597af8c7a01c81f87d5cc7a7497e381236d" integrity sha512-hIvoGmHGsFhb2VRCmfhodA/837ULtJBwRHSHKIzhMB7WtPH6BRLPsvXp1MwD3avqGzuZfMyZDUp3tccLvr721Q== @@ -19781,20 +19876,26 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msgpackr-extract@^1.0.14: - version "1.0.14" - resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-1.0.14.tgz#87d3fe825d226e7f3d9fe136375091137f958561" - integrity sha512-t8neMf53jNZRF+f0H9VvEUVvtjGZ21odSBRmFfjZiyxr9lKYY0mpY3kSWZAIc7YWXtCZGOvDQVx2oqcgGiRBrw== +msgpackr-extract@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-2.2.0.tgz#4bb749b58d9764cfdc0d91c7977a007b08e8f262" + integrity sha512-0YcvWSv7ZOGl9Od6Y5iJ3XnPww8O7WLcpYMDwX+PAA/uXLDtyw94PJv9GLQV/nnp3cWlDhMoyKZIQLrx33sWog== dependencies: - nan "^2.14.2" - node-gyp-build "^4.2.3" + node-gyp-build-optional-packages "5.0.3" + optionalDependencies: + "@msgpackr-extract/msgpackr-extract-darwin-arm64" "2.2.0" + "@msgpackr-extract/msgpackr-extract-darwin-x64" "2.2.0" + "@msgpackr-extract/msgpackr-extract-linux-arm" "2.2.0" + "@msgpackr-extract/msgpackr-extract-linux-arm64" "2.2.0" + "@msgpackr-extract/msgpackr-extract-linux-x64" "2.2.0" + "@msgpackr-extract/msgpackr-extract-win32-x64" "2.2.0" msgpackr@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.4.7.tgz#d802ade841e7d2e873000b491cdda6574a3d5748" - integrity sha512-bhC8Ed1au3L3oHaR/fe4lk4w7PLGFcWQ5XY/Tk9N6tzDRz8YndjCG68TD8zcvYZoxNtw767eF/7VpaTpU9kf9w== + version "1.8.0" + resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.8.0.tgz#6cf213e88f04c5a358c61085a42a4dbe5542de44" + integrity sha512-1Cos3r86XACdjLVY4CN8r72Cgs5lUzxSON6yb81sNZP9vC9nnBrEbu1/ldBhuR9BKejtoYV5C9UhmYUvZFJSNQ== optionalDependencies: - msgpackr-extract "^1.0.14" + msgpackr-extract "^2.2.0" multicast-dns@^7.2.5: version "7.2.5" @@ -20670,9 +20771,9 @@ ora@^5.4.1: wcwidth "^1.0.1" ordered-binary@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ordered-binary/-/ordered-binary-1.0.0.tgz#4f7485186b12aa42b99011aeb7aa272991d6a487" - integrity sha512-0RMlzqix3YAOZKMoXv97OIvHlqJxnmIzihjShVkYNV3JuzHbqeBOOP7wpz6yo4af1ZFnOHGsh8RK77ZmaBY3Lg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/ordered-binary/-/ordered-binary-1.4.0.tgz#6bb53d44925f3b8afc33d1eed0fa15693b211389" + integrity sha512-EHQ/jk4/a9hLupIKxTfUsQRej1Yd/0QLQs3vGvIqg5ZtCYSzNhkzHoZc7Zf4e4kUlDaC3Uw8Q/1opOLNN2OKRQ== ordered-read-streams@^1.0.0: version "1.0.1" @@ -24067,10 +24168,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selenium-webdriver@^4.5.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.6.0.tgz#b4e27959e94618b398358b26efe2e64debb22dfd" - integrity sha512-HIH/+J+V7l/lbSRSOwyLcpjezg9CV4DLo1pBhP9aphuMlf/PJXEDwC/A/Ht2bFc1AqQppFBGvClYcuMzyO6tRw== +selenium-webdriver@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.6.1.tgz#ac66867206542a40c24b5a44f4ccbae992e962dc" + integrity sha512-FT8Dw0tbzaTp8YYLuwhaCnve/nw03HKrOJrA3aUmTKmxaIFSP4kT2R5fN3K0RpV5kbR0ZnM4FGVI2vANBvekaA== dependencies: jszip "^3.10.0" tmp "^0.2.1" @@ -27418,9 +27519,9 @@ wcwidth@^1.0.1: defaults "^1.0.3" weak-lru-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/weak-lru-cache/-/weak-lru-cache-1.0.0.tgz#f1394721169883488c554703704fbd91cda05ddf" - integrity sha512-135bPugHHIJLNx20guHgk4etZAbd7nou34NQfdKkJPgMuC3Oqn4cT6f7ORVvnud9oEyXJVJXPcTFsUvttGm5xg== + version "1.2.2" + resolved "https://registry.yarnpkg.com/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz#fdbb6741f36bae9540d12f480ce8254060dccd19" + integrity sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw== web-namespaces@^1.0.0: version "1.1.4"