From ce9cb59033f73914a0746b6e26caffe40a9c229a Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Sun, 12 Sep 2021 13:58:44 +0900 Subject: [PATCH] out_forward: Include node information correctly Signed-off-by: Hiroshi Hatake --- lib/fluent/plugin/out_forward.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/fluent/plugin/out_forward.rb b/lib/fluent/plugin/out_forward.rb index 5304ba2568..9fcea8923c 100644 --- a/lib/fluent/plugin/out_forward.rb +++ b/lib/fluent/plugin/out_forward.rb @@ -419,7 +419,7 @@ def statistics stats = super services = service_discovery_services healthy_nodes_count = 0 - registed_nodes_count = services.size + registered_nodes_count = services.size services.each do |s| if s.available? healthy_nodes_count += 1 @@ -427,8 +427,10 @@ def statistics end stats.merge( - 'healthy_nodes_count' => healthy_nodes_count, - 'registered_nodes_count' => registed_nodes_count, + 'output' => { + 'healthy_nodes_count' => healthy_nodes_count, + 'registered_nodes_count' => registered_nodes_count, + }, ) end