--configtest is ok.but logfile has error,messages:
{:timestamp=>"2016-03-23T19:17:11.914000+0800", :message=>"Ruby exception occurred: undefined local variable or method `error_107' for #LogStash::Filters::Ruby:0x3400b2f0", :level=>:error}
This has nothing to do with the Logstash version. Unless error_107 is an identifier (like e.g. a variable) in the Ruby script but a string literal it needs to be quoted.
That indicates that the error_107 field didn't exist. If that indeed is the case you need to wrap your filter in a conditional that checks if that field exists, or add such a conditional to the Ruby sniippet.
the error_107 is tag, the filter metrics meter => ["error_107"] . That indicates that the error_107 field didn't exist. so i want to add this field in filter?
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.