# Send multiple output 1 at a time to another pipeline in Logstash

**URL:** <https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022>\
**Category:** Logstash\
**Created:** [April 15, 2020, 3:41am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022 "2020-04-15T03:41:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie001](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie001](https://discuss.elastic.co/u/newbie001)\
**Post date:** [April 15, 2020, 3:41am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/1 "2020-04-15T03:41:08Z")

</div>

Hi - I am very new to logstash. Is there a way on how I can send the output into another pipeline one at a time, with the unique field _"somefield"_? "somefield" values are from UUID function.

**CODE**

```auto
    #input ODX files from local path file
    input {
     file { path => "/Users/sample.odx" 
    	start_position => "beginning"
    	sincedb_path => "NUL" 
    	codec => multiline {
    		pattern => "^#----- Start Task -----"
    		negate => true
    		what => "previous"
    		max_lines => 4000
    		}
    	}
    }

    filter{
    	mutate { add_field => {"somefield" => " "} }
    	uuid {
    		target => "somefield"
    		overwrite => true
    	}
    }
    #output JSON File in local
    output{
    	pipeline {
    		send_to => [data_transform]
    	}
    }

```

**current output:**

```auto
    {
      "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.441Z",
          "message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c657e-65e2-4312-a015-e61"
    }{
     "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.497Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c9c6a2-fb81-435f-8a31-3728"
    }{
     "@version": "1",
          "@timestamp": "2020-03-14T02:37:02.809Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nDotonburi\\Japan\\98CVBS\\112\r\n#Counter ID\r\n9001\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "28a5c-0cd7-4b89-bb7f-fff"
    }

```

Thanks in advance!

---

<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:** [April 15, 2020, 6:40am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/2 "2020-04-15T06:40:35Z")

</div>

I do not understand what the problem is nor what you are asking. Could you please explain a bit more?

---

<div class="post-metadata">

**Author:** ![newbie001](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie001](https://discuss.elastic.co/u/newbie001)\
**Post date:** [April 15, 2020, 7:25am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/3 "2020-04-15T07:25:09Z")

</div>

Sure. I would like to send the _ **message** _ output 1 at a time in another pipeline, [data\_transform]. Notice that there are 3 messages in the output.

Currently the output is being sent everything to another pipeline:

```auto
    {
      "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.441Z",
          "message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c657e-65e2-4312-a015-e61"
    }{
     "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.497Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c9c6a2-fb81-435f-8a31-3728"
    }{
     "@version": "1",
          "@timestamp": "2020-03-14T02:37:02.809Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nDotonburi\\Japan\\98CVBS\\112\r\n#Counter ID\r\n9001\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "28a5c-0cd7-4b89-bb7f-fff"
    }

```

each _message_ should be sent to pipeline 1 at a time.

output 1: send to pipeline [data\_transform], then perform necessary filters.

```auto
    {
      "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.441Z",
          "message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c657e-65e2-4312-a015-e61"
    }

```

output 2:send to pipeline [data\_transform], then perform necessary filters.

```auto
    {
     "@version": "1",
          "@timestamp": "2020-03-14T02:36:25.497Z",
          "message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
          "tags": [
            "multiline"
          ],
          "host": "BD001A2A",
      "somefield": "c9c6a2-fb81-435f-8a31-3728"
    }

```

thanks

---

<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:** [April 15, 2020, 7:49am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/4 "2020-04-15T07:49:29Z")

</div>

Logstash handles prr RT icesdingbin small batches. Why do they need to be sent one at a time?

---

<div class="post-metadata">

**Author:** ![newbie001](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie001](https://discuss.elastic.co/u/newbie001)\
**Post date:** [April 15, 2020, 8:06am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/5 "2020-04-15T08:06:36Z")

</div>

as per requirement, each message should be processed, transformed and outputted to a json object. basically, i have a single input, but should have multiple output.

---

<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:** [April 15, 2020, 8:09am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/6 "2020-04-15T08:09:40Z")

</div>

The output seems to have 3 separate events. How do you output these? What is wrong with this? I am still not sure I understand the issue.

---

<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 13, 2020, 8:09am UTC](https://discuss.elastic.co/t/send-multiple-output-1-at-a-time-to-another-pipeline-in-logstash/228022/7 "2020-05-13T08:09:49Z")

</div>

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