Skip to content

Commit

Permalink
Add cloud version of the apache_logs tutorial (#16)
Browse files Browse the repository at this point in the history
* Add cloud version of the apache_logs tutorial

* Added onprem-cloud version as well
  • Loading branch information
tsg authored and nreese committed Dec 19, 2017
1 parent d044377 commit 6b06935
Show file tree
Hide file tree
Showing 6 changed files with 298 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
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',
textPre: 'Modify `filebeat.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/filebeat/filebeat.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/filebeat/filebeat.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\\filebeat.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.'
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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 `<es_url>`'
},
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.'
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const METRICBEAT_INSTRUCTIONS = {
title: 'Start Metricbeat',
commands: [
'./metricbeat setup -e',
'./metricbeat -e --setup',
'./metricbeat -e',
],
textPost: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
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';

export const ELASTIC_CLOUD_INSTRUCTIONS = {
instructionSets: [
Expand All @@ -8,9 +10,63 @@ export const ELASTIC_CLOUD_INSTRUCTIONS = {
{
id: INSTRUCTION_VARIANT.OSX,
instructions: [
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.OSX,
FILEBEAT_CLOUD_INSTRUCTIONS.CONFIG.OSX,
{
title: 'elastiCloud instructions - TBD',
}
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.'
},
FILEBEAT_INSTRUCTIONS.START.OSX
]
},
{
id: INSTRUCTION_VARIANT.DEB,
instructions: [
FILEBEAT_CLOUD_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.'
},
FILEBEAT_INSTRUCTIONS.START.DEB
]
},
{
id: INSTRUCTION_VARIANT.RPM,
instructions: [
FILEBEAT_CLOUD_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.'
},
FILEBEAT_INSTRUCTIONS.START.RPM
]
},
{
id: INSTRUCTION_VARIANT.WINDOWS,
instructions: [
FILEBEAT_CLOUD_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.'
},
FILEBEAT_INSTRUCTIONS.START.WINDOWS
]
}
]
Expand Down
11 changes: 10 additions & 1 deletion src/core_plugins/kibana/server/tutorials/apache_logs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,19 @@ export function apacheLogsSpecProvider() {
' [Learn more]({config.docs.beats.filebeat}/filebeat-module-apache2.html)' +
' about the apache2 module.',
//iconPath: '', TODO
/*artifacts: {
dashboards: [
{
id: 'Filebeat-Apache2-Dashboard',
linkLabel: 'Apache2 logs dashboard',
isOverview: true
}
]
},*/
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/apacheLogs/kibana-apache2.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
@@ -1,4 +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 { FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS } from '../../../common/tutorials/filebeat_onprem_cloud_instructions';

export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
instructionSets: [
Expand All @@ -8,9 +11,71 @@ export const ON_PREM_ELASTIC_CLOUD_INSTRUCTIONS = {
{
id: INSTRUCTION_VARIANT.OSX,
instructions: [
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1,
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2,
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.OSX,
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.CONFIG.OSX,
{
title: 'onPremElasticCloud instructions - TBD',
}
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.'
},
FILEBEAT_INSTRUCTIONS.START.OSX
]
},
{
id: INSTRUCTION_VARIANT.DEB,
instructions: [
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1,
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2,
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.DEB,
FILEBEAT_ONPREM_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.'
},
FILEBEAT_INSTRUCTIONS.START.DEB
]
},
{
id: INSTRUCTION_VARIANT.RPM,
instructions: [
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1,
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2,
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.RPM,
FILEBEAT_ONPREM_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.'
},
FILEBEAT_INSTRUCTIONS.START.RPM
]
},
{
id: INSTRUCTION_VARIANT.WINDOWS,
instructions: [
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION1,
FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS.TRYCLOUD_OPTION2,
FILEBEAT_CLOUD_INSTRUCTIONS.INSTALL.WINDOWS,
FILEBEAT_ONPREM_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.'
},
FILEBEAT_INSTRUCTIONS.START.WINDOWS
]
}
]
Expand Down

0 comments on commit 6b06935

Please sign in to comment.