# Indices naming

**URL:** <https://discuss.elastic.co/t/indices-naming/64621>\
**Category:** Elasticsearch\
**Created:** [November 1, 2016, 7:31pm UTC](https://discuss.elastic.co/t/indices-naming/64621 "2016-11-01T19:31:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjs6891](https://avatars.discourse-cdn.com/v4/letter/c/5daacb/32.png) [@cjs6891](https://discuss.elastic.co/u/cjs6891)\
**Post date:** [November 1, 2016, 7:31pm UTC](https://discuss.elastic.co/t/indices-naming/64621/1 "2016-11-01T19:31:05Z")

</div>

while using ELK 2.4 my indice directories would be created as follows: "logstash-YYYY-MM-DD". ELK 5 is creating them with some random string, ex. "ELK\_5.0/elasticsearch-5.0.0/data/nodes/0/indices/wsCmtji0QCy8K0B5JyTuvQ"

how can I get ELK to name them as it did on version 2.4?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 1, 2016, 7:56pm UTC](https://discuss.elastic.co/t/indices-naming/64621/3 "2016-11-01T19:56:13Z")

</div>

Sorry, I was about to reply in one way when I saw what you were really asking. Index naming is in the metadata now, not in the directory path.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 1, 2016, 8:07pm UTC](https://discuss.elastic.co/t/indices-naming/64621/4 "2016-11-01T20:07:10Z")

</div>

Out of curiosity, why would you need access to the Lucene data structures in the directory paths?

---

<div class="post-metadata">

**Author:** ![cjs6891](https://avatars.discourse-cdn.com/v4/letter/c/5daacb/32.png) [@cjs6891](https://discuss.elastic.co/u/cjs6891)\
**Post date:** [November 1, 2016, 8:28pm UTC](https://discuss.elastic.co/t/indices-naming/64621/5 "2016-11-01T20:28:12Z")

</div>

I'm using ELK to index my nginx logs. I have limited disk space and use a bash script to delete the indice directories \> 14 days old

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 1, 2016, 8:44pm UTC](https://discuss.elastic.co/t/indices-naming/64621/6 "2016-11-01T20:44:56Z")

</div>

> [@cjs6891](#):
>
> I have limited disk space and use a bash script to delete the indice directories \> 14 days old

That's what [Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html) was created for. See the [delete\_indices example configuration](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_delete_indices.html), and the [space](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/filtertype_space.html) filter type, so you can define an amount of space to keep.

---

<div class="post-metadata">

**Author:** ![cjs6891](https://avatars.discourse-cdn.com/v4/letter/c/5daacb/32.png) [@cjs6891](https://discuss.elastic.co/u/cjs6891)\
**Post date:** [November 1, 2016, 8:55pm UTC](https://discuss.elastic.co/t/indices-naming/64621/7 "2016-11-01T20:55:41Z")

</div>

awesome, thx for you help I appreciate it.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 1, 2016, 8:57pm UTC](https://discuss.elastic.co/t/indices-naming/64621/8 "2016-11-01T20:57:27Z")

</div>

By the way, I don't know the contents of your bash script, but if you were deleting the directories with `rm`, that is not healthy for Elasticsearch. Use API calls (or a tool like Curator which uses API calls) to modify anything in Elasticsearch.

---

<div class="post-metadata">

**Author:** ![cjs6891](https://avatars.discourse-cdn.com/v4/letter/c/5daacb/32.png) [@cjs6891](https://discuss.elastic.co/u/cjs6891)\
**Post date:** [November 3, 2016, 2:27am UTC](https://discuss.elastic.co/t/indices-naming/64621/9 "2016-11-03T02:27:26Z")

</div>

OK, I'm going to try Curator; also just beginning to familiarize myself with the API... I wrote a hand full of bash scripts to parse & analyze our logs prior to ELK, only been using it for about a month as a side project. Again I appreciate your advice & would be interested in anything else you'd be willing to share.

---

<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:** [July 5, 2017, 10:07pm UTC](https://discuss.elastic.co/t/indices-naming/64621/10 "2017-07-05T22:07:05Z")

</div>


