logstash-plugins / logstash-output-rabbitmq

Apache License 2.0
17 stars 37 forks source link

Payload value? #65

Open alfsolli opened 7 years ago

alfsolli commented 7 years ago

Hi.

I'm trying to get logstash to post to a specific topic (routing key) and a specific payload. Topic works fine, no problem.

But the payload starts with "2017-07-06T18:30:44.559Z %{host}......."

I've tried mutate and replace message field with the value, and that's what comes after {host} in the above example. Is there a way to remove the timestamp and host variable and only have a single field in the payload?

I assume I'm doing something wrong, but I can't find an answer with my google-fu. :\

jordansissel commented 7 years ago

This is probably best a question for https://discuss.elastic.co/

rafiifar commented 4 years ago

I know that it is a bit old thread but i got there while searching for how to format logstash output in rabbitmq output plugin. To get only message value in payload you have to add format option to the codec as shown in the example below.

output {
 rabbitmq {
  (...)
  codec => plain {
   format => "%{[message]}"
  }
 }
}