Created
September 14, 2017 11:00
-
-
Save EikeDehling/45dee9b168192b6b4014e5026fba44d9 to your computer and use it in GitHub Desktop.
Install filebeat & metricbeat on debian (as root)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is fantastic. Thank you.