File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
logstash-core/lib/logstash Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ def pipeline(pipeline_id)
3636 :config_reload_automatic ,
3737 :config_reload_interval ,
3838 :dead_letter_queue_enabled ,
39- :dead_letter_queue_path
39+ :dead_letter_queue_path ,
40+ :cluster_uuids
4041 ) . reject { |_ , v |v . nil? }
4142 rescue
4243 { }
Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ def start_workers
220220 config_metric . gauge ( :ephemeral_id , ephemeral_id )
221221 config_metric . gauge ( :hash , lir . unique_hash )
222222 config_metric . gauge ( :graph , ::LogStash ::Config ::LIRSerializer . serialize ( lir ) )
223+ config_metric . gauge ( :cluster_uuids , resolve_cluster_uuids )
223224
224225 @logger . info ( "Starting pipeline" , default_logging_keys (
225226 "pipeline.workers" => pipeline_workers ,
@@ -258,6 +259,19 @@ def start_workers
258259 end
259260 end
260261
262+ def resolve_cluster_uuids
263+ cluster_uuids = [ ]
264+ outputs . each do |output |
265+ if LogStash ::SETTINGS . registered? ( output . id + ".cluster_uuid" )
266+ cluster_uuid = LogStash ::SETTINGS . get ( output . id + ".cluster_uuid" )
267+ unless cluster_uuids . include? cluster_uuid
268+ cluster_uuids . push ( cluster_uuid )
269+ end
270+ end
271+ end
272+ cluster_uuids
273+ end
274+
261275 def wait_inputs
262276 @input_threads . each do |thread |
263277 if thread . class == Java ::JavaObject
You can’t perform that action at this time.
0 commit comments