Logstash XPack Password

So I have installed X Pack on my ELK stack, I am just wondering to put the below (I have set the new username and password this is just the example):
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: logstashpassword

So it says to add it to the logstash.yml file, but I don't see any current settings to add my username and password to. Am I missing some config options or do I just append these two options to my logstash.yml file?

Cheers

G

You need to add them into the file.

Also we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! :wink:

So the end of my logstash.yml file looks like this:

------------ Debugging Settings --------------

Options for log.level:

* fatal

* error

* warn

* info (default)

* debug

* trace

log.level: info

path.logs: /var/log/logstash

------------ Other Settings --------------

Where to find custom plugins

path.plugins: []

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

So I saved the file and restarted Logstash and it keeps restarting and I get the following error:

[2017-12-13T11:08:58,901][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<ArgumentError: Setting "xpack.monitoring.elasticsearch.username" hasn't been registered>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:32:in get_setting'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:64:inset_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:83:in merge'", "org/jruby/RubyHash.java:1342:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:83:in merge'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:135:invalidate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:243:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:204:in run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}

I am running Elastic Stack version 5.6

It doesn't look like you've installed X-Pack into Logstash.
You need to install the plugin independently into each product (Elasticsearch, Kibana, Logstash).

1 Like

Oh silly me, I thought I'd installed it.

So I have installed it now and added the following to the end of the Logstash.yml:

xpack.monitoring.elasticsearch.password: f5iTz&#_#*N!_uFwn~?@
xpack.monitoring.elasticsearch.url: http://localhost:9200
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.enabled: false

Logstash keeps restarting and isn't writing any logs.

Cheers,

G

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