Skip to content

Placeholders don't work in data_stream_name #153

@voronin-ilya

Description

@voronin-ilya

(check apply)

  • read the contribution guideline
  • (optional) already reported 3rd party upstream repository or mailing list if you use k8s addon or helm charts.

Steps to replicate

Configure Fluentd to write to a data stream using a placeholder for dynamic stream name resolution:

<match datastream.test**>
  @type opensearch_data_stream
  data_stream_name ${indexname}
...
  <endpoint>
    url https://xxxxxxxxx.xxxxxxxxxxx.es.amazonaws.com
    region xxxxxxx
    assume_role_arn "#{ENV['AWS_ROLE_ARN']}"
    assume_role_web_identity_token_file "#{ENV['AWS_WEB_IDENTITY_TOKEN_FILE']}"
  </endpoint>
...
</match>

Expected Behavior or What you need to ask

Expected: The stream name is dynamically looked up from the event, just as it works for a regular @type opensearch output.
Actual: ${indexname} is passed literally as data stream name to OpenSearch.

Using Fluentd and OpenSearch plugin versions

  • OS version
  • Linux logs-aggregator-2 6.1.119-129.201.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Dec 3 21:07:35 UTC 2024 x86_64 GNU/Linux
  • Bare Metal or within Docker or Kubernetes or others?
  • Kubernetes, EKS
  • Fluentd v1.0 or later
    • paste result of fluentd --version or td-agent --version
    • fluentd 1.16.2
  • OpenSearch plugin version
    • paste boot log of fluentd or td-agent
    • paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock
opensearch-api (2.2.0)
opensearch-ruby (2.1.0)
opensearch-transport (2.1.0)
  • OpenSearch version (optional)
  • OpenSearch template(s) (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUser forum like issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions