forked from elastic/apm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] ILM documentation (elastic#2231)
- Loading branch information
1 parent
ae9cc67
commit 3825fb7
Showing
5 changed files
with
153 additions
and
8 deletions.
There are no files selected for viewing
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
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
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,131 @@ | ||
[[ilm]] | ||
[role="xpack"] | ||
== Index lifecycle management (ILM) | ||
|
||
Use the {ref}/getting-started-index-lifecycle-management.html[index lifecycle management (ILM)] | ||
feature in {es} to manage your APM Server indices as they age. | ||
ILM enables you to automate how you want to manage your indices over time, | ||
by automating rollovers to a new index when the existing index reaches a specified size or age. | ||
|
||
You can view and edit the index lifecycle policies in the *Index lifecycle policies* UI in {kib}. | ||
For more information about working with the UI, | ||
see {kibana-ref}/index-lifecycle-policies.html[Index lifecycle policies]. | ||
|
||
APM Server currently offers two ways to get started with ILM: | ||
|
||
1. <<ilm-default,**ILM default policy**>> - Get up and running with a default index lifecycle management policy as quickly as possible. | ||
2. <<manual-ilm-setup,**Manual ILM**>> - Customize and manage your own ILM policies. | ||
|
||
NOTE: If you're migrating from an existing setup, | ||
any indices present before ILM was configured will need to be managed manually. | ||
|
||
[[ilm-default]] | ||
=== ILM default policy | ||
|
||
Index lifecycle management will manage an index based on its defined policy. | ||
The default ILM configuration applies hot and warm phase policies. | ||
Cold and delete phases are not defined. | ||
Because errors and spans lose information value faster than metrics and transactions do, | ||
there are two different policies defined: | ||
one for `errors` and `spans`, and one for `metrics` and `transactions`. | ||
|
||
[options="header"] | ||
|======================================================================= | ||
|Event type |Hot |Warm | ||
|Errors & Spans | ||
|Rollover: `max_size: 50gb`, `max_age: 1 day`, | ||
`priority: 100` | ||
|`min_age: 7 days`, | ||
readonly, | ||
`priority: 50` | ||
|Transactions & Metrics | ||
|Rollover: `max_size: 50gb`, `max_age: 7 days`, | ||
`priority: 100` | ||
|`min_age: 31 days`, | ||
readonly, | ||
`priority: 50` | ||
|======================================================================= | ||
|
||
IMPORTANT: Changes to the default index lifecycle policy do not take effect until the current index has rolled over. | ||
If you'd like to manage a custom policy, see <<manual-ilm-setup,Manual ILM>>. | ||
|
||
[float] | ||
[[ilm-setup]] | ||
==== ILM default policy setup | ||
|
||
To set up index lifecycle management, set `ilm.enabled` to `true` in apm-server.yml. | ||
ILM can only be enabled for `output.elasticsearch`. | ||
When enabled, configurations defined for `output.elasticsearch.index` and `output.elasticsearch.indices` will be ignored. | ||
|
||
It is recommended to set up index lifecycle management (ILM) before starting APM Server. | ||
This excludes setup from the ingestion process, which allows you to ensure ILM is set up correctly before using APM. | ||
|
||
Run the <<setup-command>> with the ` --index-management` flag to set up the default ILM policy: | ||
|
||
[source,js] | ||
----------------------- | ||
./apm-server setup --index-management | ||
----------------------- | ||
// CONSOLE | ||
|
||
You can confirm the policy was created with the GET lifecycle policy API. | ||
Here's what the transaction response looks like: | ||
|
||
[source,js] | ||
----------------------- | ||
GET _ilm/policy | ||
{ | ||
"apm-7.2.0-transaction": { | ||
"version": 1, | ||
"modified_date": "2019-05-28T15:55:26.791Z", | ||
"policy": { | ||
"phases": { | ||
"warm": { | ||
"min_age": "31d",<1> | ||
"actions": { | ||
"readonly": {}, | ||
"set_priority": { | ||
"priority": 50 | ||
} | ||
} | ||
}, | ||
"hot": { | ||
"min_age": "0ms", | ||
"actions": { | ||
"rollover": { | ||
"max_size": "50gb",<2> | ||
"max_age": "7d"<3> | ||
}, | ||
"set_priority": { | ||
"priority": 100<4> | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
----------------------- | ||
// CONSOLE | ||
<1> Move to warm phase after _31 days_ | ||
<2> Rollover after _50gb_ | ||
<3> Rollover after _7 days_ | ||
<4> Priority for recovering your indices after a node restart. Higher priorities are recovered first. | ||
|
||
Your indices are now configured to use index lifecycle management. Go ahead and <<setting-up-and-running,run APM Server>>. | ||
|
||
NOTE: If you switch between ILM enabled/disabled multiple times, | ||
you should set `setup.template.overwrite` to `true` to ensure a complete setup. | ||
|
||
[float] | ||
==== ILM default policy upgrades | ||
|
||
If you decide to customize the default ILM policy, any customizations will be overwritten when you upgrade APM Server. | ||
Default policies are also subject to change in future releases | ||
|
||
// Policies are versioned so they can change. | ||
// Indices are versioned so they can change. | ||
// An upgrade creates new templates, policies, and indices. | ||
// If you customize anything, it will revert back to the default during an upgrade | ||
|
||
include::./ilm-setup.asciidoc[] |