From 023faa7a33828b61be5312a26242f17e2921b593 Mon Sep 17 00:00:00 2001 From: Lewis Bertin Date: Wed, 30 Sep 2026 23:11:46 +0200 Subject: [PATCH] elasticsearch, opensearch: document @timestamp with logstash_format logstash_format true also adds a @timestamp field to records that do not already have one; with the default false, the field is only added when include_timestamp is true. Fixes #419 Signed-off-by: Lewis Bertin --- output/elasticsearch.md | 2 ++ output/opensearch.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/output/elasticsearch.md b/output/elasticsearch.md index fb10a4c4..f9866f60 100644 --- a/output/elasticsearch.md +++ b/output/elasticsearch.md @@ -114,6 +114,8 @@ For more information about buffer options checkout the [Buffer Section Configura If `true`, Fluentd uses the conventional index name format `logstash-%Y.%m.%d` \(default: `false`\). This option supersedes the `index_name` option. +When `true`, the plugin also adds a `@timestamp` field to records that do not already have one, which Kibana can use as the time field. With the default `false`, this field is only added if [`include_timestamp`](https://github.com/uken/fluent-plugin-elasticsearch#include_timestamp) is `true`. + #### `@log_level` option The `@log_level` option allows the user to set different levels of logging for each plugin. diff --git a/output/opensearch.md b/output/opensearch.md index 92263834..94fec549 100644 --- a/output/opensearch.md +++ b/output/opensearch.md @@ -116,6 +116,8 @@ For more information about buffer options checkout the [Buffer Section Configura If `true`, Fluentd uses the conventional index name format `logstash-%Y.%m.%d` \(default: `false`\). This option supersedes the `index_name` option. +When `true`, the plugin also adds a `@timestamp` field to records that do not already have one, which OpenSearch Dashboards can use as the time field. With the default `false`, this field is only added if [`include_timestamp`](https://github.com/fluent/fluent-plugin-opensearch#include_timestamp) is `true`. + #### `@log_level` option The `@log_level` option allows the user to set different levels of logging for each plugin.