Skip to content

Commit

Permalink
Multiply edits to the Beats tutorials (#21)
Browse files Browse the repository at this point in the history
* Updated Nginx module

* Updated MySQL logs module

* Updated system logs module

* Correct the on_prem_cloud enable steps

* Updated the Nginx metrics tutorial and added screenshot

* Updated the Apache metrics module + screenshot

* Updated the MySQL metrics module + screenshot

* Updated the system metrics module + screenshot
  • Loading branch information
tsg authored and nreese committed Jan 8, 2018
1 parent 873995e commit ef358a2
Show file tree
Hide file tree
Showing 47 changed files with 1,096 additions and 426 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const METRICBEAT_CLOUD_INSTRUCTIONS = {
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Filebeat\\metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
}
}
};
112 changes: 81 additions & 31 deletions src/core_plugins/kibana/common/tutorials/metricbeat_instructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,37 @@ export const METRICBEAT_INSTRUCTIONS = {
INSTALL: {
OSX: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' First time using Metricbeat? See the [Getting Started Guide]' +
textPre: 'First time using Metricbeat? See the [Getting Started Guide]' +
'({config.docs.beats.metricbeat}/metricbeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'tar xzvf metricbeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'cd metricbeat-{config.kibana.version}-darwin-x86_64/',
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`metricbeat.yml` file to point to your Elasticsearch installation.'
]
},
DEB: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' First time using Metricbeat? See the [Getting Started Guide]' +
textPre: 'First time using Metricbeat? See the [Getting Started Guide]' +
'({config.docs.beats.metricbeat}/metricbeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i metricbeat-{config.kibana.version}-amd64.deb'
],
textPost: 'Edit the `/etc/metricbeat/metricbeat.yml` file and ' +
'adjust the `output.elasticsearch` settings if needed.'
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/metricbeat).'
},
RPM: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' First time using Metricbeat? See the [Getting Started Guide]' +
textPre: 'First time using Metricbeat? See the [Getting Started Guide]' +
'({config.docs.beats.metricbeat}/metricbeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi metricbeat-{config.kibana.version}-x86_64.rpm'
],
textPost: 'Edit the `/etc/metricbeat/metricbeat.yml` file and ' +
'adjust the `output.elasticsearch` settings if needed.'
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/metricbeat).'
},
WINDOWS: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' First time using Metricbeat? See the [Getting Started Guide]' +
textPre: 'First time using Metricbeat? See the [Getting Started Guide]' +
'({config.docs.beats.metricbeat}/metricbeat-getting-started.html).\n' +
'1. Download the Metricbeat Windows zip file from the [downloads](https://www.elastic.co/downloads/beats/metricbeat) page.\n' +
'2. Extract the contents of the zip file into `C:\\Program Files`.\n' +
Expand All @@ -52,46 +44,104 @@ export const METRICBEAT_INSTRUCTIONS = {
'PS > cd C:\\Program Files\\Metricbeat',
'PS C:\\Program Files\\Metricbeat> .\\install-service-metricbeat.ps1'
],
textPost: 'Edit the `C:\\Program Files\\Metricbeat\\metricbeat.yml` file and ' +
'adjust the `output.elasticsearch` settings if needed.'
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`C:\\Program Files\\Metricbeat\\metricbeat.yml` file to point to your Elasticsearch installation.'
}
},
START: {
OSX: {
title: 'Start Metricbeat',
textPre: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.',
commands: [
'./metricbeat setup -e',
'./metricbeat setup',
'./metricbeat -e',
],
textPost: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.'
]
},
DEB: {
title: 'Start Metricbeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo metricbeat setup -e',
'sudo metricbeat setup',
'sudo service metricbeat start',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already installed, ' +
'omit this command.'
]
},
RPM: {
title: 'Start Metricbeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo metricbeat setup -e',
'sudo metricbeat setup',
'sudo service metricbeat start',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already installed, ' +
'omit this command.'
},
WINDOWS: {
title: 'Start Metricbeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'PS C:\\Program Files\\Metricbeat> metricbeat.exe setup -e',
'PS C:\\Program Files\\Metricbeat> metricbeat.exe setup',
'PS C:\\Program Files\\Metricbeat> Service-Start metricbeat',
]
}
},
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `metricbeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Metricbeat\\metricbeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already installed, ' +
'omit this command.'
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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' +
' * 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',
title: 'Option 2: Connect local Kibana 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 `<es_url>`'
' proceed with manual setup.\n\n' +
'In **Overview >> Endpoints** note **Elasticsearch** as `<es_url>`.'
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export function apacheLogsSpecProvider() {
previewImagePath: '/plugins/kibana/home/tutorial_resources/apache_logs/screenshot.png',
onPrem: ON_PREM_INSTRUCTIONS,
elasticCloud: ELASTIC_CLOUD_INSTRUCTIONS,
onPremElasticCloud: ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS,
onPremElasticCloud: ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
TRYCLOUD_OPTION1,
TRYCLOUD_OPTION2
} from '../../../common/tutorials/onprem_cloud_instructions';
import { ENABLE_INSTRUCTIONS } from './enable';

export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
instructionSets: [
Expand All @@ -17,14 +18,7 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
TRYCLOUD_OPTION2,
FILEBEAT_INSTRUCTIONS.INSTALL.OSX,
FILEBEAT_INSTRUCTIONS.CONFIG.OSX,
{
title: 'Enable and configure the apache2 module',
textPre: 'From the installation directory, run:',
commands: [
'./filebeat modules enable apache2',
],
textPost: 'Modify the settings in the `modules.d/apache2.yml` file.'
},
ENABLE_INSTRUCTIONS.OSX,
FILEBEAT_INSTRUCTIONS.START.OSX
]
},
Expand All @@ -35,13 +29,7 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
TRYCLOUD_OPTION2,
FILEBEAT_INSTRUCTIONS.INSTALL.DEB,
FILEBEAT_INSTRUCTIONS.CONFIG.DEB,
{
title: 'Enable and configure the apache2 module',
commands: [
'sudo filebeat modules enable apache2',
],
textPost: 'Modify the settings in the `/etc/filebeat/modules.d/apache2.yml` file.'
},
ENABLE_INSTRUCTIONS.DEB,
FILEBEAT_INSTRUCTIONS.START.DEB
]
},
Expand All @@ -52,13 +40,7 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
TRYCLOUD_OPTION2,
FILEBEAT_INSTRUCTIONS.INSTALL.RPM,
FILEBEAT_INSTRUCTIONS.CONFIG.RPM,
{
title: 'Enable and configure the apache2 module',
commands: [
'sudo filebeat modules enable apache2',
],
textPost: 'Modify the settings in the `/etc/filebeat/modules.d/apache2.yml` file.'
},
ENABLE_INSTRUCTIONS.RPM,
FILEBEAT_INSTRUCTIONS.START.RPM
]
},
Expand All @@ -69,14 +51,7 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
TRYCLOUD_OPTION2,
FILEBEAT_INSTRUCTIONS.INSTALL.WINDOWS,
FILEBEAT_INSTRUCTIONS.CONFIG.WINDOWS,
{
title: 'Enable and configure the apache2 module',
textPre: 'From the `C:\\Program Files\\Filebeat` folder, run:',
commands: [
'PS C:\\Program Files\\Filebeat> filebeat.exe modules enable apache2',
],
textPost: 'Modify the settings in the `modules.d/apache2.yml` file.'
},
ENABLE_INSTRUCTIONS.WINDOWS,
FILEBEAT_INSTRUCTIONS.START.WINDOWS
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
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: [
Expand All @@ -8,9 +11,37 @@ export const ELASTIC_CLOUD_INSTRUCTIONS = {
{
id: INSTRUCTION_VARIANT.OSX,
instructions: [
{
title: 'elastiCloud instructions - TBD',
}
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
]
}
]
Expand Down
32 changes: 32 additions & 0 deletions src/core_plugins/kibana/server/tutorials/apache_metrics/enable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export const ENABLE_INSTRUCTIONS = {
OSX: {
title: 'Enable and configure the apache module',
textPre: 'From the installation directory, run:',
commands: [
'./metricbeat modules enable apache',
],
textPost: 'Modify the settings in the `modules.d/apache.yml` file.'
},
DEB: {
title: 'Enable and configure the apache module',
commands: [
'sudo metricbeat modules enable apache',
],
textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/apache.yml` file.'
},
RPM: {
title: 'Enable and configure the apache module',
commands: [
'sudo metricbeat modules enable apache',
],
textPost: 'Modify the settings in the `/etc/metricbeat/modules.d/apache.yml` file.'
},
WINDOWS: {
title: 'Enable and configure the apache module',
textPre: 'From the `C:\\Program Files\\Metricbeat` folder, run:',
commands: [
'PS C:\\Program Files\\Metricbeat> metricbeat.exe modules enable apache',
],
textPost: 'Modify the settings in the `modules.d/apache.yml` file.'
}
};
Loading

0 comments on commit ef358a2

Please sign in to comment.