fluent / fluent/fluent-plugin-opensearch

Unable to use templates option in latest version of td-agent along with opensearch plugin.

Open
#91 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
64
Forks
23
Avg merge
1h 53m
Merged PRs (30d)
3

Description

#### Steps to replicate

We are using the latest version of td-agent along with Opensearch from AWS but as soon as we put templates section in the config file following error message is thrown "2023-01-16 13:47:39 +0000 [error]: #0 fluent/log.rb:372:error: unexpected error error_class=ArgumentError error="expected both :access_key_id and :secret_access_key options""

#### Expected Behavior or What you need to ask
As per the documentation templates is supported. Can the below config file be reviewed and let us know if there is a mistake?
...
#### Config file
```aconf

@type copy

@type opensearch
index_name xx-xxxx-xxxxx-data
type_name "_doc"
logstash_format true
logstash_prefix xx-xxxx-xxxxx-data
logstash_dateformat %Y.%m
template_overwrite true
templates {"xxxxxxxxxxxxxx_template": "/opt/aws/custom/xxxxx_index_template.json"}
include_tag_key false
buffer_type file
buffer_chunk_limit 2m
buffer_queue_limit 1000
buffer_path /var/log/td-agent/uploadreportsupesbuffer
disable_retry_limit true
flush_interval 60s
retry_wait 10s
id_key MessageId
reload_connections false
remove_keys MessageId

url xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
region us-east-1
access_key_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
secret_access_key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

```
#### Using Fluentd and OpenSearch plugin versions

* OS version - Ubuntu 22.04
* Bare Metal or within Docker or Kubernetes or others?
* Fluentd v1.0 or later
* td-agent 4.4.2 fluentd 1.15.3
* 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 version (optional)
* OpenSearch template(s) (optional)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.