Skip to content

Commit

Permalink
[Profiling] Allow to customize the ILM policy
Browse files Browse the repository at this point in the history
With this commit we reference the component template
`profiling-ilm@custom` in all composable index templates that define
indices / data streams managed by ILM. This allows users to override the
built-in ILM policy and define e.g. a shorter retention period.
  • Loading branch information
danielmitterdorfer committed Sep 26, 2023
1 parent 602aa01 commit ae4ccb9
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
},
"composed_of": [
"profiling-events",
"profiling-ilm"
"profiling-ilm",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Index template for profiling-events"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"composed_of": [
"profiling-executables",
"profiling-ilm",
"profiling-hot-tier"
"profiling-hot-tier",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Index template for .profiling-executables"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"data_stream": {},
"composed_of": [
"profiling-hosts",
"profiling-ilm"
"profiling-ilm",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Template for profiling-hosts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"data_stream": {},
"composed_of": [
"profiling-metrics",
"profiling-ilm"
"profiling-ilm",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Template for profiling-metrics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"composed_of": [
"profiling-stackframes",
"profiling-ilm",
"profiling-hot-tier"
"profiling-hot-tier",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Index template for .profiling-stackframes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"composed_of": [
"profiling-stacktraces",
"profiling-ilm",
"profiling-hot-tier"
"profiling-hot-tier",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"priority": 100,
"_meta": {
"description": "Index template for .profiling-stacktraces"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"composed_of": [
"profiling-symbols",
"profiling-ilm",
"profiling-hot-tier"
"profiling-hot-tier",
"profiling-ilm@custom"
],
"ignore_missing_component_templates": ["profiling-ilm@custom"],
"template": {
"settings": {
"index": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public class ProfilingIndexTemplateRegistry extends IndexTemplateRegistry {
// history (please add a comment why you increased the version here)
// version 1: initial
// version 2: Added 'profiling.host.machine' keyword mapping to profiling-hosts
public static final int INDEX_TEMPLATE_VERSION = 2;
// version 3: Add optional component template profiling-ilm@custom to all ILM-managed index templates
public static final int INDEX_TEMPLATE_VERSION = 3;

// history for individual indices / index templates. Only bump these for breaking changes that require to create a new index
public static final int PROFILING_EVENTS_VERSION = 1;
Expand Down

0 comments on commit ae4ccb9

Please sign in to comment.