From 3c50551392ef6a310ab9a609513a5abb8b4f1706 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Tue, 7 Jan 2020 15:03:38 +0200 Subject: [PATCH] Add data ui for envoyproxy Metricbeat Module (#53476) --- .../tutorial_resources/logos/envoyproxy.svg | 1 + .../tutorials/envoyproxy_metrics/index.js | 60 +++++++++++++++++++ .../kibana/server/tutorials/register.js | 2 + 3 files changed, 63 insertions(+) create mode 100644 src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg create mode 100644 src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg new file mode 100644 index 0000000000000..45c995b19603b --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js b/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js new file mode 100644 index 0000000000000..4e5301149b35b --- /dev/null +++ b/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js @@ -0,0 +1,60 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { + onPremInstructions, + cloudInstructions, + onPremCloudInstructions, +} from '../../../common/tutorials/metricbeat_instructions'; + +export function envoyproxyMetricsSpecProvider(server, context) { + const moduleName = 'envoyproxy'; + return { + id: 'envoyproxyMetrics', + name: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.nameTitle', { + defaultMessage: 'Envoy Proxy metrics', + }), + category: TUTORIAL_CATEGORY.METRICS, + shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.shortDescription', { + defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.', + }), + longDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.longDescription', { + defaultMessage: + 'The `envoyproxy` Metricbeat module fetches monitoring metrics from Envoy Proxy. \ +[Learn more]({learnMoreLink}).', + values: { + learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-envoyproxy.html', + }, + }), + euiIconType: '/plugins/kibana/home/tutorial_resources/logos/envoyproxy.svg', + artifacts: { + dashboards: [], + exportedFields: { + documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-envoyproxy.html', + }, + }, + completionTimeMinutes: 10, + // previewImagePath: '/plugins/kibana/home/tutorial_resources/envoyproxy_metrics/screenshot.png', + onPrem: onPremInstructions(moduleName, null, null, null, context), + elasticCloud: cloudInstructions(moduleName), + onPremElasticCloud: onPremCloudInstructions(moduleName), + }; +} diff --git a/src/legacy/core_plugins/kibana/server/tutorials/register.js b/src/legacy/core_plugins/kibana/server/tutorials/register.js index eb06c97629b17..ecc2d1df8c388 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/register.js +++ b/src/legacy/core_plugins/kibana/server/tutorials/register.js @@ -83,6 +83,7 @@ import { awsLogsSpecProvider } from './aws_logs'; import { activemqLogsSpecProvider } from './activemq_logs'; import { activemqMetricsSpecProvider } from './activemq_metrics'; import { azureMetricsSpecProvider } from './azure_metrics'; +import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics'; export function registerTutorials(server) { server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemLogsSpecProvider); @@ -154,4 +155,5 @@ export function registerTutorials(server) { server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqLogsSpecProvider); server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqMetricsSpecProvider); server.newPlatform.setup.plugins.home.tutorials.registerTutorial(azureMetricsSpecProvider); + server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyMetricsSpecProvider); }