Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 12.1.3
- [DOC] Update docs to present time-based routing models, and clarify that only one model can be in use at a time [#1252](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1252)

## 12.1.2
- Fix: replace deprecated `File.exists?` with `File.exist?` for Ruby 3.4 (JRuby 10) compatibility [#1238](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1238)

Expand Down
9 changes: 9 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ output {

==== Writing to different indices: best practices

.Important considerations for time-based routing
****
Time-based routing in this plugin follows *one* model at a time. _Do not_ mix models.

* *Data streams.* Use <<plugins-{type}s-{plugin}-data_stream,`data_stream`>> and related settings.
* *Index lifecycle management (ILM) rollover.* The value you set using <<plugins-{type}s-{plugin}-ilm_pattern,`ilm_pattern`>> is used for naming, and should align with {ref}/indices-rollover-index.html#_using_date_math_with_the_rollover_api[Elasticsearch rollover naming].
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data streams can use ILM or DLM. The callout is alias.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification, @stefnestor. Please put the change you'd like to see in as a suggestion.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, sorry. 🙈. I'm feeling unhelpful in you trying to help me. Starting with what you said already but said way worse:

Time-based routing in this plugin allows *one* target model at a time: data stream, alias, or index.
 _Do not_ mix models. Data stream supports ILM+DLM. Aliases support ILM. Index supports ILM 
but not ILM rollover.

Note `index` stands for an ingest target. It allows dynamic content via placeholders `%{...}`, such
as date math. Placeholders might make sense with data streams and aliases, but results should be
validated against cluster index templates and ILM setup. Placeholder date math should not normally
be used with aliases nor data streams.

* *Explicit index names.* Use the <<plugins-{type}s-{plugin}-index,`index`>> setting and `%{+...}` syntax for daily (or other) rotation.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really appreciate your help & don't mean to be pedantic, but I think "explicit" index name indicates static vs date math rotation is still a form of implicit naming convention 🙃.

****

NOTE: You cannot use dynamic variable substitution when `ilm_enabled` is `true`
and when using `ilm_rollover_alias`.

Expand Down
2 changes: 1 addition & 1 deletion logstash-output-elasticsearch.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-elasticsearch'
s.version = '12.1.2'
s.version = '12.1.3'
s.licenses = ['apache-2.0']
s.summary = "Stores logs in Elasticsearch"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down
Loading