Logstash keystore elasticsearch password

How can I use the keystore for password instead of specifying it in the logstash.yml?

xpack.monitoring.elasticsearch.password:

I tried adding the ES_PWD and listing it from the keystore

/usr/share/logstash/bin/logstash-keystore list --path.settings /etc/logstash/
es_pwd
and adding
xpack.monitoring.elasticsearch.password: "es_pwd"
but it's not working

Thanks

In your logstash.yml, you need to specify it as ${ES_PWD}

Documentation for it is here -> https://www.elastic.co/guide/en/logstash/current/keystore.html

Thanks for your reply

When I use this it works:

xpack.monitoring.elasticsearch.username: "logstash_system"
xpack.monitoring.elasticsearch.password: "password"

[2019-06-12T07:36:15,552][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://logstash_system:xxxxxx@localhost:9200/]}}

When I specify as this it doesn't work:

xpack.monitoring.elasticsearch.username: "logstash_system"
xpack.monitoring.elasticsearch.password: ${ES_PWD}

> [2019-06-12T08:16:04,176][WARN ][logstash.runner          ] SIGTERM received. Shutting down.
> [2019-06-12T08:16:09,365][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0, "stalling_threads_info"=>{"other"=>[{"thread_id"=>29, "name"=>"[main]<beats", "current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.0-java/lib/logstash/inputs/beats.rb:204:in `run'"}], ["LogStash::Filters::GeoIP", {"database"=>"/etc/logstash/GeoLite2-ASN.mmdb", "source"=>"[source][ip]", "id"=>"29a40f7c73feaa37ffe99814f4ce339cebf28d761028438fb997fd519d06be16"}]=>[{"thread_id"=>25, "name"=>"[main]>worker0", "current_call"=>"[...]/logstash-core/lib/logstash/java_pipeline.rb:235:in `block in start_workers'"}, {"thread_id"=>26, "name"=>"[main]>worker1", "current_call"=>"[...]/logstash-core/lib/logstash/java_pipeline.rb:235:in `block in start_workers'"}, {"thread_id"=>27, "name"=>"[main]>worker2", "current_call"=>"[...]/logstash-core/lib/logstash/java_pipeline.rb:235:in `block in start_workers'"}, {"thread_id"=>28, "name"=>"[main]>worker3", "current_call"=>"[...]/logstash-core/lib/logstash/java_pipeline.rb:235:in `block in start_workers'"}]}}
> [2019-06-12T08:16:09,369][ERROR][org.logstash.execution.ShutdownWatcherExt] The shutdown process appears to be stalled due to busy or blocked plugins. Check the logs for more information.
> [2019-06-12T08:16:10,645][INFO ][logstash.javapipeline    ] Pipeline terminated {"pipeline.id"=>"main"}
> [2019-06-12T08:16:10,649][INFO ][logstash.runner          ] Logstash shut down.

I'm looking at the monitoring not the management

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.