-
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
Changes from 2 commits
c828d24
d569df8
927421c
9d4b474
48adda0
aa47855
b58fceb
eb2ec23
41d4ab5
a9c0a76
0461ec9
9c928be
633c5f0
c7335a8
f908b7d
60d5af0
d5fadfc
6f01171
926cbdb
cadef0b
38fb4e2
cd5341f
5a52675
e976631
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,138 @@ | ||||
[[profiling-index-lifecycle-management]] | ||||
= Index lifecycle management | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
Index lifecycle policies allow you to automate the lifecycle of your profiling indices as they grow and age. A default policy is applied, but can be customized depending on your business needs. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
See {ref}/index-lifecycle-management.html[Manage the index lifecycle] to learn more. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We might want to hold off on the link to start the page unless we want the user to leave the page right away. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, I've moved the link now to a tip cd5341f which appears in the context of creating a custom policy. |
||||
|
||||
[discrete] | ||||
[[profiling-ilm-default-policy]] | ||||
== Default policy | ||||
|
||||
Below we describe the default index lifecycle policy applied in Universal Profiling. The default policy includes a rollover and delete definition: | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
* **Rollover**: Using rollover prevents a single index from growing too large and optimizes indexing and search performance. Rollover, i.e. writing to a new index, occurs after either an age or size metric is met. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
* **Delete**: The delete phase permanently removes the index after a time threshold is met. | ||||
|
||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
[cols="1,1,1",options="header"] | ||||
|=== | ||||
|Rollover after | ||||
|Warm tier after | ||||
|Delete after | ||||
|
||||
| 30 days / 50 GB | ||||
| 30 days | ||||
| 60 days | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
|=== | ||||
|
||||
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. | ||||
|
||||
The Universal Profiling index lifecycle policy can be viewed in {kib}. Navigate to *{stack-manage-app}* / *Index Lifecycle Management*, and search for `profiling`. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
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
|
||||
[discrete] | ||||
[[profiling-ilm-custom-policy-create-policy]] | ||||
=== Step 1: Create an index lifecycle policy | ||||
|
||||
. Navigate to **{stack-manage-app}** > **Index Lifecycle Policies**. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
. Click **Create policy**. | ||||
|
||||
Name your new policy, for example `custom-profiling-policy`. Customize the policy to your liking, and when you're done, click **Save policy**. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
[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: The custom {ilm-init} policy will only be applied if the component template is named `profiling-ilm@custom`. Other names are not supported. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
|
||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
. Click on the **Component Template** tab and click **Create component template**. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
. Pick `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" | ||||
} | ||||
} | ||||
---- | ||||
. Click **Next** until the **Review** step and ensure your request looks similar to the image below. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
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 step 1 above. | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
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, then the custom {ilm-init} policy is not yet in use. New {ilm-init} policies only take effect when new indices are created, so you either must 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]: | ||||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
[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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[profiling-manage-storage]] | ||
= Manage Storage | ||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Universal Profiling uses lifecycle management to automatically age data. It ships with a default index lifecycle policy but it is possible to customize the index lifecycle to your requirements. With <<profiling-probabilistic-profiling, probabilistic profiling>> it is possible to configure the Universal Profiling agent to run in probabilistic profiling mode and reduce storage even further. | ||
danielmitterdorfer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
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.