-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Profiling] Improve docs on how to manage storage #3247
Merged
danielmitterdorfer
merged 24 commits into
elastic:main
from
danielmitterdorfer:profiling-custom-ilm
Sep 27, 2023
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c828d24
[Profiling] Improve docs on how to manage storage
danielmitterdorfer d569df8
Minor tweaks
danielmitterdorfer 927421c
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 9d4b474
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 48adda0
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer aa47855
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer b58fceb
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer eb2ec23
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 41d4ab5
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer a9c0a76
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 0461ec9
Update docs/en/observability/profiling-manage-storage.asciidoc
danielmitterdorfer 9c928be
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 633c5f0
Update docs/en/observability/profiling-manage-storage.asciidoc
danielmitterdorfer c7335a8
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer f908b7d
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 60d5af0
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer d5fadfc
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 6f01171
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 926cbdb
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer cadef0b
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer 38fb4e2
Keep user on the page
danielmitterdorfer cd5341f
Move ILM reference docs to a tip
danielmitterdorfer 5a52675
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer e976631
Update docs/en/observability/profiling-index-lifecycle-management.asc…
danielmitterdorfer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
docs/en/observability/profiling-index-lifecycle-management.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
[[profiling-index-lifecycle-management]] | ||
= Universal Profiling index life cycle management | ||
|
||
++++ | ||
<titleabbrev>Index lifecycle management</titleabbrev> | ||
++++ | ||
|
||
|
||
Index lifecycle policies allow you to automate the lifecycle of your profiling indices as they grow and age. A default policy is applied, but you can customize it based on your business needs. | ||
|
||
[discrete] | ||
[[profiling-ilm-default-policy]] | ||
== Default policy | ||
|
||
The default Universal Profiling index lifecycle policy includes the following rollover and delete definitions: | ||
|
||
|
||
* **Rollover**: Rollover prevents a single index from growing too large and optimizes indexing and search performance. After an age or size metric threshold is met, a new index is created and all subsequent updates are written to the new index. | ||
|
||
* **Delete**: The delete phase permanently removes the index after a time threshold is met. | ||
|
||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The following table lists the default thresholds for rollover and delete: | ||
|
||
[cols="1,1,1",options="header"] | ||
|=== | ||
|Rollover | ||
|Warm tier | ||
|Delete | ||
|
||
| after 30 days or 50 GB | ||
| after 30 days | ||
| after 60 days | ||
|
||
|
||
|=== | ||
|
||
NOTE: The {ref}/ilm-rollover.html#_rollover_condition_blocks_phase_transition[rollover condition blocks phase transitions] which means that indices are kept 30 days *after* rollover on the hot tier. | ||
|
||
To view the Universal Profiling index lifecycle policy in {kib}, navigate to *{stack-manage-app}* → *Index Lifecycle Management*, and search for `profiling`. | ||
|
||
|
||
TIP: Default {ilm-init} policies can change between minor versions. This is not considered a breaking change as index management should continually improve and adapt to new features. | ||
|
||
[discrete] | ||
[[profiling-ilm-custom-policy]] | ||
== Configure a custom index lifecycle policy | ||
|
||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Complete the following steps to configure a custom index lifecycle policy. | ||
|
||
[discrete] | ||
[[profiling-ilm-custom-policy-create-policy]] | ||
=== Step 1: Create an index lifecycle policy | ||
|
||
. Navigate to **{stack-manage-app}** → **Index Lifecycle Policies**. | ||
|
||
. Click **Create policy**. | ||
. Name your new policy, for example `custom-profiling-policy`. | ||
. Customize the policy to your liking. | ||
. Click **Save policy**. | ||
|
||
TIP: See {ref}/index-lifecycle-management.html[Manage the index lifecycle] to learn more about {ilm-init} policies. | ||
|
||
[discrete] | ||
[[profiling-ilm-custom-policy-apply-policy]] | ||
=== Step 2: Apply the index lifecycle policy | ||
|
||
To apply your new index lifecycle policy for Universal Profiling, create a new component template named `profiling-ilm@custom`. | ||
|
||
NOTE: To apply a custom {ilm-init} policy, you must name the component template `profiling-ilm@custom`. Other names are not supported. | ||
|
||
|
||
. From the *Index Management* page, select the **Component Template** tab and click **Create component template**. | ||
|
||
. Enter `profiling-ilm@custom` as the name and click **Next**. | ||
|
||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. In **Index settings**, set the {ilm-init} policy name created in the previous step: | ||
+ | ||
[source,json] | ||
---- | ||
{ | ||
"lifecycle": { | ||
"name": "custom-profiling-policy" | ||
} | ||
} | ||
---- | ||
. Continue to the **Review** step, and select the *Request* tab. Your request should look similar to the following image. | ||
|
||
|
||
If it does, click **Create component template**. | ||
+ | ||
[role="screenshot"] | ||
image::images/profiling-create-component-template.png[Create component template] | ||
|
||
[discrete] | ||
[[profiling-ilm-custom-policy-rollover]] | ||
=== Step 3: Rollover indices | ||
|
||
To confirm that Universal Profiling is now using the new index template and {ilm-init} policy, navigate to **{dev-tools-app}** and run the following: | ||
|
||
[source,bash] | ||
---- | ||
GET _ilm/policy/custom-profiling-policy <1> | ||
---- | ||
<1> The name of the custom {ilm-init} policy chosen in <<profiling-ilm-custom-policy-create-policy,Step 1>>. | ||
|
||
|
||
If the custom policy is already applied, the result should include the following: | ||
|
||
[source,json] | ||
---- | ||
{ | ||
"in_use_by": { | ||
"indices": [ | ||
... | ||
], | ||
"data_streams": [ | ||
... | ||
"profiling-events-all", | ||
... | ||
], | ||
"composable_templates": [ | ||
"profiling-stackframes", | ||
"profiling-symbols-global", | ||
"profiling-metrics", | ||
"profiling-stacktraces", | ||
"profiling-executables", | ||
"profiling-hosts", | ||
"profiling-events" | ||
] | ||
} | ||
} | ||
---- | ||
|
||
If the result is empty, the custom {ilm-init} policy is not yet in use. New {ilm-init} policies only take effect when new indices are created, so either wait for a rollover to occur (usually after 30 days or when the index size reaches 50 GB), or force a rollover using the {ref}/indices-rollover-index.html[{es} rollover API]: | ||
|
||
|
||
[source,bash] | ||
---- | ||
POST /profiling-events-5pow01/_rollover/ | ||
POST /profiling-events-5pow02/_rollover/ | ||
POST /profiling-events-5pow03/_rollover/ | ||
POST /profiling-events-5pow04/_rollover/ | ||
POST /profiling-events-5pow05/_rollover/ | ||
POST /profiling-events-5pow06/_rollover/ | ||
POST /profiling-events-5pow07/_rollover/ | ||
POST /profiling-events-5pow08/_rollover/ | ||
POST /profiling-events-5pow09/_rollover/ | ||
POST /profiling-events-5pow10/_rollover/ | ||
POST /profiling-events-5pow11/_rollover/ | ||
POST /profiling-events-all/_rollover/ | ||
POST /profiling-executables/_rollover/ | ||
POST /profiling-hosts/_rollover/ | ||
POST /profiling-metrics/_rollover/ | ||
POST /profiling-stackframes/_rollover/ | ||
POST /profiling-stacktraces/_rollover/ | ||
POST /profiling-symbols-global/_rollover/ | ||
---- | ||
|
||
After the rollover, the custom {ilm-init} policy will be applied to new indices and data streams. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[profiling-manage-storage]] | ||
= Manage data storage | ||
|
||
|
||
Universal Profiling provides the following ways to manage how your data is stored. | ||
|
||
* <<profiling-index-lifecycle-management, Index lifecycle management>> automatically manages your indices according to age or size metric thresholds. Universal Profiling ships with a default index lifecycle policy, but you can create a custom policy to meet your requirements. | ||
* <<profiling-probabilistic-profiling, Probabilistic profiling>> mode uses representative samples of profiling data to reduce storage needs even further. | ||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a random fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I've moved this intentionally because, related to ILM, probabilistic profiling can be used to control how much storage profiling requires.