ILM default policyedit

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.

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

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.

Enable ILMedit

ILM can be enabled/disabled via the ilm.enabled configuration option. Starting in v7.3, ilm.enabled is set to "auto" by default.

If you switch between ILM enabled/disabled multiple times, you should set setup.template.overwrite to true to ensure a complete setup.

ilm.enabled: "auto"edit

"auto" means APM Server will attempt to enable ILM based on the following conditions:

  • output.elasticsearch must be enabled. If any other output is configured, ILM will be disabled.
  • The Elasticsearch instance must support ILM. If it does not, ILM will be disabled.
  • Custom index or indices settings cannot be configured. If custom index settings are configured, ILM will be disabled, as it only works with default index settings.

If all three of the above conditions are true, ILM will be enabled.

ilm.enabled: trueedit

You can explicitly set ilm.enabled to true. When this happens, the APM Server ignores any configured index settings. The configured output must still be set to Elasticsearch and the instance still needs to support ILM. If not, APM Server falls back to ordinary index management without ILM, and an error is logged.

ilm.enabled: falseedit

ILM can be explicitly disabled by setting ilm.enabled to false.

ILM default policy setupedit

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:

./apm-server setup --index-management

You can confirm the policy was created with the GET lifecycle policy API. Here’s what the transaction response looks like:

GET _ilm/policy
    "apm-7.2.0-transaction": {
        "version": 1,
        "modified_date": "2019-05-28T15:55:26.791Z",
        "policy": {
            "phases": {
                "warm": {
                    "min_age": "31d",
                    "actions": {
                        "readonly": {},
                        "set_priority": {
                            "priority": 50
                "hot": {
                    "min_age": "0ms",
                    "actions": {
                        "rollover": {
                            "max_size": "50gb",
                            "max_age": "7d"
                        "set_priority": {
                            "priority": 100

Move to warm phase after 31 days

Rollover after 50gb

Rollover after 7 days

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 run APM Server.

ILM default policy upgradesedit

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