Hi all i have an error i cant understand i have rabbitmq with a messege like this {"InternalMessageQueueSize":5,"ExceptionsNumber":300} i like to take it with logstash
{:timestamp=>"2015-09-20T12:55:46.339000+0300", :message=>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: <LogStash::Inputs::RabbitMQ host=>"Myhost", user=>"logstash", queue=>"Testq", type=>"app.metrics", tags=>["app.metrics"], vhost=>"/", key=>"logstash">\n Error: string not matched", :level=>:error}
github.com/elastic/logstash issue #3641 looks similar and one thing you have in common with the reports in that issue is that you're all using the json codec on an input. Have you instead of using the json codec tried using the default codec and doing the JSON parsing via a json filter?
Yes, at least as a way of figuring out what the problem might be. If doing so fixes the problem it's an indication that it's related to the json codec. I'd also crank up the log level by starting Logstash with --debug.
And this is with the stdout output? For debugging I suggest you use the rubydebug codec so that you see the whole message and get unambiguous separation of all fields.
Unless there's an additional filter that you're not showing us (a spurious file in /etc/logstash/conf.d perhaps?) I'd say the problem is with whatever software is posting messages to the queue.
Yes its looks like the post to rabbit but the guys says they use json library
You can easily use the RabbitMQ management interface to inspect exactly what's in the queue with no middle men.
any way i cat mutant the input to remove the "" and the start/end " and then set it as json?
You can use the mutate filter's gsub option to perform string substitution, but doing it correctly so that all input string possibilities are dealt with correctly isn't completely trivial.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.