Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tutorials] Logstash Netflow - more changes #6

101 changes: 101 additions & 0 deletions src/core_plugins/kibana/common/tutorials/filebeat_instructions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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]' +
'({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]' +
'({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).'
},
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: '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).'
},
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'
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`C:\\Program Files\\Filebeat\\filebeat.yml` file to point to your Elasticsearch installation.'
}
},
START: {
OSX: {
title: 'Start Filebeat',
commands: [
'./filebeat setup -e',
'./filebeat -e',
],
textPost: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.'
},
DEB: {
title: 'Start Filebeat',
commands: [
'sudo filebeat setup -e',
'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',
commands: [
'sudo filebeat setup -e',
'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',
commands: [
'PS C:\\Program Files\\Filebeat> filebeat.exe setup -e',
'PS C:\\Program Files\\Filebeat> Service-Start filebeat',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.'
}
}
};


40 changes: 40 additions & 0 deletions src/core_plugins/kibana/common/tutorials/logstash_instructions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const SKIP_INSTALL_SENTENCE = '_Skip this step if Logstash is already installed._';
const FIRST_TIME_SENTENCE = '_First time using Logstash? See the [Getting Started Guide]({config.docs.logstash}/'
+ 'getting-started-with-logstash.html)._';

export const LOGSTASH_INSTRUCTIONS = {
INSTALL: {
OSX: [
{
title: 'Download and install the Java runtime environment',
textPre: `Follow the installation instructions [here](https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jre.html). ` +
`${SKIP_INSTALL_SENTENCE} ${FIRST_TIME_SENTENCE}`
},
{
title: 'Download and install Logstash',
textPre: SKIP_INSTALL_SENTENCE,
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.tar.gz',
'tar xzvf logstash-{config.kibana.version}.tar.gz'
]
}
],
DEB: [
{
title: 'Download and install the Java runtime environment',
textPre: `${SKIP_INSTALL_SENTENCE} ${FIRST_TIME_SENTENCE}`,
commands: [
'sudo apt-get install default-jre'
]
},
{
title: 'Download and install Logstash',
textPre: SKIP_INSTALL_SENTENCE,
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.deb',
'sudo apt install ./logstash-{config.kibana.version}.deb'
]
}
]
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
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]' +
'({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]' +
'({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.'
},
RPM: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' 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.'
},
WINDOWS: {
title: 'Download and install Metricbeat',
textPre: 'Skip this step if Metricbeat is already installed.' +
' 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' +
'3. Rename the `metricbeat-{config.kibana.version}-windows` directory to `Metricbeat`.\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 Metricbeat as a Windows service.',
commands: [
'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.'
}
},
START: {
OSX: {
title: 'Start Metricbeat',
commands: [
'./metricbeat setup -e',
'./metricbeat -e --setup',
],
textPost: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.'
},
DEB: {
title: 'Start Metricbeat',
commands: [
'sudo metricbeat setup -e',
'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',
commands: [
'sudo metricbeat setup -e',
'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',
commands: [
'PS C:\\Program Files\\Metricbeat> metricbeat.exe setup -e',
'PS C:\\Program Files\\Metricbeat> Service-Start metricbeat',
],
textPost: 'The `setup` command loads the Kibana dashboards. If the dashboards are already installed, ' +
'omit this command.'
}
}
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ export function Instruction({ commands, paramValues, textPost, textPre }) {
post = <Content className="kuiVerticalRhythm" text={textPost}/>;
}

const aceOptions = {
fontSize: '14px',
maxLines: commands.length
};

return (
<div className="instruction">

{pre}

let commandsMarkup;
if (commands) {
const aceOptions = {
fontSize: '14px',
maxLines: commands.length
};
commandsMarkup = (
<div className="kuiVerticalRhythm">
<KuiCodeEditor
mode="sh"
Expand All @@ -39,15 +36,22 @@ export function Instruction({ commands, paramValues, textPost, textPre }) {
isReadOnly
/>
</div>
);
}

return (
<div className="instruction">

{pre}
{commandsMarkup}
{post}

</div>
);
}

Instruction.propTypes = {
commands: PropTypes.array.isRequired,
commands: PropTypes.array,
paramValues: PropTypes.object.isRequired,
textPost: PropTypes.string,
textPre: PropTypes.string,
Expand Down
Loading