-
-
Save anton-boyanov/4fbafd0d22357b2f0c25420c2534a386 to your computer and use it in GitHub Desktop.
Install filebeat & metricbeat on debian (as root)
This file contains hidden or 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