Skip to content

Instantly share code, notes, and snippets.

@markwalkom
Last active April 26, 2017 06:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save markwalkom/6dd106cad3877fe248e42ca19b749c29 to your computer and use it in GitHub Desktop.
Monitoring Your Elastic Stack with Beats

Download

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.1.tar.gz
wget https://artifacts.elastic.co/downloads/kibana/kibana-5.3.1-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.3.1.zip

Extract

tar zxf elasticsearch-5.3.1.tar.gz
tar zxf kibana-5.3.1-darwin-x86_64.tar.gz

Install X-Pack

elasticsearch-5.3.1/bin/elasticsearch-plugin install file:///Users/mark/Workspace/Webinar/x-pack-5.3.1.zip
kibana-5.3.1-darwin-x86_64/bin/kibana-plugin install file:///Users/mark/Workspace/Webinar/x-pack-5.3.1.zip

Start

elasticsearch-5.3.1/bin/elasticsearch
kibana-5.3.1-darwin-x86_64/bin/kibana

Download

wget https://artifacts.elastic.co/downloads/logstash/logstash-5.3.1.tar.gz

Extract

tar zxf logstash-5.3.1.tar.gz

Install X-Pack

logstash-5.3.1/bin/logstash-plugin install file:///Users/mark/Workspace/Webinar/x-pack-5.3.1.zip

Start

logstash-5.3.1/bin/logstash -e 'input { stdin{} } filter {} output { elasticsearch { user => "elastic" password => "changeme" } }'

Download

wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-5.3.1-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/beats/beats-dashboards/beats-dashboards-5.3.1.zip

Extract

tar zxf metricbeat-5.3.1-darwin-x86_64.tar.gz

Import dashboards

See https://www.elastic.co/guide/en/x-pack/current/beats.html for more info.

metricbeat-5.3.1-darwin-x86_64/scripts/import_dashboards -user elastic -pass changeme -file beats-dashboards-5.3.1.zip

Start

metricbeat-5.3.1-darwin-x86_64/metricbeat -c metricbeat-5.3.1-darwin-x86_64/metricbeat.yml

Update config

Update the output to use Logstash instead of directly to Elasticsearch. Make sure you include auth details!

Use vim/nano/atom etc.

vim metricbeat-5.3.1-darwin-x86_64/metricbeat.yml

Start

logstash-5.3.1/bin/logstash -e 'input { beats { port => 5044 } } filter {} output { elasticsearch { user => "elastic" password => "changeme" } }'
metricbeat-5.3.1-darwin-x86_64/metricbeat -c metricbeat-5.3.1-darwin-x86_64/metricbeat.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment