# Logstash taking too long to process data

**URL:** <https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096>\
**Category:** Logstash\
**Created:** [January 18, 2017, 11:13pm UTC](https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096 "2017-01-18T23:13:33Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![jstar](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jstar](https://discuss.elastic.co/u/jstar)\
**Post date:** [February 2, 2017, 4:11pm UTC](https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096/21 "2017-02-02T16:11:29Z")

</div>

@Christian_Dahlqvist, I'm used

```
curl -u user:password -XPUT elasticsearchip1:9200_template/template_1 -d '{"template": "*","settings": {"number_of_shards": 1},"mappings": {"type1": {"_source": {"enabled": false},"properties": {"host_name": {"type": "keyword"},"created_at": {"type": "date","format": "EEE MMM dd HH:mm:ss Z YYYY"}}}}}'

```

To define a template for all indexes create automatically depending on the field **source** but this is not working. I still have index created automatically with the shard set to **5**.

Is there another way to get that done?

Now regarding changing of hardware, I will first reduced the shards and see how it behave because I don't want to get in a situation were I'm buying a new hard drive and the situation doesn't changes.

Thanks.

---

<div class="post-metadata">

**Author:** ![jstar](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jstar](https://discuss.elastic.co/u/jstar)\
**Post date:** [February 2, 2017, 10:09pm UTC](https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096/22 "2017-02-02T22:09:41Z")

</div>

My bad instead of

> [@jstar](#):
>
> curl -u user:password -XPUT elasticsearchip1:9200\_template/template\_1 -d '{"template": "\*","settings": {"number\_of\_shards": 1},"mappings": {"type1": {"\_source": {"enabled": false},"properties": {"host\_name": {"type": "keyword"},"created\_at": {"type": "date","format": "EEE MMM dd HH:mm:ss Z YYYY"}}}}}'

I should have rather do

curl -u user:password -XPUT elasticsearchip1:9200\*\*/\*\*\_template/template\_1 -d '{"template": "\*","settings": {"number\_of\_shards": 1},"mappings": {"type1": {"\_source": {"enabled": false},"properties": {"host\_name": {"type": "keyword"},"created\_at": {"type": "date","format": "EEE MMM dd HH:mm:ss Z YYYY"}}}}}'

Notice the absence of **/**.

Now I'm having a stats of 845299 logs in 176996ms=2.9minutes from logstash which is acceptable.

Thanks @Christian_Dahlqvist and @guyboertje you know your things 😉

---

<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:** [March 2, 2017, 10:10pm UTC](https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096/23 "2017-03-02T22:10:08Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/logstash-taking-too-long-to-process-data/72096.md?page=1)
