# Creation Index

**URL:** <https://discuss.elastic.co/t/creation-index/132957>\
**Category:** Elasticsearch\
**Created:** [May 23, 2018, 9:01am UTC](https://discuss.elastic.co/t/creation-index/132957 "2018-05-23T09:01:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charaf\_Ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charaf_ahmed/32/30467_2.png) [@Charaf\_Ahmed](https://discuss.elastic.co/u/Charaf_Ahmed)\
**Post date:** [May 23, 2018, 9:01am UTC](https://discuss.elastic.co/t/creation-index/132957/1 "2018-05-23T09:01:01Z")

</div>

Hello, I have a very naive question but I can not find a solution.

By launching logstash with this config file (just after), it creates several indexes in elasticsearch.

```
input {
   file {
       path => "/home/ahmed/Bureau/access.log"
       start_position => "beginning"
   }
}

filter {

grok {
  match => { "message" => "%{COMBINEDAPACHELOG}" }
}

date {
  match => ["timestamp" , "dd/MMM/yyyy:HH:mm:ss Z"]
}

geoip { source => "clientip" }

} output {
  elasticsearch { 
 hosts => ["localhost:9200"]
index => "log-%{+YYYY.MM.dd}"
  } 
 stdout { codec => rubydebug }
}

```

Why is it so?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 26, 2018, 6:51am UTC](https://discuss.elastic.co/t/creation-index/132957/2 "2018-05-26T06:51:50Z")

</div>

> [@Charaf\_Ahmed](#):
>
> index =\> "log-%{+YYYY.MM.dd}"

This tells the elasticsearch plugin to create one index per day with the date in the index name.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 23, 2018, 7:06am UTC](https://discuss.elastic.co/t/creation-index/132957/3 "2018-06-23T07:06:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
