doc-exports/docs/css/umn/css_01_0093.html
Zheng, Xiu 0c90df93b1 CSS UMN 20230404 Version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2023-04-05 08:45:09 +00:00

6.4 KiB

Creating and Managing Indices

Clusters of versions 7.6.2, 7.9.3 and 7.10.2 support index status management (ISM). ISM is a plugin that allows you to automate periodic and administrative operations based on changes on the index age, index size, or number of documents. When using the ISM plug-in, you can define policies that automatically handle index rolleovers or deletions based on your needs.

The following procedure uses Kibana 7.6.2 as an example. The Kibana UI varies depending on the Kibana version, but their operations are similar.

Creating an Index Policy

  1. Log in to Kibana and choose IM or Index Management on the left. The Index Management page is displayed.
    Figure 1 Choosing IM
  2. Click Create policy to create an index policy.
  3. Enter a policy ID in the Policy ID text box and enter your policy in the Define policy text box.
    Figure 2 Configuring a policy
  4. Click Create.

    After you create a policy, attach the policy to one or more indices. You can also include policy_id in an index template, so when you create an index that matches the index template pattern, the policy is attached to the index.

    For details about how to create an index template, see Index Templates.

    PUT _template/<template_name> 
    {
        "index_patterns": [
            "index_name-*"
        ],
        "settings": {
            "opendistro.index_state_management.policy_id": "policy_id"
        }
    }
    • <template_name>: Replace it with the name of the created index template.
    • policy_id: Replace it with the policy ID created in 3.

Attach the policy to an index.

  1. Click Indices.
    Figure 3 Choosing Indices
  2. In the Indices list, select the target index to which you want to attach the policy.
  3. Click Apply policy in the upper right corner.
    Figure 4 Adding a policy
  4. Select the policy you created from the Policy ID drop-down list.
    Figure 5 Selecting a policy
  5. Click Apply.

    After you attach a policy to an index, ISM creates a job that runs every five minutes by default, to execute the policy, check conditions, and convert the index to different statuses.

Managing Indices

  1. Click Managed Indices.
  2. If you want to change the policy, click Change policy. For details, see Changing Policies.
  3. To delete a policy, select your policy, and click Remove policy.
  4. To retry a policy, select your policy, and click Retry policy.

For details, see Index State Management.