# Pipelines.yml distributor pattern more than 1 pipeline same events

**URL:** <https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684>\
**Category:** Logstash\
**Created:** [September 6, 2020, 6:01pm UTC](https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684 "2020-09-06T18:01:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [September 6, 2020, 6:01pm UTC](https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684/1 "2020-09-06T18:01:35Z")

</div>

Hello all,

this is my pipelines.yml file and is working really fine

```
- pipeline.id: distributor
  config.string: |
    input { beats { port => 5044 } }

    output {
        if "pc1" in [tags] {
          pipeline { send_to => proccess_1 }
        } else if "pc2" in [tags] {
          pipeline { send_to => proccess_2 }
        } else {
          # do nothing
        }
    }

- pipeline.id: proccess_1
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-1.conf"
- pipeline.id: proccess_2
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-2.conf"

```

how can apply more than one pipeline to the same tag events? for example, when pc1 events arrives from filebeat, besides sending it to

```
- pipeline.id: proccess_1
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-1.conf"

```

I would like to two different pipelines :

```
- pipeline.id: proccess_1
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-1.conf"
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-1-b.conf"

```

Is that posible?

Regards

---

<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:** [September 6, 2020, 8:11pm UTC](https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684/2 "2020-09-06T20:11:53Z")

</div>

If you want to send an event to multiple pipelines then you would use

```
    if "pc1" in [tags] {
      pipeline { send_to => [ "proccess_1", "process_1b" }
      ...

```

If you want a single pipeline to include multiple configuration files you would use

```
- pipeline.id: proccess_1
  path.config: "/usr/share/logstash/pipeline/logstash-pipeline-1*.conf"
```

---

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [September 6, 2020, 9:35pm UTC](https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684/3 "2020-09-06T21:35:35Z")

</div>

Thanks Badger!

---

<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:** [October 4, 2020, 9:35pm UTC](https://discuss.elastic.co/t/pipelines-yml-distributor-pattern-more-than-1-pipeline-same-events/247684/4 "2020-10-04T21:35:41Z")

</div>

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