Skip to content

Instantly share code, notes, and snippets.

@EikeDehling
Created September 14, 2017 11:00
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save EikeDehling/45dee9b168192b6b4014e5026fba44d9 to your computer and use it in GitHub Desktop.
Save EikeDehling/45dee9b168192b6b4014e5026fba44d9 to your computer and use it in GitHub Desktop.
Install filebeat & metricbeat on debian (as root)
# Install filebeat & metricbeat
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list
apt-get update
apt-get install filebeat metricbeat
# Configure filebeat
cat >/etc/filebeat/filebeat.yml <<EOL
filebeat.prospectors:
- input_type: log
paths:
- /var/log/*.log
fields:
project_name: testing
output.elasticsearch:
hosts: ["1.1.1.1:9200"]
EOL
# Start filebeat
systemctl daemon-reload
systemctl enable filebeat.service
systemctl start filebeat.service
# Configure metricbeat
cat >/etc/metricbeat/metricbeat.yml <<EOL
metricbeat.modules:
- module: system
metricsets:
- cpu
- load
- filesystem
- fsstat
- memory
- network
- process
enabled: true
period: 10s
processes: ['.*']
fields:
project_name: testing
output.elasticsearch:
hosts: ["1.1.1.1:9200"]
EOL
# Start metricbeat
systemctl daemon-reload
systemctl enable metricbeat.service
systemctl start metricbeat.service
@SaundersB
Copy link

This is fantastic. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment