title: Logstash not replacing "%type" with value
body: <p>Hello I have this configuration for a logstash running on my computer :</p>
  <pre><code>input {
      exec {
          command =&gt; &quot;powershell -executionpolicy unrestricted -f scripts/windows/process.ps1 command logstash&quot;
          interval =&gt; 30
          type =&gt; &quot;process_data&quot;
          codec =&gt; line
          tags =&gt; [ logstash&quot; ]
      }
  }
  
  output
  {
      if &quot;sometype-logs&quot; in [tags] {
          elasticsearch {
          action =&gt; &quot;index&quot;
          doc_as_upsert =&gt; true
          index =&gt; &quot;sometype-logs-%{+YYYY.MM.dd}&quot;
          hosts =&gt; &quot;locahost:9200&quot;
          template_overwrite =&gt; true
      }
  } else {
      elasticsearch {
      action =&gt; &quot;index&quot;
      doc_as_upsert =&gt; true
      index =&gt; &quot;%{type}&quot;
      hosts =&gt; &quot;localhost:9200&quot;
      template_overwrite =&gt; true
  }
  }
  </code></pre>
  <p>When displaying indexes I have :</p>
  <p><a href="https://i.stack.imgur.com/UYgl1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UYgl1.png" alt="enter image description here" /></a></p>
  <p>Why is index name is &quot;%type&quot; and not &quot;process_data&quot; ?</p>