# Question about multiple conf files

**URL:** https://discuss.elastic.co/t/question-about-multiple-conf-files/75186
**Category:** Logstash
**Created:** [February 15, 2017, 11:54am UTC](https://discuss.elastic.co/t/question-about-multiple-conf-files/75186 "2017-02-15T11:54:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lendoly](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@lendoly](https://discuss.elastic.co/u/lendoly)
#### Post date: [February 15, 2017, 11:54am UTC](https://discuss.elastic.co/t/question-about-multiple-conf-files/75186/1 "2017-02-15T11:54:05Z")

</div>

Hello,

I'm having some troubles with my conf file (more than 300 lines and growing) so I decide to split it on severals files and looking for information about that I read that is not possible to duplicate the input option for each file.

So my approach is to have one input.conf and severals conf files for each filter and output.

Example:  
input.conf

```
input {
    beats {
        port => 5000
    }
}

```

fileA.conf

```
filter {
    if [type] == "A" {
        DO STUFF
    } 
}

output {
     f [type] == "A" {
             elasticsearch {
                    hosts => ["elasticsearch:9200"]
                    index => "A-%{+YYYY.MM.dd}"
            }
     } 
}

```

fileB.conf

```
filter {
    if [type] == "B" {
        DO STUFF
    } 
}

output {
     f [type] == "B" {
             elasticsearch {
                    hosts => ["elasticsearch:9200"]
                    index => "B-%{+YYYY.MM.dd}"
            }
     } 
}

```

There is any problem to duplicate the output as happens with the input? is my approach correct?

Thanks for the help!

Extra info:  
logstash and beats 5.X

---

<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: [February 15, 2017, 12:13pm UTC](https://discuss.elastic.co/t/question-about-multiple-conf-files/75186/2 "2017-02-15T12:13:30Z")

</div>

This looks fine.

---

<div class="post-metadata">

### Author: ![lendoly](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@lendoly](https://discuss.elastic.co/u/lendoly)
#### Post date: [February 15, 2017, 1:02pm UTC](https://discuss.elastic.co/t/question-about-multiple-conf-files/75186/3 "2017-02-15T13:02:15Z")

</div>

Thanks!

---

<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: [March 15, 2017, 1:02pm UTC](https://discuss.elastic.co/t/question-about-multiple-conf-files/75186/4 "2017-03-15T13:02:22Z")

</div>

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