From ab8efdbb3d368dc78d3d19f142a1e6ac064c9124 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 17 Sep 2019 13:29:17 +0200 Subject: [PATCH] Fix incorrect structure of cluster_uuid insertion --- logstash-core/lib/logstash/api/commands/default_metadata.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/logstash-core/lib/logstash/api/commands/default_metadata.rb b/logstash-core/lib/logstash/api/commands/default_metadata.rb index 478a15c5f15..2014b52687c 100644 --- a/logstash-core/lib/logstash/api/commands/default_metadata.rb +++ b/logstash-core/lib/logstash/api/commands/default_metadata.rb @@ -25,9 +25,8 @@ def all {:monitoring => { :hosts => LogStash::SETTINGS.get("xpack.monitoring.elasticsearch.hosts"), :username => LogStash::SETTINGS.get("xpack.monitoring.elasticsearch.username") - } - } : {}).merge(LogStash::SETTINGS.get("xpack.monitoring.cluster_uuid") ? - LogStash::SETTINGS.get("xpack.monitoring.cluster_uuid") : {} ) + }.merge(LogStash::SETTINGS.set?("xpack.monitoring.cluster_uuid") ? + {:cluster_uuid => LogStash::SETTINGS.get("xpack.monitoring.cluster_uuid")} : {})} : {}) end def host