title: How to configure logstash to create an elasticsearch index?
body: <p>elasticsearch version: elasticsearch-2.2.0.rpm
  logstash version: logstash-2.2.2-1.noarch.rpm</p>
  
  <p>I start elasticsearch, then logstash with /etc/logstash/conf.d/logstash.conf having a basic stdin/stdout, but no elasticsearch index is created. If I add the following to my logstash output configuration I get an index that indicates a yellow status:</p>
  
  <p>action => "create"
  index => "main_index"</p>
  
  <p>The reason it's yellow, and not usable, is because the number of shards is 5 and replicas is 3. If I run:</p>
  
  <p>curl -XPUT '<a href="http://localhost:9200/index2/" rel="nofollow">http://localhost:9200/index2/</a>' -d '
  index :
     number_of_shards : 1
     number_of_replicas : 0
  '</p>
  
  <p>"index2" is green and usable. How do I tell either logstash and/or elasticsearch that I want my index to have 1 shard with 0 replicas without issuing a curl command?</p>
  
  <p>Thanks.</p>