Skip to content

Commit

Permalink
More tutorial edits (#20)
Browse files Browse the repository at this point in the history
* More tutorial edits

This updates the on prem instructions with a step that installs the GeoIP and
UA plugins in ES. It also makes the on-prem steps more consistent with the cloud
instructions which results in less redundancy in the code.

* Show config step for all variants

* More DRY in the tutorial content

* Updated screenshot for apache_logs
  • Loading branch information
tsg authored and nreese committed Jan 3, 2018
1 parent cd5de67 commit 2ae4ecc
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 215 deletions.
Original file line number Diff line number Diff line change
@@ -1,55 +1,4 @@
export const FILEBEAT_CLOUD_INSTRUCTIONS = {
INSTALL: {
OSX: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'tar xzvf filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'cd filebeat-{config.kibana.version}-darwin-x86_64/',
]
},
DEB: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i filebeat-{config.kibana.version}-amd64.deb'
],
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
RPM: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi filebeat-{config.kibana.version}-x86_64.rpm'
],
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
WINDOWS: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).\n' +
'1. Download the Filebeat Windows zip file from the [downloads](https://www.elastic.co/downloads/beats/filebeat) page.\n' +
'2. Extract the contents of the zip file into `C:\\Program Files`.\n' +
'3. Rename the `filebeat-{config.kibana.version}-windows` directory to `Filebeat`.\n' +
'4. Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select' +
' Run As Administrator). If you are running Windows XP, you may need to download and install PowerShell.\n' +
'5. From the PowerShell prompt, run the following commands to install Filebeat as a Windows service.',
commands: [
'PS > cd C:\\Program Files\\Filebeat',
'PS C:\\Program Files\\Filebeat> .\\install-service-filebeat.ps1'
]
}
},
CONFIG: {
OSX: {
title: 'Edit the configuration',
Expand Down
129 changes: 98 additions & 31 deletions src/core_plugins/kibana/common/tutorials/filebeat_instructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,37 @@ export const FILEBEAT_INSTRUCTIONS = {
INSTALL: {
OSX: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'tar xzvf filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'cd filebeat-{config.kibana.version}-darwin-x86_64/',
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`filebeat.yml` file to point to your Elasticsearch installation.'
]
},
DEB: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i filebeat-{config.kibana.version}-amd64.deb'
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`/etc/filebeat/filebeat.yml` file to point to your Elasticsearch installation.\n\n' +
'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
RPM: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi filebeat-{config.kibana.version}-x86_64.rpm'
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`/etc/filebeat/filebeat.yml` file to point to your Elasticsearch installation.\n\n' +
'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
WINDOWS: {
title: 'Download and install Filebeat',
textPre: 'Skip this step if Filebeat is already installed.' +
' First time using Filebeat? See the [Getting Started Guide]' +
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).\n' +
'1. Download the Filebeat Windows zip file from the [downloads](https://www.elastic.co/downloads/beats/filebeat) page.\n' +
'2. Extract the contents of the zip file into `C:\\Program Files`.\n' +
Expand All @@ -61,39 +51,116 @@ export const FILEBEAT_INSTRUCTIONS = {
START: {
OSX: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.',
commands: [
'./filebeat setup -e',
'./filebeat setup',
'./filebeat -e',
],
textPost: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.'
]
},
DEB: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo filebeat setup -e',
'sudo filebeat setup',
'sudo service filebeat start',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.'
]
},
RPM: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo filebeat setup -e',
'sudo filebeat setup',
'sudo service filebeat start',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.'
},
WINDOWS: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'PS C:\\Program Files\\Filebeat> filebeat.exe setup -e',
'PS C:\\Program Files\\Filebeat> filebeat.exe setup',
'PS C:\\Program Files\\Filebeat> Service-Start filebeat',
]
}
},
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `filebeat.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/filebeat/filebeat.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 set up, ' +
'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.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.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\\Filebeat\\filebeat.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.'
}
},
PLUGINS: {
GEOIP_AND_UA: {
title: 'Install Elasticsearch GeoIP and user agent plugins',
textPre: 'This module requires two Elasticsearch plugins that are not ' +
'installed by default.\n\nFrom the Elasticsearch installation folder, run:',
commands: [
'bin/elasticsearch-plugin install ingest-geoip',
'bin/elasticsearch-plugin install ingest-user-agent'
]
},
GEOIP: {
title: 'Install Elasticsearch GeoIP plugin',
textPre: 'This module requires an Elasticsearch plugin that is not ' +
'installed by default.\n\nFrom the Elasticsearch installation folder, run:',
commands: [
'bin/elasticsearch-plugin install ingest-geoip'
]
}
}
};
Original file line number Diff line number Diff line change
@@ -1,56 +1,2 @@
export const FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS = {
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `filebeat.yml` to set the connection information:',
commands: [
'setup.kibana:',
' host: "<<kibana-host>>:5601"',
'output.elasticsearch:',
' hosts: ["<es_url>:9200"]',
' username: "elastic"',
' password: "<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information:',
commands: [
'setup.kibana:',
' host: "<<kibana-host>>:5601"',
'output.elasticsearch:',
' hosts: ["<es_url>:9200"]',
' username: "elastic"',
' password: "<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information:',
commands: [
'setup.kibana:',
' host: "<<kibana-host>>:5601"',
'output.elasticsearch:',
' hosts: ["<es_url>:9200"]',
' username: "elastic"',
' password: "<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Filebeat\\filebeat.yml` to set the connection information:',
commands: [
'setup.kibana:',
' host: "<<kibana-host>>:5601"',
'output.elasticsearch:',
' hosts: ["<es_url>:9200"]',
' username: "elastic"',
' password: "<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
}
}
};
Binary file not shown.
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
@@ -1,6 +1,7 @@
import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant';
import { FILEBEAT_INSTRUCTIONS } from '../../../common/tutorials/filebeat_instructions';
import { FILEBEAT_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/filebeat_cloud_instructions';
import { ENABLE_INSTRUCTIONS } from './enable';

export const ELASTIC_CLOUD_INSTRUCTIONS = {
instructionSets: [
Expand All @@ -10,62 +11,36 @@ export const ELASTIC_CLOUD_INSTRUCTIONS = {
{
id: INSTRUCTION_VARIANT.OSX,
instructions: [
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.OSX,
FILEBEAT_INSTRUCTIONS.INSTALL.OSX,
FILEBEAT_CLOUD_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
]
},
{
id: INSTRUCTION_VARIANT.DEB,
instructions: [
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.DEB,
FILEBEAT_INSTRUCTIONS.INSTALL.DEB,
FILEBEAT_CLOUD_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
]
},
{
id: INSTRUCTION_VARIANT.RPM,
instructions: [
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.RPM,
FILEBEAT_INSTRUCTIONS.INSTALL.RPM,
FILEBEAT_CLOUD_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
]
},
{
id: INSTRUCTION_VARIANT.WINDOWS,
instructions: [
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.WINDOWS,
FILEBEAT_INSTRUCTIONS.INSTALL.WINDOWS,
FILEBEAT_CLOUD_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
Loading

0 comments on commit 2ae4ecc

Please sign in to comment.