title: How to set document_id in elastic using logstash config file
body: <p>I want to pass dynamic value to document_id in elastic using my log file.
  Example -(xx.log file)</p>
  
  <pre><code>{"level":"info","item_id":"123","message":"Hii","timestamp":"2017-02-02T08:32:09.535Z"}
  </code></pre>
  
  <p>I want to pass my log file field value "item_id" in my elastic "document_id" value, and my logstash.conf output section file -</p>
  
  <pre><code>output {
      stdout { codec =&gt; rubydebug }
        elasticsearch {
             host =&gt; "localhost" 
             document_id =&gt; "%{item_id}"
        }
   }
  </code></pre>