ILM shrink and warm node

I have setup ILM policy with shrink but not working. what am I missing

PUT _ilm/policy/metricbeat
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "120gb",
            "max_age": "30d"
          }
        }
      },
      "warm": {
        "min_age": "30d",
        "actions": {
          "set_priority": {
            "priority": 50
          },
          "shrink": {
            "number_of_shards": 2
          },
          "allocate": {
            "number_of_replicas": 0
          }
        }
      }
    }
  }
}

I also want this to move to warm node which I have define via Elasticsearch.yml

# grep node.role /etc/elasticsearch/elasticsearch.yml
node.roles: [data_warm]

this does not seems to be taking place. which step did I miss.
ILM policy is being executed because my data has 0 replica

anyone any idea?

How many shards does your index originally have?

Six

I want that to be shrink to 2

Do you have anything in the logs, probably the in the master node logs?

What happens when you try to shrink the index using the shrink API, any error? Can you try that?

this message on elastic log. and it does removes replica for this index.
but not shrink it


[2021-12-20T10:38:05,566][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.12.19-000075] from [{"phase":"hot","action":"rollover","name":"set-indexing-complete"}] to [{"phase":"hot","action":"complete","name":"complete"}] in policy [metricbeat]

I have four node with warm node setup

node.roles: [data_warm]

As test I went and change warm phase from 30 to 29 and here is new message pop up. it looks like it move to warm but no shrink

[2021-12-20T19:19:19,719][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [houelkm12] updating index lifecycle policy [g2insight-sys]
[2021-12-20T19:19:20,332][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"hot","action":"complete","name":"complete"}] to [{"phase":"warm","action":"set_priority","name":"set_priority"}] in policy [metricbeat]
[2021-12-20T19:19:20,748][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"set_priority","name":"set_priority"}] to [{"phase":"warm","action":"unfollow","name":"branch-check-unfollow-prerequisites"}] in policy [metricbeat]
[2021-12-20T19:19:20,823][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"unfollow","name":"branch-check-unfollow-prerequisites"}] to [{"phase":"warm","action":"allocate","name":"allocate"}] in policy [metricbeat]
[2021-12-20T19:19:20,902][INFO ][o.e.c.m.MetadataUpdateSettingsService] [houelkm12] updating number_of_replicas to [0] for indices [metricbeat-7.12.0-2021.11.22-000034]
[2021-12-20T19:19:21,179][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"allocate","name":"allocate"}] to [{"phase":"warm","action":"allocate","name":"check-allocation"}] in policy [metricbeat]
[2021-12-20T19:19:22,677][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"allocate","name":"check-allocation"}] to [{"phase":"warm","action":"migrate","name":"branch-check-skip-action"}] in policy [metricbeat]
[2021-12-20T19:19:22,679][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"migrate","name":"branch-check-skip-action"}] to [{"phase":"warm","action":"migrate","name":"migrate"}] in policy [metricbeat]

[2021-12-20T19:19:23,598][INFO ][o.e.x.i.IndexLifecycleTransition] [houelkm12] moving index [metricbeat-7.12.0-2021.11.22-000034] from [{"phase":"warm","action":"migrate","name":"migrate"}] to [{"phase":"warm","action":"migrate","name":"check-migration"}] in policy [metricbeat]

it is so weird. last night index just got shrink after I change warm phase date from 30 to 29

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.