# Separate Input, Filter and Output Configurations

**URL:** https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030
**Category:** Logstash
**Created:** [July 21, 2015, 11:21pm UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030 "2015-07-21T23:21:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![gromit](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gromit](https://discuss.elastic.co/u/gromit)
#### Post date: [July 21, 2015, 11:21pm UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/1 "2015-07-21T23:21:30Z")

</div>

I have multiple configuration files for Logstash, each file contains inputs, filters & outputs.  
Is this the recommended method or should I have separate files containing only 1 of the above?  
For example: 1-input.conf, 2-input, 3-input, 4-filter.conf, 5-filter.conf etc.  
I'm just unsure of the order in which Logstash processes these files and cannot find anything clarification in the documentation..

---

<div class="post-metadata">

### Author: ![mrlesmithjr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrlesmithjr/32/3804_2.png) [@mrlesmithjr](https://discuss.elastic.co/u/mrlesmithjr)
#### Post date: [July 22, 2015, 2:30am UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/2 "2015-07-22T02:30:02Z")

</div>

@Gromit - I tend to group similar filters and such into individual conf files. I use numbering along with names to ensure on the loading order. Ensuring that my inputs load first, filters (in order of dependency) and then outputs. You can see an example of what I am talking about at my GitHub repo.

[https://github.com/mrlesmithjr/Ansible/tree/master/roles/elk-processor/templates/etc/logstash/conf.d](https://github.com/mrlesmithjr/Ansible/tree/master/roles/elk-processor/templates/etc/logstash/conf.d)

---

<div class="post-metadata">

### Author: ![gromit](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gromit](https://discuss.elastic.co/u/gromit)
#### Post date: [July 22, 2015, 2:31am UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/3 "2015-07-22T02:31:54Z")

</div>

Exactly the information I was looking for, thanks very much.

---

<div class="post-metadata">

### Author: ![mrlesmithjr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrlesmithjr/32/3804_2.png) [@mrlesmithjr](https://discuss.elastic.co/u/mrlesmithjr)
#### Post date: [July 22, 2015, 2:39am UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/4 "2015-07-22T02:39:10Z")

</div>

Absolutely!

---

<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: [July 22, 2015, 8:54am UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/5 "2015-07-22T08:54:56Z")

</div>

> I'm just unsure of the order in which Logstash processes these files and cannot find anything clarification in the documentation..

The [command-line documentation](https://www.elastic.co/guide/en/logstash/current/_command_line_flags.html) notes that when given a directory Logstash loads the files in alphabetical order. Ordering only matters for filters, and how you split the configuration stanzas between files doesn't matter.

---

<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:34am UTC](https://discuss.elastic.co/t/separate-input-filter-and-output-configurations/26030/6 "2017-07-06T05:34:03Z")

</div>


