mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
parent
2543539910
commit
9eb2949ab7
1 changed files with 1 additions and 3 deletions
|
@ -93,8 +93,6 @@ module LogStash; module Inputs; class Metrics;
|
|||
end
|
||||
|
||||
def format_queue_stats(agent, stats)
|
||||
events = 0
|
||||
|
||||
pipelines_stats = stats.get_shallow(:stats, :pipelines)
|
||||
|
||||
total_queued_events = 0
|
||||
|
@ -103,7 +101,7 @@ module LogStash; module Inputs; class Metrics;
|
|||
pipeline = agent.get_pipeline(pipeline_id)
|
||||
# Check if pipeline is nil to avoid race condition where metrics system refers pipeline that has been stopped already
|
||||
next if pipeline.nil? || pipeline.system? || type != 'persisted'
|
||||
total_queued_events = p_stats[:queue][:events].value
|
||||
total_queued_events += p_stats[:queue][:events].value
|
||||
end
|
||||
|
||||
{:events_count => total_queued_events}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue