From 8f9d1d268340b4e481eb6ea295a9f156b8b724c9 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Tue, 26 Mar 2019 12:45:34 +0200 Subject: [PATCH] Add Data UI for CoreDNS Metricbeat Module Signed-off-by: Chris Mark --- .../server/tutorials/coredns_metrics/index.js | 61 +++++++++++++++++++ .../kibana/server/tutorials/register.js | 2 + 2 files changed, 63 insertions(+) create mode 100644 src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js diff --git a/src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js b/src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js new file mode 100644 index 0000000000000..2d0f450688e02 --- /dev/null +++ b/src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js @@ -0,0 +1,61 @@ +/* + * 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 corednsMetricsSpecProvider(server, context) { + const moduleName = 'coredns'; + return { + id: 'corednsMetrics', + name: i18n.translate('kbn.server.tutorials.corednsMetrics.nameTitle', { + defaultMessage: 'CoreDNS metrics', + }), + category: TUTORIAL_CATEGORY.METRICS, + shortDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.shortDescription', { + defaultMessage: 'Fetch monitoring metrics from the CoreDNS server.', + }), + longDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.longDescription', { + defaultMessage: 'The `coredns` Metricbeat module fetches monitoring metrics from CoreDNS. \ +[Learn more]({learnMoreLink}).', + values: { + learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-coredns.html', + }, + }), + // euiIconType: 'logoCoreDNS', + artifacts: { + application: { + label: i18n.translate('kbn.server.tutorials.corednsMetrics.artifacts.application.label', { + defaultMessage: 'Discover', + }), + path: '/app/kibana#/discover' + }, + dashboards: [], + exportedFields: { + documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-coredns.html' + } + }, + completionTimeMinutes: 10, + // previewImagePath: '/plugins/kibana/home/tutorial_resources/coredns_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 1f0b39fef0e59..a0db02e34498b 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/register.js +++ b/src/legacy/core_plugins/kibana/server/tutorials/register.js @@ -68,6 +68,7 @@ import { mssqlMetricsSpecProvider } from './mssql_metrics'; import { natsMetricsSpecProvider } from './nats_metrics'; import { natsLogsSpecProvider } from './nats_logs'; import { zeekLogsSpecProvider } from './zeek_logs'; +import { corednsMetricsSpecProvider } from './coredns_metrics'; export function registerTutorials(server) { server.registerTutorial(systemLogsSpecProvider); @@ -121,4 +122,5 @@ export function registerTutorials(server) { server.registerTutorial(natsMetricsSpecProvider); server.registerTutorial(natsLogsSpecProvider); server.registerTutorial(zeekLogsSpecProvider); + server.registerTutorial(corednsMetricsSpecProvider); }