# Changing Logstash config file on the fly

**URL:** <https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508>\
**Category:** Logstash\
**Created:** [December 7, 2015, 9:43am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508 "2015-12-07T09:43:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spireofdreams](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@spireofdreams](https://discuss.elastic.co/u/spireofdreams)\
**Post date:** [December 7, 2015, 9:43am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508/1 "2015-12-07T09:43:59Z")

</div>

Is it possible to update a logstash conf file without restarting the logstash instance in the latest 2.1 version? e.g. if I am reading from one kafka topic, and in the meantime another topic has pushed some data, I need to start listening to both the topics. I can add the second one to white\_list, but for the change to take effect I have to restart ls. Also, I don't want to spawn new instance for each topic.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 7, 2015, 9:48am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508/2 "2015-12-07T09:48:11Z")

</div>

> Is it possible to update a logstash conf file without restarting the logstash instance in the latest 2.1 version?

Unfortunately not.

---

<div class="post-metadata">

**Author:** ![spireofdreams](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@spireofdreams](https://discuss.elastic.co/u/spireofdreams)\
**Post date:** [December 7, 2015, 10:02am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508/3 "2015-12-07T10:02:21Z")

</div>

Thank you. I need one more suggestion since it is not possible to update the conf file on the fly. If we have _n_ number of input topics and each one has same load, is it better to handle all of those using only one LS instance using conditional statements or to spawn a different conf file for each topic?

Also is there any upper limit on the number of input kafka topics to listen to using only one LS instance, or does it totally depend upon the nature of the stream?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 7, 2015, 10:16am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508/4 "2015-12-07T10:16:11Z")

</div>

> Thank you. I need one more suggestion since it is not possible to update the conf file on the fly. If we have n number of input topics and each one has same load, is it better to handle all of those using only one LS instance using conditional statements or to spawn a different conf file for each topic?

That depends on the value of _n_, I'd say. A Logstash instance has a single event pipeline so a clogged output will affect all messages, plus there are probably per-instance bottlenecks that one would be affected by even if the inputs and filters are threaded. That speaks for using multiple instances, but for _n_ \> 5 you're probably going to have a too large overhead.

> Also is there any upper limit on the number of input kafka topics to listen to using only one LS instance, or does it totally depend upon the nature of the stream?

I expect the number is only limited by memory and other resources. For example, I suspect that each kafka input will use at least one thread and one file descriptor.

---

<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 6, 2017, 5:19am UTC](https://discuss.elastic.co/t/changing-logstash-config-file-on-the-fly/36508/5 "2017-07-06T05:19:46Z")

</div>

Closed on July 6, 2017, 5:19am UTC


