kibana/x-pack/plugins/index_lifecycle_management
Yulia Čech 64b8b88c64
[ILM] TS conversion of Edit policy components (#74747)
* [ILM] Convert node allocation component to TS and use hooks

* [ILM] Fix jest tests

* [ILM] Fix i18n check

* [ILM] Implement code review suggestions

* [ILM] Fix type check, docs link and button maxWidth in NodeAllocation component

* Fix internaliation error

* [ILM] Convert node details flyout to TS

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node attributes

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] Delete a period in error callout

* [ILM] Convert node details flyout to TS

* [ILM] Fix i18n check

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] edit components

* [ILM] Fix review suggestions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 23:12:01 +02:00
..
__jest__ Upgrade EUI to v27.4.0 (#74004) 2020-08-14 10:31:15 -06:00
common/constants [New Platform Migration]: Management - Implement NP API (#66781) 2020-06-03 18:55:06 +03:00
public [ILM] TS conversion of Edit policy components (#74747) 2020-08-14 23:12:01 +02:00
server Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091) 2020-08-05 17:32:19 +02:00
kibana.json [kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911) 2020-07-09 18:43:17 -07:00
README.md

Index Lifecycle Management

Quick steps for testing ILM in Index Management

You can test that the Frozen badge, phase filtering, and lifecycle information is surfaced in Index Management by running this series of requests in Console:

PUT /_ilm/policy/full
{
  "policy": {
    "phases" : {
      "hot" : {
        "min_age" : "0ms",
        "actions" : {
          "rollover" : {
            "max_docs" : 1
          }
        }
      },
      "warm" : {
        "min_age" : "15s",
        "actions" : {
          "forcemerge" : {
            "max_num_segments" : 1
          },
          "shrink" : {
            "number_of_shards" : 1
          }
        }
      },
      "cold" : {
        "min_age" : "30s",
        "actions" : {
          "freeze": {}
        }
      },
      "delete" : {
        "min_age" : "1d",
        "actions" : {
          "delete" : { }
        }
      }
    }
  }
}

PUT _template/test
{
  "index_patterns": ["test-*"],
  "settings": {
    "number_of_shards": 3,
    "number_of_replicas": 0,
    "index.lifecycle.name": "full",
    "index.lifecycle.rollover_alias": "test-alias"
  }
}

PUT /test-000001
{
  "aliases": {
    "test-alias": {
      "is_write_index": true
    }
  }
}

PUT test-alias/_doc/1
{
  "a": "a"
}

PUT /_cluster/settings
{
  "transient": {
    "logger.org.elasticsearch.xpack.core.indexlifecycle": "TRACE",
    "logger.org.elasticsearch.xpack.indexlifecycle": "TRACE",
    "logger.org.elasticsearch.xpack.core.ilm": "TRACE",
    "logger.org.elasticsearch.xpack.ilm": "TRACE",
    "indices.lifecycle.poll_interval": "10s"
  }
}

Then go into Index Management and, after about 1 minute, you'll see a frozen index and you'll be able to filter by the various lifecycle phases and statuses.

image

Next, add the Kibana sample data and attach the full policy to the index that gets created. After about a minute, there should be an error on this index. When you click the index you'll see ILM information in the detail panel as well as an error. You can dismiss the error by clicking Manage > Retry lifecycle step.

image