# Are Logstash conf files combined in some way?

**URL:** https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970
**Category:** Logstash
**Created:** [April 15, 2019, 8:23pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970 "2019-04-15T20:23:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pmarques](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmarques/32/42536_2.png) [@pmarques](https://discuss.elastic.co/u/pmarques)
#### Post date: [April 15, 2019, 8:23pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/1 "2019-04-15T20:23:07Z")

</div>

Hello All,

I might miss some information on the documentation...

I saved two different configuration files at /etc/logstash/conf.d which may run under 'main' pipeline

first.conf

```auto
input
  {
   file
     {
      path => "/data/first/*.csv"
      start_position => "beginning"
      sincedb_path => "/var/opt/sincedb/first.log"
     }
  }

filter {
  csv
    {
     separator => ";"
     columns => ["one","two","three"]
  mutate
    {
     remove_field => ["message"]
    }
}

output {
   elasticsearch
     {
      hosts => "http://localhost:9200"
      index => "first"
     }
}

```

second.conf

```auto
input
  {
   file
     {
      path => "/data/second/*.csv"
      start_position => "beginning"
      sincedb_path => "/var/opt/sincedb/second.log"
     }
  }

filter {
  csv
    {
     separator => ";"
     columns => ["one","three"]
  mutate
    {
     remove_field => ["message"]
    }
}

output {
   elasticsearch
     {
      hosts => "http://localhost:9200"
      index => "second"
     }
}

```

The issue is that when the first file is saved in /data/first, both indices (first and second) receive the data.

Are the file being combined in some way?

Thanks in advance,  
Paulo

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 15, 2019, 8:26pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/2 "2019-04-15T20:26:21Z")

</div>

> [@pmarques](#):
>
> Are the file being combined in some way?

Yes. If -f points to a directory all the files in that directory are combined (including foo.conf, foo.conf-, foo.conf.bkup) into a single configuration. Events are read from all the inputs, put through all the filters, and sent to all the outputs.

If you want to have two [pipelines](https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html) then do not use -f and configure a pipelines.yml

---

<div class="post-metadata">

### Author: ![pmarques](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmarques/32/42536_2.png) [@pmarques](https://discuss.elastic.co/u/pmarques)
#### Post date: [April 15, 2019, 9:53pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/3 "2019-04-15T21:53:10Z")

</div>

Hello @Badger,

Thank you so much for your quick reply.

I do need different indices, so based on your answer, I will need different pipelines. I am testing this using the pipelines.yml file. Anything that I need to be aware of?

Best,  
Paulo

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 15, 2019, 10:01pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/4 "2019-04-15T22:01:47Z")

</div>

No, it is pretty straightforward.

---

<div class="post-metadata">

### Author: ![pmarques](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmarques/32/42536_2.png) [@pmarques](https://discuss.elastic.co/u/pmarques)
#### Post date: [April 16, 2019, 4:41pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/5 "2019-04-16T16:41:23Z")

</div>

Hey @Badger,

Thanks for your help. It is working smoothly.

Paulo

---

<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: [May 14, 2019, 4:41pm UTC](https://discuss.elastic.co/t/are-logstash-conf-files-combined-in-some-way/176970/6 "2019-05-14T16:41:25Z")

</div>

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