anchor.diff:  [[ilm-gs-bootstrap]]
   === Bootstrap the initial time-series index
   
  -To get things started, you need to bootstrap an initial index and 
  -designate it as the write index for the rollover alias specified in your index template. 
  -The name of this index must match the template's index pattern and end with a number. 
  -On rollover, this value is incremented to generate a name for the new index. 
  -
  -For example, the following request creates an index called `datastream-000001` 
  -and makes it the write index for the `datastream` alias.
  -
  -[source,console]
  ------------------------
  -PUT datastream-000001
  +To get things started, you need to bootstrap an initial index and
  +designate it as the write index for the rollover alias specified in your index template.
  +The name of this index must match the template's index pattern and end with a number.
  +On rollover, this value is incremented to generate a name for the new index.
  +
  +For example, the following request creates an index called `timeseries-000001`
  +and makes it the write index for the `timeseries` alias.
  +
  +[source,console]
  +-----------------------
  +PUT timeseries-000001
   {
     "aliases": {
  -    "datastream": {
  +    "timeseries": {
         "is_write_index": true
       }
     }
  
positive.code: [[ilm-gs-check-progress]]
  === Checking progress
  
  To get status information for managed indices, you use the {ilm-init} explain API. 
  This lets you find out things like:
  
  * What phase an index is in and when it entered that phase.
  * The current action and what step is being performed.
  * If any errors have occurred or progress is blocked.
  
  For example, the following request gets information about the `datastream` indices: 
  
  [source,console]
  --------------------------------------------------
  GET datastream-*/_ilm/explain
  --------------------------------------------------
  // TEST[continued]
  
  The response below shows that the bootstrap index is waiting in the `hot` phase's `rollover` action.
  It remains in this state and {ilm-init} continues to call `attempt-rollover` 
  until the rollover conditions are met. 
  
  [[36818c6d9f434d387819c30bd9addb14]]
  [source,console-result]
  --------------------------------------------------
  {
    "indices": {
      "datastream-000001": {
        "index": "datastream-000001",
        "managed": true,                           
        "policy": "datastream_policy",             <1>
        "lifecycle_date_millis": 1538475653281,
        "age": "30s",                              <2>
        "phase": "hot",                            
        "phase_time_millis": 1538475653317,
        "action": "rollover",                      
        "action_time_millis": 1538475653317,
        "step": "attempt-rollover",                <3>
        "step_time_millis": 1538475653317,
        "phase_execution": {
          "policy": "datastream_policy",
          "phase_definition": {                    <4>
            "min_age": "0ms",
            "actions": {
  
negative.code: [[ilm-gs-apply-policy]]
  === Create an index template to apply the lifecycle policy
  
  To automaticaly apply a lifecycle policy to the new write index on rollover,
  specify the policy in the index template used to create new indices.
  
  For example, the following request creates a `timeseries_template` that is applied to new indices
  whose names match the `timeseries-*` index pattern.
  The template configures two {ilm-init} settings:
  
  * `index.lifecycle.name` specifies the name of the lifecycle policy to apply to all new indices that match
  the index pattern.
  * `index.lifecycle.rollover_alias` specifies the index alias to be rolled over
  when the rollover action is triggered for an index.
  
  [source,console]
  -----------------------
  PUT _template/timeseries_template
  {
    "index_patterns": ["timeseries-*"],                 <1>
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "timeseries_policy",      <2>
      "index.lifecycle.rollover_alias": "timeseries"    <3>
    }
  }
  -----------------------
  // TEST[continued]
  
  <1> Apply the template to a new index if its name starts with `timeseries-`.
  <2> The name of the lifecycle policy to apply to each new index.
  <3> The name of the alias used to reference these indices.
  Required for policies that use the rollover action.
  
  //////////////////////////
  
  [source,console]
  --------------------------------------------------
  DELETE /_template/timeseries_template
  --------------------------------------------------
  // TEST[continued]
  
  