mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
(cherry picked from commit 4b430a5f69
)
This commit is contained in:
parent
fe4827132b
commit
8d057881ae
1 changed files with 4 additions and 2 deletions
|
@ -26,6 +26,8 @@ module LogStash; module Config;
|
|||
p_stats = stats[pipeline_id]
|
||||
# Don't record stats for system pipelines
|
||||
next nil if pipeline.system?
|
||||
# Don't emit stats for pipelines that have not yet registered any metrics
|
||||
next nil if p_stats.nil?
|
||||
res = {
|
||||
"id" => pipeline_id.to_s,
|
||||
"hash" => pipeline.lir.unique_hash,
|
||||
|
@ -33,8 +35,8 @@ module LogStash; module Config;
|
|||
"events" => format_pipeline_events(p_stats[:events]),
|
||||
"queue" => format_queue_stats(pipeline_id, metric_store),
|
||||
"reloads" => {
|
||||
"successes" => p_stats[:reloads][:successes].value,
|
||||
"failures" => p_stats[:reloads][:failures].value
|
||||
"successes" => (p_stats.dig(:reloads, :successes)&.value || 0),
|
||||
"failures" => (p_stats.dig(:reloads, :failures)&.value || 0)
|
||||
}
|
||||
}
|
||||
if extended_performance_collection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue