to define the passwords of the keystore and of the variables indicated in the output
set +o history
export LOGSTASH_KEYSTORE_PASS=password
set -o history
bin/logstash-keystore create --path.settings /etc/logstash
chown logstash:root /etc/logstash/logstash.keystore ; chmod 0600 /etc/logstash/logstash.keystore
output {
elasticsearch {
hosts => ["https://192.168.1.30:9200", "https://192.168.1.40:9200", "https://192.168.1.50:9200"]
ssl => true
ssl_certificate_verification => true
keystore => /etc/logstash/certs/logstash1.p12
keystore_password => "${KEY_PWD}"
truststore => /etc/logstash/certs/logstash1.p12
truststore_password => "${TRUST_PWD}"
api_key => "66GKX9GYT36ziqNjXv3vvw"
}