Migrate data from Hot to Warm

  1. In Kibana dashboard, navigate to ‘Dev Tools’ tab from the burger menu.

    The beow command will list all the indices on your domain along with its size.

GET _cat/indices
  1. Use the following command to check the index settings
GET kibana_sample_data_logs/_settings

The output should look simalir to

{
  "kibana_sample_data_logs" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "auto_expand_replicas" : "0-1",
        "provided_name" : "kibana_sample_data_logs",
        "creation_date" : "1614886940796",
        "number_of_replicas" : "0",
        "uuid" : "U05NoDJtRgaXMsuBAGpweQ",
        "version" : {
          "created" : "7090199"
        }
      }
    }
  }
}
  1. Migrate the index to Ultrawarm using the below command
POST _ultrawarm/migration/kibana_sample_data_logs/_warm

You should get a response with return code 200 - success and an aknowledgement as below.

{
  "acknowledged" : true
}
  1. When the migration is happening from ‘Hot’ to ‘Warm’ you can check the migration status as below.
GET _ultrawarm/migration/kibana_sample_data_logs/_status

You should see an output as mentioned below

{
  "migration_status" : {
    "index" : "kibana_sample_data_logs",
    "state" : "PENDING_SHARD_RELOCATION",
    "migration_type" : "HOT_TO_WARM"
  }
}

Be aware that the sample data is very small and index migration can happen very quickly. If index migration is already over, you should see an output idicating that there are no active migrations for the index specified.

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Index [kibana_sample_data_logs] has no active migrations"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Index [kibana_sample_data_logs] has no active migrations"
  },
  "status" : 400
}
  1. Execute the command to display index settings again to validate whether index is migrated to Ultrawatm
GET kibana_sample_data_logs/_settings

You should see an output similar to as mentioned below this time. The parameter "box_type" : "warm" indicates that index is migrated to Ultrawarm

{
  "kibana_sample_data_logs" : {
    "settings" : {
      "index" : {
        "refresh_interval" : "-1",
        "auto_expand_replicas" : "false",
        "blocks" : { },
        "provided_name" : "kibana_sample_data_logs",
        "creation_date" : "1614886940796",
        "unassigned" : {
          "node_left" : {
            "delayed_timeout" : "5m"
          }
        },
        "number_of_replicas" : "1",
        "uuid" : "U05NoDJtRgaXMsuBAGpweQ",
        "version" : {
          "created" : "7090199"
        },
        "routing" : {
          "allocation" : {
            "require" : {
              "box_type" : "warm"
            }
          }
        },
        "number_of_shards" : "1",
        "merge" : {
          "policy" : {
            "max_merge_at_once_explicit" : "50"
          }
        }
      }
    }
  }
}
  1. You can run the following commands to list the indices in ‘Hot’ and ‘Warm’
GET _cat/indices/_hot
GET _cat/indices/_warm

You will notice that the index kibana_sample_data_logs is listed under warm and rest of the indices are listed under hot'

Congratulations! You have migrated the index to Ultrawarm. Now you can explore the data!