diff --git a/src/core_plugins/kibana/common/tutorials/filebeat_onprem_cloud_instructions.js b/src/core_plugins/kibana/common/tutorials/filebeat_onprem_cloud_instructions.js index c9402022595862..f7d80c448e38c9 100644 --- a/src/core_plugins/kibana/common/tutorials/filebeat_onprem_cloud_instructions.js +++ b/src/core_plugins/kibana/common/tutorials/filebeat_onprem_cloud_instructions.js @@ -1,19 +1,4 @@ export const FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS = { - TRYCLOUD_OPTION1: { - title: 'Option 1: Try module in Elastic Cloud', - textPre: 'Go to [Elastic Cloud](https://cloud.elastic.co/). Register if you ' + - 'don\'t have an account.\n' + - ' * Select **Create Cluster**, leave size slider at 4 GB RAM, and click **Create**\n' + - ' * Wait for the cluster plan to complete.\n' + - ' * Go to the new Cloud Kibana instance and follow the Kibana Home instructions.' - - }, - TRYCLOUD_OPTION2: { - title: 'Option 2: Local Kibana connected to a Cloud instance', - textPre: 'If you are running this Kibana instance against a hosted Elasticsearch instance,' + - ' proceed with manual setup.\n' + - ' * In **Overview >> Endpoints** note **Elasticsearch** as ``' - }, CONFIG: { OSX: { title: 'Edit the configuration', diff --git a/src/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js b/src/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js new file mode 100644 index 00000000000000..f429e484de026c --- /dev/null +++ b/src/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js @@ -0,0 +1,16 @@ +export const TRYCLOUD_OPTION1 = { + title: 'Option 1: Try module in Elastic Cloud', + textPre: 'Go to [Elastic Cloud](https://cloud.elastic.co/). Register if you ' + + 'don\'t have an account.\n' + + ' * Select **Create Cluster**, leave size slider at 4 GB RAM, and click **Create**\n' + + ' * Wait for the cluster plan to complete.\n' + + ' * Go to the new Cloud Kibana instance and follow the Kibana Home instructions.' + +}; + +export const TRYCLOUD_OPTION2 = { + title: 'Option 2: Local Kibana connected to a Cloud instance', + textPre: 'If you are running this Kibana instance against a hosted Elasticsearch instance,' + + ' proceed with manual setup.\n' + + ' * In **Overview >> Endpoints** note **Elasticsearch** as ``' +}; diff --git a/src/core_plugins/kibana/server/tutorials/apache_logs/on_prem_elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/apache_logs/on_prem_elastic_cloud.js index 7a9a65dbe462d5..4b06002a996f0a 100644 --- a/src/core_plugins/kibana/server/tutorials/apache_logs/on_prem_elastic_cloud.js +++ b/src/core_plugins/kibana/server/tutorials/apache_logs/on_prem_elastic_cloud.js @@ -2,6 +2,10 @@ import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_varia import { FILEBEAT_INSTRUCTIONS } from '../../../common/tutorials/filebeat_instructions'; import { FILEBEAT_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/filebeat_cloud_instructions'; import { FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/filebeat_onprem_cloud_instructions'; +import { + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2 +} from '../../../common/tutorials/onprem_cloud_instructions'; export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { instructionSets: [ @@ -11,8 +15,8 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { { id: INSTRUCTION_VARIANT.OSX, instructions: [ - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1, - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2, + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.OSX, FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.CONFIG.OSX, { @@ -29,8 +33,8 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { { id: INSTRUCTION_VARIANT.DEB, instructions: [ - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1, - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2, + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.DEB, FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.CONFIG.DEB, { @@ -46,8 +50,8 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { { id: INSTRUCTION_VARIANT.RPM, instructions: [ - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1, - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2, + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.RPM, FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.CONFIG.RPM, { @@ -63,8 +67,8 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { { id: INSTRUCTION_VARIANT.WINDOWS, instructions: [ - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1, - FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2, + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.WINDOWS, FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.CONFIG.WINDOWS, { diff --git a/src/core_plugins/kibana/server/tutorials/netflow/common_instructions.js b/src/core_plugins/kibana/server/tutorials/netflow/common_instructions.js new file mode 100644 index 00000000000000..a4ed13ebfb5e16 --- /dev/null +++ b/src/core_plugins/kibana/server/tutorials/netflow/common_instructions.js @@ -0,0 +1,32 @@ +export const COMMON_NETFLOW_INSTRUCTIONS = { + CONFIG: { + OSX: [ + { + title: 'Edit the configuration', + textPre: 'While in the Logstash install directory, modify `config/logstash.yml` to set the' + + ' configuration parameters for the Netflow module:', + commands: [ + 'modules:', + ' - name: netflow', + ' var.input.udp.port: ', + ' var.elasticsearch.hosts: [ "" ]', + ' var.kibana.host: ":"' + ] + } + ] + }, + SETUP: { + OSX: [ + { + title: 'Set up and run the Netflow module', + textPre: 'In the Logstash install directory, run the following command to set up the Netflow module.', + commands: [ + './bin/logstash --modules netflow --setup', + ], + textPost: 'The `--setup` option creates a `netflow-*` index pattern in Elasticsearch and imports' + + ' Kibana dashboards and visualizations. Omit this option for subsequent runs of the module to avoid' + + ' overwriting existing Kibana dashboards.' + } + ] + } +}; diff --git a/src/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js index 058a16196e3945..cd1923e8bfcaef 100644 --- a/src/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js +++ b/src/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js @@ -1,5 +1,6 @@ import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; +// TODO: compare with onPremElasticCloud and onPrem scenarios and extract out common bits export const ELASTIC_CLOUD_INSTRUCTIONS = { instructionSets: [ { diff --git a/src/core_plugins/kibana/server/tutorials/netflow/on_prem.js b/src/core_plugins/kibana/server/tutorials/netflow/on_prem.js index 536c55bf5cef8d..f5a9ae2a7466cb 100644 --- a/src/core_plugins/kibana/server/tutorials/netflow/on_prem.js +++ b/src/core_plugins/kibana/server/tutorials/netflow/on_prem.js @@ -1,16 +1,9 @@ -import { PARAM_TYPES } from '../../../common/tutorials/param_types'; import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; import { LOGSTASH_INSTRUCTIONS } from '../../../common/tutorials/logstash_instructions'; +import { COMMON_NETFLOW_INSTRUCTIONS } from './common_instructions'; +// TODO: compare with onPremElasticCloud and elasticCloud scenarios and extract out common bits export const ON_PREM_INSTRUCTIONS = { - params: [ - { - id: 'netflow_var_input_udp_port', - label: 'netflow.var.input.udp.port', - type: PARAM_TYPES.NUMBER, - defaultValue: 2055 - } - ], instructionSets: [ { title: 'Getting Started', @@ -19,16 +12,8 @@ export const ON_PREM_INSTRUCTIONS = { id: INSTRUCTION_VARIANT.OSX, instructions: [ ...LOGSTASH_INSTRUCTIONS.INSTALL.OSX, - { - title: 'Set up and run the Netflow module', - textPre: 'In the Logstash install directory, run the following command to set up the Netflow module.', - commands: [ - './bin/logstash --modules netflow -M netflow.var.input.udp.port={params.netflow_var_input_udp_port} --setup', - ], - textPost: 'The `--setup` option creates a `netflow-*` index pattern in Elasticsearch and imports' + - ' Kibana dashboards and visualizations. Omit this option for subsequent runs of the module to avoid' + - ' overwriting existing Kibana dashboards.' - } + ...COMMON_NETFLOW_INSTRUCTIONS.CONFIG.OSX, + ...COMMON_NETFLOW_INSTRUCTIONS.SETUP.OSX ] } ] diff --git a/src/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js b/src/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js index e01007c3686061..167eac24a25e2d 100644 --- a/src/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js +++ b/src/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js @@ -1,5 +1,12 @@ import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; +import { LOGSTASH_INSTRUCTIONS } from '../../../common/tutorials/logstash_instructions'; +import { + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2 +} from '../../../common/tutorials/onprem_cloud_instructions'; +import { COMMON_NETFLOW_INSTRUCTIONS } from './common_instructions'; +// TODO: compare with onPrem and elasticCloud scenarios and extract out common bits export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { instructionSets: [ { @@ -8,9 +15,11 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = { { id: INSTRUCTION_VARIANT.OSX, instructions: [ - { - title: 'onPremElasticCloud instructions - TBD', - } + TRYCLOUD_OPTION1, + TRYCLOUD_OPTION2, + ...LOGSTASH_INSTRUCTIONS.INSTALL.OSX, + ...COMMON_NETFLOW_INSTRUCTIONS.CONFIG.OSX, + ...COMMON_NETFLOW_INSTRUCTIONS.SETUP.OSX ] } ]