From 001deb17d5e75aef6d64aadd5de1d784b040ad85 Mon Sep 17 00:00:00 2001 From: Tom Sparrow <793763+sparrowt@users.noreply.github.com> Date: Fri, 5 Jan 2024 10:56:54 +0000 Subject: [PATCH 1/2] Clarify README docs for template_name and templates Clarify when the index template is created and what 'hash' means (this was not at all obvious to me as a newcomber to Ruby - not all fluentd users will know Ruby) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c1b635..f021684 100644 --- a/README.md +++ b/README.md @@ -527,7 +527,7 @@ into same document with data1 as wanted and duplicated document is avoided. ### template_name -The name of the template to define. If a template by the name given is already present, it will be left unchanged, unless [template_overwrite](#template_overwrite) is set, in which case the template will be updated. +The name of the index template to create on fluentd startup. If a template by the name given is already present, it will be left unchanged, unless [template_overwrite](#template_overwrite) is set, in which case the template will be updated. This parameter along with template_file allow the plugin to behave similarly to Logstash (it installs a template at creation time) so that raw records are available. See [https://github.com/uken/fluent-plugin-elasticsearch/issues/33](https://github.com/uken/fluent-plugin-elasticsearch/issues/33). @@ -541,7 +541,7 @@ The path to the file containing the template to install. ### templates -Specify index templates in form of hash. Can contain multiple templates. +Specify index templates (to be created on startup) in the form of a Ruby hash (accepts JSON dict). Can contain multiple templates. ``` templates { "template_name_1": "path_to_template_1_file", "template_name_2": "path_to_template_2_file"} From ca32595d042d5bf316435b0531c0282e4d0b31a8 Mon Sep 17 00:00:00 2001 From: Tom Sparrow <793763+sparrowt@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:21:54 +0000 Subject: [PATCH 2/2] Review comment on description of 'templates' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f021684..1db2cb8 100644 --- a/README.md +++ b/README.md @@ -541,7 +541,7 @@ The path to the file containing the template to install. ### templates -Specify index templates (to be created on startup) in the form of a Ruby hash (accepts JSON dict). Can contain multiple templates. +Specify index templates (to be created on startup) in the form of a hash (accepts JSON dict). Can contain multiple templates. ``` templates { "template_name_1": "path_to_template_1_file", "template_name_2": "path_to_template_2_file"}