First off, I am using 6.0.0-rc1 in docker. I'm using the jdbc input plugin to fetch some data out of mysql, and I need to convert an integer (tinyint in the schema) to boolean to suit my desired index type. The values in the database are always 0 or 1. My filter config is like so:
filter {
mutate {
convert => {
"archived" => "boolean"
}
}
}
When I run logstash, I get the following error:
[ERROR][logstash.pipeline ] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline_id=>"novasub-ingest", "exception"=>"undefined method
empty?' for 0:Fixnum", "backtrace"=>["/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.1.6/lib/logstash/filters/mutate.rb:297:in
convert_boolean'", "org/jruby/RubyMethod.java:115:incall'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.1.6/lib/logstash/filters/mutate.rb:271:in
block in convert'", "org/jruby/RubyHash.java:1343:ineach'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.1.6/lib/logstash/filters/mutate.rb:257:in
convert'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.1.6/lib/logstash/filters/mutate.rb:218:infilter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:145:in
do_filter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:164:inblock in multi_filter'", "org/jruby/RubyArray.java:1734:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:161:inmulti_filter'", "/usr/share/logstash/logstash-core/lib/logstash/filter_delegator.rb:48:in
multi_filter'", "(eval):42:inblock in filter_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:504:in
block in filter_batch'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:228:inblock in each'", "org/jruby/RubyHash.java:1343:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:227:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:501:in
filter_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:477:inworker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:439:in
block in start_workers'"], :thread=>"#<Thread:0x5ed0a429@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:290 sleep>"}
If I change my query to return "true" or "false" for that column, it works fine. If I set it to statically return 0 or 1, I get the error as well. Is this a mistake on my part?