mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
propagate pipeline.id to api resources
this removes explicit references to the "main" pipeline, using instead the value of the `pipeline.id` from LogStash::SETINGS Fixes #6606
This commit is contained in:
parent
95cfe756a7
commit
f5601ecbd7
2 changed files with 8 additions and 9 deletions
|
@ -17,11 +17,12 @@ module LogStash
|
|||
payload
|
||||
end
|
||||
|
||||
def pipeline
|
||||
extract_metrics(
|
||||
[:stats, :pipelines, :main, :config],
|
||||
def pipeline(pipeline_id = LogStash::SETTINGS.get("pipeline.id").to_sym)
|
||||
stats = extract_metrics(
|
||||
[:stats, :pipelines, pipeline_id, :config],
|
||||
:workers, :batch_size, :batch_delay, :config_reload_automatic, :config_reload_interval
|
||||
)
|
||||
stats.merge(:id => pipeline_id)
|
||||
end
|
||||
|
||||
def os
|
||||
|
|
|
@ -45,9 +45,10 @@ module LogStash
|
|||
)
|
||||
end
|
||||
|
||||
def pipeline
|
||||
stats = service.get_shallow(:stats, :pipelines)
|
||||
PluginsStats.report(stats)
|
||||
def pipeline(pipeline_id = LogStash::SETTINGS.get("pipeline.id").to_sym)
|
||||
stats = service.get_shallow(:stats, :pipelines, pipeline_id)
|
||||
stats = PluginsStats.report(stats)
|
||||
stats.merge(:id => pipeline_id)
|
||||
end
|
||||
|
||||
def memory
|
||||
|
@ -98,9 +99,6 @@ module LogStash
|
|||
end
|
||||
|
||||
def report(stats)
|
||||
# Only one pipeline right now.
|
||||
stats = stats[:main]
|
||||
|
||||
{
|
||||
:events => stats[:events],
|
||||
:plugins => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue