# Index.translog.durability: async logstash

**URL:** https://discuss.elastic.co/t/index-translog-durability-async-logstash/90095
**Category:** Logstash
**Created:** [June 20, 2017, 12:40pm UTC](https://discuss.elastic.co/t/index-translog-durability-async-logstash/90095 "2017-06-20T12:40:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michielp](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@michielp](https://discuss.elastic.co/u/michielp)
#### Post date: [June 20, 2017, 12:40pm UTC](https://discuss.elastic.co/t/index-translog-durability-async-logstash/90095/1 "2017-06-20T12:40:51Z")

</div>

Hi,

Each morning I need to do the following two things:

First I set the translog to async state.

```
# curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{"index.translog.durability" : "async"}'

```

After that I restart the logstash. This solves my little problem that the elasticsearch slow is.

The question is how do I automate this?

I have tryed by setting:

```
elasticsearch {
    hosts => ["192.168.1.2", "192.168.1.3", "192.168.1.4"]   
    index => "indexname1-%{+YYYY.MM.dd}"                         
    template_name => "indexname1"                                
    template => "/opt/logstash/template/indexname1-template.json"
}

```

and /opt/logstash/template/indexname1-template.json has the setting:

```
{
  "template" : "indexname1-*",           
  "settings" : {                        
  "index.refresh_interval" : "5s",    
  "index.translog.durability": "async"
},                                    

```

Kind regards,

---

<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 18, 2017, 12:40pm UTC](https://discuss.elastic.co/t/index-translog-durability-async-logstash/90095/2 "2017-07-18T12:40:52Z")

</div>

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