You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick fix should be in influxdb.rb code, the escaped funtions are not safe for boolean types sou you need to check:
# Escape tag key, tag value, or field key
def escaped(value)
!!value == value ? value : value.gsub(/[ ,=]/, ' ' => '\ ', ',' => '\,', '=' => '\=')
end
# Escape measurements note they don't need to worry about the '=' case
def escaped_measurement(value)
!!value == value ? value : value.gsub(/[ ,]/, ' ' => '\ ', ',' => '\,')
end
If there is field with boolean type in logstash event, influxdb plugin fails giving the following stack trace:
{:timestamp=>"2016-07-22T18:10:14.701000+0100", :message=>"Failed to flush outgoing items", :outgoing_count=>100, :exception=>"NoMethodError", :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:342:in
quoted'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:227:inevents_to_request_body'", "org/jruby/RubyHash.java:1342:in
each'", "org/jruby/RubyEnumerable.java:757:inmap'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:227:in
events_to_request_body'", "org/jruby/RubyArray.java:2414:inmap'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:224:in
events_to_request_body'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:171:inflush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:221:in
buffer_flush'", "org/jruby/RubyHash.java:1342:ineach'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:216:in
buffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:193:inbuffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:159:in
buffer_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-3.1.2/lib/logstash/outputs/influxdb.rb:165:inreceive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/outputs/base.rb:83:in
multi_receive'", "org/jruby/RubyArray.java:1613:ineach'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/outputs/base.rb:83:in
multi_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/output_delegator.rb:130:inworker_multi_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/output_delegator.rb:114:in
multi_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:301:inoutput_batch'", "org/jruby/RubyHash.java:1342:in
each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:301:inoutput_batch'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:232:in
worker_loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:201:instart_workers'"], :level=>:warn}
This happens only with messages containing boolean fields. See "compr_on" below:
this conversion, in turn, is generated by the following logstash config line:
Simply commenting out
convert
lines eliminates the error.InfluxDB-relevant part of logstash config is:
The text was updated successfully, but these errors were encountered: