# Index settings in logstash pipeline

**URL:** https://discuss.elastic.co/t/index-settings-in-logstash-pipeline/267882
**Category:** Logstash
**Tags:** ilm-index-lifecycle-management
**Created:** [March 20, 2021, 11:01am UTC](https://discuss.elastic.co/t/index-settings-in-logstash-pipeline/267882 "2021-03-20T11:01:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Automation\_Scripts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/automation_scripts/32/85374_2.png) [@Automation\_Scripts](https://discuss.elastic.co/u/Automation_Scripts)
#### Post date: [March 20, 2021, 11:01am UTC](https://discuss.elastic.co/t/index-settings-in-logstash-pipeline/267882/1 "2021-03-20T11:01:13Z")

</div>

Hi guys,

I have a logstash pipeline and i want to be able to set the number of replicas to 0 directly from my logstash.conf file. How can I do this? I have seen some docs with template, but is not working. The one from bellow is not changing the index. I've deleted it and retry but without luck.

```auto
    input {
      kafka {
        bootstrap_servers => "kafkaserver:9092"
        topics => ["sit.catalogue.item","uat.catalogue.item"]
        auto_offset_reset => "earliest"
        decorate_events => true
      }
    }
    output {
      elasticsearch {
        hosts => ["elasticsearch:9200"]
        index => "%{[indexPrefix]}-logs-%{+YYYY.MM.dd}"
        template => "index.json"
        template_name => "*-logs-*"
        template_overwrite => "false"
      }
    }

```

In my index.json I have

```auto
    {
        "template": "*-log-*",
        "settings": {
            "number_of_shards": 1,
            "number_of_replicas" : 0
        }
    }

```

The files are in the same folder:  
 ![Screenshot 2021-03-20 at 1.01.58 PM](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54db5babcd0c8b3997485211ed5ac75df8cbef99.png)  
Thank you!

---

<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: [April 17, 2021, 11:01am UTC](https://discuss.elastic.co/t/index-settings-in-logstash-pipeline/267882/2 "2021-04-17T11:01:44Z")

</div>

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