Open elvarb opened 8 years ago
+1 - I have just hit this issue with a similar config using the "use_event_fields_for_data_points" option. The Logstash instance's log generates the following:
[2017-02-27T16:23:11,985][WARN ][logstash.outputs.influxdb] Failed to flush outgoing items {:outgoing_count=>1, :exception=>"NoMethodError", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:340:in `quoted'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:225:in `events_to_request_body'", "org/jruby/RubyHash.java:1342:in `each'", "org/jruby/RubyEnumerable.java:757:in `map'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:225:in `events_to_request_body'", "org/jruby/RubyArray.java:2414:in `map'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:222:in `events_to_request_body'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:169:in `flush'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:221:in `buffer_flush'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:216:in `buffer_flush'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:159:in `buffer_receive'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-4.0.0/lib/logstash/outputs/influxdb.rb:163:in `receive'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:92:in `multi_receive'", "org/jruby/RubyArray.java:1613:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:92:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:19:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:43:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:336:in `output_batch'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:335:in `output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:293:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:263:in `start_workers'"]}
I haven't had a problem when defining other metric events with more "static" field names manually in the Output config, using the "data_points" array and also "coerce_values". This issue seems to occur with the "automatic" option ("use_event_fields_for_data_points").
When you have a config like this
The result JSON will look something like this
Using use_event_fields_for_data_points I would assume it would create metrics called winevent_Application with the metric values count, rate_1m and so on but sadly it doesn't seem to work.
Is there some way to get this correctly into InfluxDB with the output plugin?