# \[Solved\] Logstash - Pipeline to Pipeline Config

**URL:** https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212
**Category:** Logstash
**Created:** [September 26, 2019, 10:56am UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212 "2019-09-26T10:56:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jo3rg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jo3rg/32/54920_2.png) [@jo3rg](https://discuss.elastic.co/u/jo3rg)
#### Post date: [September 26, 2019, 10:56am UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212/1 "2019-09-26T10:56:56Z")

</div>

Hi,  
I'm trying to make our huge logstash configuration easier readable and flexible and therefore thought of splitting it into several pipelines.  
I came across the pipeline to pipeline communication feature:

> **[Introducing Multiple Pipelines in Logstash](https://www.elastic.co/de/blog/logstash-multiple-pipelines)**
>
> What's coming with multiple pipelines in Logstash for processing separate event flows.

  
and also found the pipeline to pipeline communication helpful in our case:  
[https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html)

So I started to setup a basic pipeline configuration with one general input port, which looks as following:

```
$ cat /opt/elastic/config/logstash_multiple_pipelines/pipelines/pipelines.yml
- pipeline.id: general-input
  path.config: "/opt/elastic/config/logstash_multiple_pipelines/pipelines/general-input.cfg"

$ cat /opt/elastic/config/logstash_multiple_pipelines/pipelines/general-input.cfg
input {
  beats {
port => 5044
  }
}
filter { }
output {
  if [tags] == "ONSH-ES2-Info" {
pipeline { send_to => onsh-es2-info }
  }
  else {
pipeline { send_to => fallback }
  }
}

```

But it fails during config check or startup with the following error which I quite don't understand:

```
[FATAL] 2019-09-26 12:34:34.078 [LogStash::Runner] runner - The given configuration is invalid. Reason: Expected one of #, { at line 9, column 41 (byte 135) after output {
  if [tags] == "ONSH-ES2-Info" {
pipeline { send_to => onsh-es2-info
[ERROR] 2019-09-26 12:34:34.089 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

```

Does anyone know what's the issue on line 9 and column 41?  
I don't see any configuration error...

Thanks and regards

---

<div class="post-metadata">

### Author: ![jo3rg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jo3rg/32/54920_2.png) [@jo3rg](https://discuss.elastic.co/u/jo3rg)
#### Post date: [September 26, 2019, 11:59am UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212/2 "2019-09-26T11:59:33Z")

</div>

I just found the solution to the issue.  
It seems that there are no "-" allowed in pipeline names!

---

<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 26, 2019, 2:20pm UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212/3 "2019-09-26T14:20:19Z")

</div>

- is allowed in pipeline names, but pipeline names should be in double quotes

```
  pipeline { send_to => "onsh-es2-info" }
```

---

<div class="post-metadata">

### Author: ![jo3rg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jo3rg/32/54920_2.png) [@jo3rg](https://discuss.elastic.co/u/jo3rg)
#### Post date: [September 27, 2019, 10:34am UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212/4 "2019-09-27T10:34:54Z")

</div>

Oh okay, that pretty much describes it.  
But I think then it should also be corrected within the example on:  
[https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#distributor-pattern](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#distributor-pattern)

---

<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 25, 2019, 10:45am UTC](https://discuss.elastic.co/t/solved-logstash-pipeline-to-pipeline-config/201212/5 "2019-10-25T10:45:36Z")

</div>

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