# Can we pass a directory including multiples configuration files from different sources?

**URL:** <https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057>\
**Category:** Logstash\
**Created:** [June 16, 2016, 8:43pm UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057 "2016-06-16T20:43:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanshan](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nanshan](https://discuss.elastic.co/u/nanshan)\
**Post date:** [June 16, 2016, 8:43pm UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057/1 "2016-06-16T20:43:53Z")

</div>

I am trying to build a elk stack.

Under /etc/logstash/conf.d, I have several configration files, a.conf, b.conf.

How to start logstash and pass both of the files, or can I just pass the direcory ?

---

<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:** [June 17, 2016, 5:39am UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057/2 "2016-06-17T05:39:36Z")

</div>

As documented you can just pass the directory. All files will effectively be concatenated, i.e. events from all inputs in a.conf will be processed by filters and outputs in both a.conf and b.conf. If you don't want that you need to use conditionals.

---

<div class="post-metadata">

**Author:** ![nanshan](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nanshan](https://discuss.elastic.co/u/nanshan)\
**Post date:** [June 17, 2016, 7:17pm UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057/3 "2016-06-17T19:17:33Z")

</div>

which way do we usually prefer ?

---

<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:** [June 20, 2016, 5:35am UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057/4 "2016-06-20T05:35:31Z")

</div>

That's up to you, but _I_ prefer passing a directory name to avoid having to maintain both the configuration files themselves and the list of their names.

---

<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, 4:51am UTC](https://discuss.elastic.co/t/can-we-pass-a-directory-including-multiples-configuration-files-from-different-sources/53057/5 "2017-07-06T04:51:59Z")

</div>


