fluent / fluent-plugin-opensearch

OpenSearch Plugin for Fluentd
Apache License 2.0
58 stars 20 forks source link

opensearch_data_stream: Check if the index template exists every time before pushing data #103

Closed adiforluls closed 1 year ago

adiforluls commented 1 year ago

(check apply)

Steps to replicate

I am running OpenSearch and Fluentd with ephemeral storage in a Kubernetes environment. Sometimes OpenSearch pod can restart, and with ephemeral storage the index template created by Fluentd goes away once OpenSearch instance comes back up, and now the data is instead written to an index with same name as data_stream_name. The problem is because we maintain a local cache and decide if we need to create index template instead of checking the OpenSearch host.

Provide example config and message

Expected Behavior or What you need to ask

Even if index template is somehow deleted in OpenSearch, it should be recreated by fluent-plugin-opensearch

...

Using Fluentd and OpenSearch plugin versions

OpenSearch v2.3.0 Fluentd v1.14.5