Last active
September 7, 2020 01:06
-
-
Save Callonski/54d60e57c094d828eef2fa5dad29a4eb to your computer and use it in GitHub Desktop.
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
################ LOGSTASH ############################## | |
sudo systemctl enable logstash | |
sudo systemctl start logstash | |
sudo /usr/share/logstash/bin/logstash-plugin install x-pack | |
sudo bin/logstash-keystore create | |
echo "${elastic_pw}" | sudo bin/logstash-keystore add ES_PASSWORD | |
cat <<EOT >> /etc/logstash/logstash.yml | |
xpack.monitoring.enabled: true | |
xpack.monitoring.elasticsearch.url: 'https://${internal_lb_ip}:9200' | |
xpack.monitoring.elasticsearch.username: 'elastic' | |
# read password from logstash.keystore | |
xpack.monitoring.elasticsearch.password: '${ES_PASSWORD}' | |
xpack.monitoring.elasticsearch.ssl.certificate_authority: /etc/kibana/elasticsearch-ca.pem | |
xpack.monitoring.elasticsearch.ssl.verification_mode: 'none' | |
output { | |
elasticsearch { | |
hosts: ['https://${elastic_host_1}:9200','https://${elastic_host_2}:9200','https://${elastic_host_3}:9200'] | |
user: 'elastic' | |
password: '${ES_PASSWORD}' | |
} | |
} | |
EOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment