# Why logstash merge index of 3 different config?

**URL:** <https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450>\
**Category:** Logstash\
**Created:** [October 12, 2022, 3:37pm UTC](https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450 "2022-10-12T15:37:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolas1306](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikolas1306/32/111507_2.png) [@Nikolas1306](https://discuss.elastic.co/u/Nikolas1306)\
**Post date:** [October 12, 2022, 3:37pm UTC](https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450/1 "2022-10-12T15:37:54Z")

</div>

i ve 3 config but i see the 3 index is similar why ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8603ba9db68867c301370b59f3e344f614ab5d3.png)

all index contais info all 3 index

this is my type config

is different for path and name index in \*\* lines

```auto
input {
  file {

    **path => ["/logstash_dir/federico2/p1/*.*"]**
    
    
    start_position => "beginning"

     #sincedb_path => "/dev/null"

    codec => multiline {
          pattern => "^%{TIMESTAMP_ISO8601} "
          negate => true
          what => "previous"
        }

  }
}

output {
 		elasticsearch {
			hosts => ["elkserver:9200"]
			**index => "p1-%{+YYYY.MM.dd}"**
		}
   
		stdout { codec => rubydebug }
}

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 12, 2022, 3:53pm UTC](https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450/2 "2022-10-12T15:53:49Z")

</div>

If you provide a directory to Logstash that contains a number of configuration files, these will all be concatenated into a single pipeline unless you [explicitly specify multiple pipelines](https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html) or control filter access through [conditionals](https://www.elastic.co/guide/en/logstash/8.4/event-dependent-configuration.html). Without this data from ALL inputs will therefore be processed by ALL filters and go to ALL outputs.

---

<div class="post-metadata">

**Author:** ![Nikolas1306](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikolas1306/32/111507_2.png) [@Nikolas1306](https://discuss.elastic.co/u/Nikolas1306)\
**Post date:** [October 12, 2022, 4:12pm UTC](https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450/3 "2022-10-12T16:12:07Z")

</div>

ok is possible filter by log path type ?

```auto
if "/logstash_dir/P1/" in [file.path] {
		elasticsearch {
			hosts => ["elasticsearch:9200"]
			index => "p1"
		}

```

```
}

```

---

<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:** [November 9, 2022, 4:12pm UTC](https://discuss.elastic.co/t/why-logstash-merge-index-of-3-different-config/316450/4 "2022-11-09T16:12:27Z")

</div>

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