title: ILM using Logstash Elasticsearch output plugin doesn't work
body: <p>I'm trying to implement ILM for an index to properly use hardware, using the Elasticsearch output plugin. Looks like I misunderstand how Logstash manages ILM.</p>
  
  <p>I have ELK stack version 7.1.0 in docker. X-Pack is activated by trial license.</p>
  
  <p>The index template is managed by Logstash Elasticsearch output plugin and the index lifecycle policy was created using Kibana.</p>
  
  <p>Here is the output section of Logstash pipeline:</p>
  
  <pre><code>output {
      elasticsearch {
          hosts =&gt; ["http://eshost:9200"]
          user =&gt; "logstash_writer"
          password =&gt; "pass"
          template =&gt; "/usr/share/logstash/es_templates/ilm-template.json"
          template_name =&gt; "ilm-template"
          template_overwrite =&gt; true
          ilm_enabled =&gt; true
          ilm_rollover_alias =&gt; "ilm-index"
          ilm_pattern =&gt; "000001"
          ilm_policy =&gt; "base-policy"
      }
  }
  </code></pre>
  
  <p>User <code>logstash_writer</code> has default role <code>logstash_writer</code> with permissions for ILM management.</p>
  
  <p>Elasticsearch index template <code>ilm-template.json</code>:</p>
  
  <pre><code>{
    "settings" : {
      "index.number_of_replicas" : "1",
      "index.number_of_shards" : "1",
      "index.refresh_interval" : "5s"
    }
  }
  </code></pre>
  
  <p>Elasticsearch index template <code>_template/ilm-template</code> that was actually created by Logstash:</p>
  
  <pre><code>{
    "ilm-template" : {
      "order" : 0,
      "index_patterns" : [
        "ilm-index-*"
      ],
      "settings" : {
        "index" : {
          "lifecycle" : {
            "name" : "base-policy",
            "rollover_alias" : "ilm-index"
          },
          "refresh_interval" : "5s",
          "number_of_shards" : "1",
          "number_of_replicas" : "1"
        }
      },
      "mappings" : { },
      "aliases" : { }
    }
  }
  </code></pre>
  
  <p>Policy <code>base-policy</code> created using Kibana:</p>
  
  <pre><code>{
      "policy": {
          "phases": {
              "hot": {
                  "min_age": "0ms",
                  "actions": {
                      "rollover": {
                          "max_size": "100mb",
                          "max_docs": 100000
                      },
                      "set_priority": {
                          "priority": 100
                      }
                  }
              },
              "delete": {
                  "min_age": "2d",
                  "actions": {
                      "delete": {}
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I expect the set of indices <code>ilm-index-*</code>, but only <code>ilm-index-000001</code> is created and constantly growing, despite the limitations of <code>base-policy</code>. So I only see in Kibana one index (<code>ilm-index-000001</code>) associated with <code>base-policy</code>.</p>