From 94b1ec086b25c334744efb950971d55ada470aaf Mon Sep 17 00:00:00 2001 From: ruflin Date: Wed, 28 Mar 2018 15:41:59 +0200 Subject: [PATCH 1/4] Add Beta Ceph module to Kibana Home This is a first example on how to use the `isBeat` feature. --- .../tutorials/ceph_metrics/elastic_cloud.js | 69 ++++++++++++++++ .../server/tutorials/ceph_metrics/enable.js | 51 ++++++++++++ .../server/tutorials/ceph_metrics/index.js | 53 ++++++++++++ .../server/tutorials/ceph_metrics/on_prem.js | 68 ++++++++++++++++ .../ceph_metrics/on_prem_elastic_cloud.js | 80 +++++++++++++++++++ .../kibana/server/tutorials/register.js | 2 + 6 files changed, 323 insertions(+) create mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js create mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js create mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js create mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js create mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js new file mode 100644 index 0000000000000..42c06cadc268b --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js @@ -0,0 +1,69 @@ +/* + * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; +import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; +import { METRICBEAT_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_cloud_instructions'; +import { ENABLE_INSTRUCTIONS } from './enable'; + +export const ELASTIC_CLOUD_INSTRUCTIONS = { + instructionSets: [ + { + title: 'Getting Started', + instructionVariants: [ + { + id: INSTRUCTION_VARIANT.OSX, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.OSX, + METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.OSX, + ENABLE_INSTRUCTIONS.OSX, + METRICBEAT_INSTRUCTIONS.START.OSX + ] + }, + { + id: INSTRUCTION_VARIANT.DEB, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.DEB, + METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.DEB, + ENABLE_INSTRUCTIONS.DEB, + METRICBEAT_INSTRUCTIONS.START.DEB + ] + }, + { + id: INSTRUCTION_VARIANT.RPM, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.RPM, + METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.RPM, + ENABLE_INSTRUCTIONS.RPM, + METRICBEAT_INSTRUCTIONS.START.RPM + ] + }, + { + id: INSTRUCTION_VARIANT.WINDOWS, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, + METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.WINDOWS, + ENABLE_INSTRUCTIONS.WINDOWS, + METRICBEAT_INSTRUCTIONS.START.WINDOWS + ] + } + ] + } + ] +}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js new file mode 100644 index 0000000000000..f85a964bfcfee --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js @@ -0,0 +1,51 @@ +/* + * 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. + */ + +export const ENABLE_INSTRUCTIONS = { + OSX: { + title: 'Enable and configure the Ceph module', + textPre: 'From the installation directory, run:', + commands: [ + './metricbeat modules enable ceph', + ], + textPost: 'Modify the settings in the `modules.d/ceph.yml` file.' + }, + DEB: { + title: 'Enable and configure the Ceph module', + commands: [ + 'sudo metricbeat modules enable ceph', + ], + textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/ceph.yml` file.' + }, + RPM: { + title: 'Enable and configure the Ceph module', + commands: [ + 'sudo metricbeat modules enable ceph', + ], + textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/ceph.yml` file.' + }, + WINDOWS: { + title: 'Enable and configure the Ceph module', + textPre: 'From the `C:\\Program Files\\Metricbeat` folder, run:', + commands: [ + 'PS C:\\Program Files\\Metricbeat> metricbeat.exe modules enable ceph', + ], + textPost: 'Modify the settings in the `modules.d/ceph.yml` file.' + } +}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js new file mode 100644 index 0000000000000..f526c5d85f3eb --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js @@ -0,0 +1,53 @@ +/* + * 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 { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { ON_PREM_INSTRUCTIONS } from './on_prem'; +import { ELASTIC_CLOUD_INSTRUCTIONS } from './elastic_cloud'; +import { ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS } from './on_prem_elastic_cloud'; + +export function cephMetricsSpecProvider() { + return { + id: 'cephMetrics', + name: 'Ceph metrics', + isBeta: true, + category: TUTORIAL_CATEGORY.METRICS, + shortDescription: 'Fetch internal metrics from the Ceph server.', + longDescription: 'The `ceph` Metricbeat module fetches internal metrics from Ceph.' + + ' [Learn more]({config.docs.beats.metricbeat}/metricbeat-module-ceph.html).', + euiIconType: 'logoCeph', + artifacts: { + dashboards: [ + { + id: 'ewer-f1a5-11e7-a9ef-93c69af7b129', + linkLabel: 'Ceph metrics dashboard', + isOverview: true + } + ], + exportedFields: { + documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-ceph.html' + } + }, + completionTimeMinutes: 10, + //previewImagePath: '/plugins/kibana/home/tutorial_resources/elasticsearch_metrics/screenshot.png', + onPrem: ON_PREM_INSTRUCTIONS, + elasticCloud: ELASTIC_CLOUD_INSTRUCTIONS, + onPremElasticCloud: ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS + }; +} diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js new file mode 100644 index 0000000000000..f5ce30acf70ee --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js @@ -0,0 +1,68 @@ +/* + * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; +import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; +import { ENABLE_INSTRUCTIONS } from './enable'; + +export const ON_PREM_INSTRUCTIONS = { + instructionSets: [ + { + title: 'Getting Started', + instructionVariants: [ + { + id: INSTRUCTION_VARIANT.OSX, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.OSX, + METRICBEAT_INSTRUCTIONS.CONFIG.OSX, + ENABLE_INSTRUCTIONS.OSX, + METRICBEAT_INSTRUCTIONS.START.OSX + ] + }, + { + id: INSTRUCTION_VARIANT.DEB, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.DEB, + METRICBEAT_INSTRUCTIONS.CONFIG.DEB, + ENABLE_INSTRUCTIONS.DEB, + METRICBEAT_INSTRUCTIONS.START.DEB + ] + }, + { + id: INSTRUCTION_VARIANT.RPM, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.RPM, + METRICBEAT_INSTRUCTIONS.CONFIG.RPM, + ENABLE_INSTRUCTIONS.RPM, + METRICBEAT_INSTRUCTIONS.START.RPM + ] + }, + { + id: INSTRUCTION_VARIANT.WINDOWS, + instructions: [ + METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, + METRICBEAT_INSTRUCTIONS.CONFIG.WINDOWS, + ENABLE_INSTRUCTIONS.WINDOWS, + METRICBEAT_INSTRUCTIONS.START.WINDOWS + ] + } + ] + } + ] +}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js new file mode 100644 index 0000000000000..bebe32e76117b --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js @@ -0,0 +1,80 @@ +/* + * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; +import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; +import { + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2 +} from '../../../common/tutorials/onprem_cloud_instructions'; +import { ENABLE_INSTRUCTIONS } from './enable'; + +export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { + instructionSets: [ + { + title: 'Getting Started', + instructionVariants: [ + { + id: INSTRUCTION_VARIANT.OSX, + instructions: [ + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, + METRICBEAT_INSTRUCTIONS.INSTALL.OSX, + METRICBEAT_INSTRUCTIONS.CONFIG.OSX, + ENABLE_INSTRUCTIONS.OSX, + METRICBEAT_INSTRUCTIONS.START.OSX + ] + }, + { + id: INSTRUCTION_VARIANT.DEB, + instructions: [ + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, + METRICBEAT_INSTRUCTIONS.INSTALL.DEB, + METRICBEAT_INSTRUCTIONS.CONFIG.DEB, + ENABLE_INSTRUCTIONS.DEB, + METRICBEAT_INSTRUCTIONS.START.DEB + ] + }, + { + id: INSTRUCTION_VARIANT.RPM, + instructions: [ + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, + METRICBEAT_INSTRUCTIONS.INSTALL.RPM, + METRICBEAT_INSTRUCTIONS.CONFIG.RPM, + ENABLE_INSTRUCTIONS.RPM, + METRICBEAT_INSTRUCTIONS.START.RPM + ] + }, + { + id: INSTRUCTION_VARIANT.WINDOWS, + instructions: [ + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, + METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, + METRICBEAT_INSTRUCTIONS.CONFIG.WINDOWS, + ENABLE_INSTRUCTIONS.WINDOWS, + METRICBEAT_INSTRUCTIONS.START.WINDOWS + ] + } + ] + } + ] +}; diff --git a/src/core_plugins/kibana/server/tutorials/register.js b/src/core_plugins/kibana/server/tutorials/register.js index 7e675a0121127..94930f4c5f931 100644 --- a/src/core_plugins/kibana/server/tutorials/register.js +++ b/src/core_plugins/kibana/server/tutorials/register.js @@ -35,6 +35,7 @@ import { dockerMetricsSpecProvider } from './docker_metrics'; import { kubernetesMetricsSpecProvider } from './kubernetes_metrics'; import { netflowSpecProvider } from './netflow'; import { apmSpecProvider } from './apm'; +import { cephMetricsSpecProvider } from './ceph_metrics'; export function registerTutorials(server) { server.registerTutorial(systemLogsSpecProvider); @@ -55,4 +56,5 @@ export function registerTutorials(server) { server.registerTutorial(kubernetesMetricsSpecProvider); server.registerTutorial(netflowSpecProvider); server.registerTutorial(apmSpecProvider); + server.registerTutorial(cephMetricsSpecProvider); } From c3567bfdfd3807a06079f8d49bbd03a113fb4322 Mon Sep 17 00:00:00 2001 From: ruflin Date: Wed, 4 Jul 2018 15:43:58 +0200 Subject: [PATCH 2/4] apply review change --- src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js index f526c5d85f3eb..51ea21fa29753 100644 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js @@ -31,7 +31,6 @@ export function cephMetricsSpecProvider() { shortDescription: 'Fetch internal metrics from the Ceph server.', longDescription: 'The `ceph` Metricbeat module fetches internal metrics from Ceph.' + ' [Learn more]({config.docs.beats.metricbeat}/metricbeat-module-ceph.html).', - euiIconType: 'logoCeph', artifacts: { dashboards: [ { From 97b778c8eae9c6a13b94574845f9c48d9b6c27eb Mon Sep 17 00:00:00 2001 From: ruflin Date: Fri, 13 Jul 2018 14:30:20 +0200 Subject: [PATCH 3/4] rebase files to get changes in for loading check --- .../tutorials/ceph_metrics/elastic_cloud.js | 69 ---------------- .../server/tutorials/ceph_metrics/enable.js | 51 ------------ .../server/tutorials/ceph_metrics/index.js | 20 ++--- .../server/tutorials/ceph_metrics/on_prem.js | 68 ---------------- .../ceph_metrics/on_prem_elastic_cloud.js | 80 ------------------- 5 files changed, 6 insertions(+), 282 deletions(-) delete mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js delete mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js delete mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js delete mode 100644 src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js deleted file mode 100644 index 42c06cadc268b..0000000000000 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/elastic_cloud.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; -import { METRICBEAT_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_cloud_instructions'; -import { ENABLE_INSTRUCTIONS } from './enable'; - -export const ELASTIC_CLOUD_INSTRUCTIONS = { - instructionSets: [ - { - title: 'Getting Started', - instructionVariants: [ - { - id: INSTRUCTION_VARIANT.OSX, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.OSX, - METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.OSX, - ENABLE_INSTRUCTIONS.OSX, - METRICBEAT_INSTRUCTIONS.START.OSX - ] - }, - { - id: INSTRUCTION_VARIANT.DEB, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.DEB, - METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.DEB, - ENABLE_INSTRUCTIONS.DEB, - METRICBEAT_INSTRUCTIONS.START.DEB - ] - }, - { - id: INSTRUCTION_VARIANT.RPM, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.RPM, - METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.RPM, - ENABLE_INSTRUCTIONS.RPM, - METRICBEAT_INSTRUCTIONS.START.RPM - ] - }, - { - id: INSTRUCTION_VARIANT.WINDOWS, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, - METRICBEAT_CLOUD_INSTRUCTIONS.CONFIG.WINDOWS, - ENABLE_INSTRUCTIONS.WINDOWS, - METRICBEAT_INSTRUCTIONS.START.WINDOWS - ] - } - ] - } - ] -}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js deleted file mode 100644 index f85a964bfcfee..0000000000000 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/enable.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -export const ENABLE_INSTRUCTIONS = { - OSX: { - title: 'Enable and configure the Ceph module', - textPre: 'From the installation directory, run:', - commands: [ - './metricbeat modules enable ceph', - ], - textPost: 'Modify the settings in the `modules.d/ceph.yml` file.' - }, - DEB: { - title: 'Enable and configure the Ceph module', - commands: [ - 'sudo metricbeat modules enable ceph', - ], - textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/ceph.yml` file.' - }, - RPM: { - title: 'Enable and configure the Ceph module', - commands: [ - 'sudo metricbeat modules enable ceph', - ], - textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/ceph.yml` file.' - }, - WINDOWS: { - title: 'Enable and configure the Ceph module', - textPre: 'From the `C:\\Program Files\\Metricbeat` folder, run:', - commands: [ - 'PS C:\\Program Files\\Metricbeat> metricbeat.exe modules enable ceph', - ], - textPost: 'Modify the settings in the `modules.d/ceph.yml` file.' - } -}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js index 51ea21fa29753..0c64d5891e91c 100644 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js @@ -18,11 +18,10 @@ */ import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; -import { ON_PREM_INSTRUCTIONS } from './on_prem'; -import { ELASTIC_CLOUD_INSTRUCTIONS } from './elastic_cloud'; -import { ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS } from './on_prem_elastic_cloud'; +import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; export function cephMetricsSpecProvider() { + const moduleName = 'ceph'; return { id: 'cephMetrics', name: 'Ceph metrics', @@ -32,21 +31,14 @@ export function cephMetricsSpecProvider() { longDescription: 'The `ceph` Metricbeat module fetches internal metrics from Ceph.' + ' [Learn more]({config.docs.beats.metricbeat}/metricbeat-module-ceph.html).', artifacts: { - dashboards: [ - { - id: 'ewer-f1a5-11e7-a9ef-93c69af7b129', - linkLabel: 'Ceph metrics dashboard', - isOverview: true - } - ], + dashboards: [], exportedFields: { documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-ceph.html' } }, completionTimeMinutes: 10, - //previewImagePath: '/plugins/kibana/home/tutorial_resources/elasticsearch_metrics/screenshot.png', - onPrem: ON_PREM_INSTRUCTIONS, - elasticCloud: ELASTIC_CLOUD_INSTRUCTIONS, - onPremElasticCloud: ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS + onPrem: onPremInstructions(moduleName), + elasticCloud: cloudInstructions(moduleName), + onPremElasticCloud: onPremCloudInstructions(moduleName) }; } diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js deleted file mode 100644 index f5ce30acf70ee..0000000000000 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; -import { ENABLE_INSTRUCTIONS } from './enable'; - -export const ON_PREM_INSTRUCTIONS = { - instructionSets: [ - { - title: 'Getting Started', - instructionVariants: [ - { - id: INSTRUCTION_VARIANT.OSX, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.OSX, - METRICBEAT_INSTRUCTIONS.CONFIG.OSX, - ENABLE_INSTRUCTIONS.OSX, - METRICBEAT_INSTRUCTIONS.START.OSX - ] - }, - { - id: INSTRUCTION_VARIANT.DEB, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.DEB, - METRICBEAT_INSTRUCTIONS.CONFIG.DEB, - ENABLE_INSTRUCTIONS.DEB, - METRICBEAT_INSTRUCTIONS.START.DEB - ] - }, - { - id: INSTRUCTION_VARIANT.RPM, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.RPM, - METRICBEAT_INSTRUCTIONS.CONFIG.RPM, - ENABLE_INSTRUCTIONS.RPM, - METRICBEAT_INSTRUCTIONS.START.RPM - ] - }, - { - id: INSTRUCTION_VARIANT.WINDOWS, - instructions: [ - METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, - METRICBEAT_INSTRUCTIONS.CONFIG.WINDOWS, - ENABLE_INSTRUCTIONS.WINDOWS, - METRICBEAT_INSTRUCTIONS.START.WINDOWS - ] - } - ] - } - ] -}; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js deleted file mode 100644 index bebe32e76117b..0000000000000 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/on_prem_elastic_cloud.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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 { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { METRICBEAT_INSTRUCTIONS } from '../../../common/tutorials/metricbeat_instructions'; -import { - TRYCLOUD_OPTION1, - TRYCLOUD_OPTION2 -} from '../../../common/tutorials/onprem_cloud_instructions'; -import { ENABLE_INSTRUCTIONS } from './enable'; - -export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { - instructionSets: [ - { - title: 'Getting Started', - instructionVariants: [ - { - id: INSTRUCTION_VARIANT.OSX, - instructions: [ - TRYCLOUD_OPTION1, - TRYCLOUD_OPTION2, - METRICBEAT_INSTRUCTIONS.INSTALL.OSX, - METRICBEAT_INSTRUCTIONS.CONFIG.OSX, - ENABLE_INSTRUCTIONS.OSX, - METRICBEAT_INSTRUCTIONS.START.OSX - ] - }, - { - id: INSTRUCTION_VARIANT.DEB, - instructions: [ - TRYCLOUD_OPTION1, - TRYCLOUD_OPTION2, - METRICBEAT_INSTRUCTIONS.INSTALL.DEB, - METRICBEAT_INSTRUCTIONS.CONFIG.DEB, - ENABLE_INSTRUCTIONS.DEB, - METRICBEAT_INSTRUCTIONS.START.DEB - ] - }, - { - id: INSTRUCTION_VARIANT.RPM, - instructions: [ - TRYCLOUD_OPTION1, - TRYCLOUD_OPTION2, - METRICBEAT_INSTRUCTIONS.INSTALL.RPM, - METRICBEAT_INSTRUCTIONS.CONFIG.RPM, - ENABLE_INSTRUCTIONS.RPM, - METRICBEAT_INSTRUCTIONS.START.RPM - ] - }, - { - id: INSTRUCTION_VARIANT.WINDOWS, - instructions: [ - TRYCLOUD_OPTION1, - TRYCLOUD_OPTION2, - METRICBEAT_INSTRUCTIONS.INSTALL.WINDOWS, - METRICBEAT_INSTRUCTIONS.CONFIG.WINDOWS, - ENABLE_INSTRUCTIONS.WINDOWS, - METRICBEAT_INSTRUCTIONS.START.WINDOWS - ] - } - ] - } - ] -}; From f86b0787c09e415cb2aca548b928c51213feb59b Mon Sep 17 00:00:00 2001 From: ruflin Date: Fri, 13 Jul 2018 14:46:09 +0200 Subject: [PATCH 4/4] add path to discovery --- .../kibana/server/tutorials/ceph_metrics/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js index 0c64d5891e91c..233cd08586278 100644 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js @@ -31,6 +31,10 @@ export function cephMetricsSpecProvider() { longDescription: 'The `ceph` Metricbeat module fetches internal metrics from Ceph.' + ' [Learn more]({config.docs.beats.metricbeat}/metricbeat-module-ceph.html).', artifacts: { + application: { + label: 'Discover', + path: '/app/kibana#/discover' + }, dashboards: [], exportedFields: { documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-ceph.html'