Class: LogStash::Instrument::PeriodicPoller::PersistentQueue

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/instrument/periodic_poller/pq.rb

Constant Summary

Constants inherited from Base

Base::DEFAULT_OPTIONS

Instance Attribute Summary

Attributes inherited from Base

#metric

Instance Method Summary collapse

Methods inherited from Base

#start, #stop, #update

Constructor Details

#initialize(metric, queue_type, agent, options = {}) ⇒ PersistentQueue

Returns a new instance of PersistentQueue.



6
7
8
9
10
11
# File 'lib/logstash/instrument/periodic_poller/pq.rb', line 6

def initialize(metric, queue_type, agent, options = {})
  super(metric, options)
  @metric = metric
  @queue_type = queue_type
  @agent = agent
end

Instance Method Details

#collectObject



13
14
15
16
17
18
19
20
# File 'lib/logstash/instrument/periodic_poller/pq.rb', line 13

def collect
  pipelines = @agent.running_user_defined_pipelines
  pipelines.each do |_, pipeline|
    unless pipeline.nil?
      pipeline.collect_stats
    end
  end
end