How to send json format data from logstash to Rabbitmq. I have tried but getting error. Currently I am using local Rabbitmq
My config output file,
if "_grokparsefailure" in [tags]{
rabbitmq{
host => "localhost"
port => 5672
user => "guest"
password => "guest"
durable => true
exchange => "LOGSTASH_TO_RABBITMQ.TEST"
exchange_type => "direct"
# queue => "LOGSTASH_TO_RABBITMQ"
# codec =>"plain"
type => "json"
}
}
I am getting this error:
Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) The setting type
in plugin rabbitmq
is obsolete and is no longer available. You can achieve this same behavior with the new conditionals, like: if [type] == \"sometype\" { rabbitmq { ... } }
.