Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section <templates> is not used in <match **> of opensearch plugin #135

Closed
1 of 2 tasks
ng-bsy opened this issue Apr 11, 2024 · 1 comment
Closed
1 of 2 tasks

Section <templates> is not used in <match **> of opensearch plugin #135

ng-bsy opened this issue Apr 11, 2024 · 1 comment

Comments

@ng-bsy
Copy link

ng-bsy commented Apr 11, 2024

  • 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

- match:
    $tag: '**'
    $type: opensearch
    scheme: https
    ssl_verify: false
    hosts: oshost01,oshost02
    user: XXXX
    password: XXXX
    logstash_format: false
    index_name: fluentd.${tag}
    templates:
      fluentd: '/etc/fluent/os_index_templates/fluentd.json'

[warn]: section <templates> is not used in <match **> of opensearch plugin

Expected Behavior or What you need to ask

I expect to not read the warning message and the opensearch plugin to use the provided templates

Using Fluentd and OpenSearch plugin versions

  • Ubuntu 22.04 LTS
  • Docker fluentd:v1.16-1
  • fluentd 1.16.2
  • fluent-plugin-opensearch 1.1.4
  • OpenSearch version 2.5
  • OpenSearch template
{
  "index_patterns" : [
    "fluentd.*"
  ],
  "priority": 10,
  "data_stream": {}
}
@ng-bsy
Copy link
Author

ng-bsy commented Apr 11, 2024

Okay, I suppose this one can be closed.
It's documented here: https://docs.fluentd.org/configuration/config-file-yaml#special-yaml-elements

templates:
      fluentd: '/etc/fluent/os_index_templates/fluentd.json'

has to be replaced with

templates:  !fluent/json {fluentd: '/etc/fluent/os_index_templates/fluentd.json'}

@ng-bsy ng-bsy closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant