# Combining Multiple Config Files

**URL:** <https://discuss.elastic.co/t/combining-multiple-config-files/58840>\
**Category:** Logstash\
**Created:** [August 24, 2016, 3:40pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840 "2016-08-24T15:40:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmk3173](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kmk3173](https://discuss.elastic.co/u/kmk3173)\
**Post date:** [August 24, 2016, 3:40pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/1 "2016-08-24T15:40:17Z")

</div>

Hi,

How would I be able to combine multiple config files to push data to elasticsearch.

I currently have 2 csv files that have different column names and data results. I want to be able to run multiple config files and display results on Kibana.

Thanks,

kate

---

<div class="post-metadata">

**Author:** ![Ben\_Davis](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Ben\_Davis](https://discuss.elastic.co/u/Ben_Davis)\
**Post date:** [August 24, 2016, 3:48pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/2 "2016-08-24T15:48:47Z")

</div>

One approach is to put all the config files in a single directory and then you call logstash like this:

logstash -f path\_to\_directory

BUT, in order for this to work, in each config file you need to use types as shown below. Each config file must have a different type or else the config files will step on each other.

input {  
&nbsp;-your normal input settings-  
&nbsp;type =\> "my\_type\_1"  
}

filter {  
&nbsp;if [type] == "my\_type\_1"{  
&nbsp;&nbsp;-your normal filter settings-  
&nbsp;}  
}

output {  
&nbsp;if [type] == "my\_type\_1" {  
&nbsp;&nbsp;-your normal output settings-  
&nbsp;}  
}

---

<div class="post-metadata">

**Author:** ![kmk3173](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kmk3173](https://discuss.elastic.co/u/kmk3173)\
**Post date:** [August 24, 2016, 5:54pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/3 "2016-08-24T17:54:19Z")

</div>

Once that is set how do I run multiple config files on the same directory. They are all in the conf folder. When I run logstash -f "path to conf file" I get configuration file not found error.

---

<div class="post-metadata">

**Author:** ![Ben\_Davis](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Ben\_Davis](https://discuss.elastic.co/u/Ben_Davis)\
**Post date:** [August 24, 2016, 6:00pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/4 "2016-08-24T18:00:07Z")

</div>

That should do the trick. Hmm.

Are the config files all named with extension '.config' ?

Are there any files in that directory that aren't config files? I recall that causes a problem.

Are there any spaces in the directory path? If so, try enclosing the path in double-quotes or making an alias to that directory without spaces in it.

---

<div class="post-metadata">

**Author:** ![kmk3173](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kmk3173](https://discuss.elastic.co/u/kmk3173)\
**Post date:** [August 24, 2016, 6:02pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/5 "2016-08-24T18:02:56Z")

</div>

All have extension .Conf

---

<div class="post-metadata">

**Author:** ![Ben\_Davis](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Ben\_Davis](https://discuss.elastic.co/u/Ben_Davis)\
**Post date:** [August 24, 2016, 6:37pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/6 "2016-08-24T18:37:38Z")

</div>

Sorry, I'm not sure what the issue could be.

---

<div class="post-metadata">

**Author:** ![kmk3173](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kmk3173](https://discuss.elastic.co/u/kmk3173)\
**Post date:** [August 24, 2016, 6:55pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/7 "2016-08-24T18:55:59Z")

</div>

Nevermind issue is resolved.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 24, 2016, 9:11pm UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/8 "2016-08-24T21:11:13Z")

</div>

What was the problem, it might help others in future if you can share it.

---

<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:41am UTC](https://discuss.elastic.co/t/combining-multiple-config-files/58840/9 "2017-07-06T04:41:44Z")

</div>


