Skip to content

Commit

Permalink
Datastream host value wrong during write
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
  • Loading branch information
anders-swanson committed Feb 9, 2022
1 parent a1f482b commit aae6b92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fluent/plugin/out_opensearch_data_stream.rb
Expand Up @@ -160,7 +160,11 @@ def write(chunk)
data_stream_template_name = @data_stream_template_name
host = nil
if @use_placeholder
host = extract_placeholders(@host, chunk)
host = if @hosts
extract_placeholders(@hosts, chunk)
else
extract_placeholders(@host, chunk)
end
data_stream_name = extract_placeholders(@data_stream_name, chunk)
data_stream_template_name = extract_placeholders(@data_stream_template_name, chunk)
unless @data_stream_names.include?(data_stream_name)
Expand Down

0 comments on commit aae6b92

Please sign in to comment.