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:
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:
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.