Using HTTP output plugin and mapping tag

I am adding fields to event using
mutate { add_field }

When I try to ship it adding event in mapping, I get an error:

http {
http_method => "post"
url => "http://endpoint"
mapping => {
"event" => "%{event}"
"sourcetype" => "logstash"
}
}

If I do not add event - nothing comes accross

What error do you get? What does the event look like if you use?...

output { stdout { codec => rubydebug } }

I see output when I use rubydebug and assign every value inside the event like this:

output {
http {
http_method => "post"
url => "http://myurl"
mapping => {
"event" => {
"message" => "%{MESSAGE}"
"cluster" => "MY_CLUSTER"
}
}
}
stdout {
codec => rubydebug
}
}

But when I try to pass original message like this - I get an error:

output {
http {
http_method => "post"
url => "http://myurl"
mapping => {
"event" => "%{event}"
"cluster" => "MY_CLUSTER"
}
}
stdout {
codec => rubydebug
}
}

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