You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Scenario 4: Apply ILM policy to all data streams in a custom integration (elastic#2082)
Added a new ILM configuration scenario to the Fleet data streams
documentation (Scenario 4: Apply an ILM policy to all data streams in a
custom integration).
Applies to version 9.1 and later
Copy file name to clipboardExpand all lines: reference/fleet/data-streams-ilm-tutorial.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,4 +26,5 @@ How you apply an ILM policy depends on your use case. Choose a scenario for the
26
26
27
27
***[Scenario 1](/reference/fleet/data-streams-scenario1.md)**: You want to apply an ILM policy to all logs or metrics data streams across all namespaces.
28
28
***[Scenario 2](/reference/fleet/data-streams-scenario2.md)**: You want to apply an ILM policy to selected data streams in an integration.
29
-
***[Scenario 3](/reference/fleet/data-streams-scenario3.md)**: You want apply an ILM policy for data streams in a selected namespace in an integration.
29
+
***[Scenario 3](/reference/fleet/data-streams-scenario3.md)**: You want to apply an ILM policy for data streams in a selected namespace in an integration.
30
+
***[Scenario 4](/reference/fleet/data-streams-scenario4.md)**: You want to apply an ILM policy to all data streams in a custom integration using a `@custom` component template. {applies_to}`stack: ga 9.1`
# Scenario 4: Apply an ILM policy to all data streams in a custom integration [data-streams-scenario4]
14
+
15
+
If you’ve created a custom integration package, you can apply a single ILM policy to all its data streams using a shared `@custom` component template. This eliminates the need to configure each data stream individually.
16
+
17
+
## Step 1: Define the ILM policy [data-streams-scenario4-step1]
18
+
19
+
1. In {{kib}}, go to **Stack Management** and select **Index Lifecycle Policies**. You can also use the [global search field](/get-started/the-stack.md#kibana-navigation-search).
20
+
2. Click **Create policy**.
21
+
3. Name the policy, configure it as needed, and click **Save policy**.
22
+
23
+
## Step 2: Create a custom component template [data-streams-scenario4-step2]
24
+
25
+
Create a custom component template named `<integration>@custom`, replacing `<integration>` with your package name.
26
+
27
+
For example, for a Docker integration, use:
28
+
29
+
```json
30
+
PUT _component_template/docker@custom
31
+
{
32
+
"template": {
33
+
"settings": {
34
+
"index": {
35
+
"lifecycle": {
36
+
"name": "docker-ilm-policy"
37
+
}
38
+
}
39
+
},
40
+
"mappings": {
41
+
"properties":
42
+
}
43
+
}
44
+
}
45
+
}
46
+
```
47
+
48
+
## Step 3: Deploy or update the integration [data-streams-scenario4-step3]
49
+
50
+
The `@custom` component template is automatically included when the package is installed or updated.
51
+
52
+
To apply the ILM policy:
53
+
54
+
- Bump the version of your custom package.
55
+
56
+
- Reinstall or upgrade the package using the {{fleet}} UI or Developer Console.
57
+
58
+
After the ILM policy from `docker` has been deployed, it applies to all data streams in the package.
0 commit comments