diff --git a/logstash-core/lib/logstash/instrument/periodic_poller/dlq.rb b/logstash-core/lib/logstash/instrument/periodic_poller/dlq.rb index 1f30a7e94..f40cb5ed8 100644 --- a/logstash-core/lib/logstash/instrument/periodic_poller/dlq.rb +++ b/logstash-core/lib/logstash/instrument/periodic_poller/dlq.rb @@ -10,10 +10,15 @@ module LogStash module Instrument module PeriodicPoller end def collect - _, pipeline = @agent.with_running_pipelines { |pipelines| pipelines.first } - unless pipeline.nil? - pipeline.collect_dlq_stats + pipelines = @agent.with_running_user_defined_pipelines {|pipelines| pipelines} + unless pipelines.nil? + pipelines.each {|_, pipeline| + unless pipeline.nil? + pipeline.collect_dlq_stats + end + } end end end end end end + diff --git a/logstash-core/lib/logstash/instrument/periodic_poller/pq.rb b/logstash-core/lib/logstash/instrument/periodic_poller/pq.rb index e92379851..068f72a6f 100644 --- a/logstash-core/lib/logstash/instrument/periodic_poller/pq.rb +++ b/logstash-core/lib/logstash/instrument/periodic_poller/pq.rb @@ -11,9 +11,13 @@ module LogStash module Instrument module PeriodicPoller end def collect - pipeline_id, pipeline = @agent.with_running_pipelines {|pipelines| pipelines.first } - unless pipeline.nil? - pipeline.collect_stats + pipelines = @agent.with_running_user_defined_pipelines {|pipelines| pipelines} + unless pipelines.nil? + pipelines.each {|_, pipeline| + unless pipeline.nil? + pipeline.collect_stats + end + } end end end