I am trying to send an event from logstash to rabbitmq. It works but, the event is getting "jsoned" by default. For example if my message is ABC, RabbitMQ gets the payload as,
{"message":"abc"}
I just want the payload to be simply "abc". How can I do that ?
my logstash config is as below:
output{
stdout{
codec => rubydebug
}
rabbitmq {
codec => json {charset =>"UTF-8"}
host => "192.100.12.23"
password => "guest"
port => 5672
user => "guest"
vhost => "/"
exchange => "myxchange"
key => "mykey"
exchange_type => "direct"
durable => true
persistent => true
}
}
I tried changing
codec => json {charset =>"UTF-8"}
to
codec => plain {charset =>"UTF-8"}
which gives me following error:
Error encoding event {:exception=>#<NoMethodError: undefined method `to_iso8601' for nil:NilClass>