Skip to content

Instantly share code, notes, and snippets.

@Simonx123
Forked from Callonski/configure_filebeat.sh
Created September 7, 2020 01:06
Show Gist options
  • Save Simonx123/98f4669b1f6643a2290c294b040e21c9 to your computer and use it in GitHub Desktop.
Save Simonx123/98f4669b1f6643a2290c294b040e21c9 to your computer and use it in GitHub Desktop.
################## CONFIGURE FILEBEAT #######################
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-x.x.x-amd64.deb // Replace x.x.x with version
sudo dpkg -i filebeat-x.x.x-amd64.deb // Replace x.x.x with version
sudo filebeat keystore create
echo "${elastic_pw}" | sudo bin/filebeat keystore add ES_PASSWORD
cat <<EOT >> /etc/filebeat/filebeat.yml
output.elasticsearch:
hosts: ['https://${internal_lb_ip}:9200']
username: "elastic"
password: "${ES_PASSWORD}"
ssl:
certificate_authorities: ['/etc/kibana/elasticsearch-ca.pem']
verification_mode: 'none'
setup.kibana:
host: "0.0.0.0:8080"
username: "elastic"
password: "${ES_PASSWORD}"
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/*.log
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment