# Output HTTP: Problem to send @metadata from one pipeline into another

**URL:** https://discuss.elastic.co/t/output-http-problem-to-send-metadata-from-one-pipeline-into-another/335043
**Category:** Logstash
**Created:** [June 2, 2023, 3:38am UTC](https://discuss.elastic.co/t/output-http-problem-to-send-metadata-from-one-pipeline-into-another/335043 "2023-06-02T03:38:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![junchao](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@junchao](https://discuss.elastic.co/u/junchao)
#### Post date: [June 2, 2023, 3:38am UTC](https://discuss.elastic.co/t/output-http-problem-to-send-metadata-from-one-pipeline-into-another/335043/1 "2023-06-02T03:38:38Z")

</div>

I am trying to send the value of [@metadata][usertag] from one pipeline 1 to pipeline 2.

I tried to parse the value using "headers" setting but the value parsed is the string: "%{[@metadata][usertag]}" and not the variable value itself.

Pipeline 1 output configuration:

```auto
output {
    http {
        url => 'http://127.0.0.1:5049'
        http_method => post
        headers => {
            "usertag" => "%{[@metadata][usertag]}"
        }
        retry_non_idempotent => true
        format => json_batch
        http_compression => true
    }
)

```

Pipeline 2 input configuration:

```auto
input {
    http {
        id => output
        port => 5049
        additional_codecs => { "application/json" => "json_lines" }
    }
}

```

I understand that I can use mutate add\_field in the filter block to declare a new variable and it will be sent over from pipeline 1 to pipeline 2 right away, however, we are not supposed to touch the filter block developed by other developers from other companies. Hence, I am only limited to the output block.

Thanks in advanced for the help.

---

<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: [June 30, 2023, 3:38am UTC](https://discuss.elastic.co/t/output-http-problem-to-send-metadata-from-one-pipeline-into-another/335043/2 "2023-06-30T03:38:55Z")

</div>

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