mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -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]
|
p_stats = stats[pipeline_id]
|
||||||
# Don't record stats for system pipelines
|
# Don't record stats for system pipelines
|
||||||
next nil if pipeline.system?
|
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 = {
|
res = {
|
||||||
"id" => pipeline_id.to_s,
|
"id" => pipeline_id.to_s,
|
||||||
"hash" => pipeline.lir.unique_hash,
|
"hash" => pipeline.lir.unique_hash,
|
||||||
|
@ -33,8 +35,8 @@ module LogStash; module Config;
|
||||||
"events" => format_pipeline_events(p_stats[:events]),
|
"events" => format_pipeline_events(p_stats[:events]),
|
||||||
"queue" => format_queue_stats(pipeline_id, metric_store),
|
"queue" => format_queue_stats(pipeline_id, metric_store),
|
||||||
"reloads" => {
|
"reloads" => {
|
||||||
"successes" => p_stats[:reloads][:successes].value,
|
"successes" => (p_stats.dig(:reloads, :successes)&.value || 0),
|
||||||
"failures" => p_stats[:reloads][:failures].value
|
"failures" => (p_stats.dig(:reloads, :failures)&.value || 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if extended_performance_collection
|
if extended_performance_collection
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue