fluent-plugin-rewrite
fluent-plugin-rewrite copied to clipboard
error="record must be a Hash: Array"
I seem to be unable to get this plugin to work.
td-agent-3.3.0-1.amazon2018.03.x86_64 fluent-plugin-rewrite (0.1.1)
<filter monoecs>
@type rewrite
remove_prefix "monoecs"
add_prefix "filtered_monoecs"
<rule>
key log
pattern ^cell$
replace HERE
</rule>
</filter>
stdout
2019-07-15 21:39:49 +0000 [info]: gem 'fluent-plugin-rewrite' version '0.1.1'
2019-07-15 21:39:49 +0000 [warn]: parameter 'remove_prefix' in <filter monoecs>
@type rewrite
remove_prefix monoecs
add_prefix filtered_monoecs
<rule>
key log
pattern ^cell$
replace HERE
</rule>
</filter> is not used.
2019-07-15 21:39:49 +0000 [warn]: parameter 'add_prefix' in <filter monoecs>
@type rewrite
remove_prefix monoecs
add_prefix filtered_monoecs
<rule>
key log
pattern ^cell$
replace HERE
</rule>
</filter> is not used.
2019-07-15 21:40:27 +0000 [info]: #0 disable filter chain optimization because [Fluent::Plugin::RewriteFilter, Fluent::Plugin::StdoutFilter] uses `#filter_stream` method.
2019-07-15 21:39:27.000000000 +0000 monoecs: [{"source":"stdout","log":"[ 15-07-2019 21:39:27.337 ] [ dbcpu-loader-JobappAutopilot ] [ INFO ] [ JMXLogAspect ] - JMX: class com.saasure.core.server.impl.ServerDetailsImpl.resolveIp called with params [on14-dben-primary.aue1t.internal] [ , cell=test.ninja:14, career=monolith-app ]","container_id":"af6864fc11f76e4a68ac25adffb89a209c7aab3e08edfc16bb31da00ce1e4d1d","container_name":"/ecs-on14-majorecs-canary-22-monolith-9a9292e5e6b0bfa41f00"}]
2019-07-15 21:40:27 +0000 [warn]: #0 emit transaction failed: error_class=ArgumentError error="record must be a Hash: Array" location="/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:809:in `metadata'" tag="monoecs"
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:809:in `metadata'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:943:in `block in handle_stream_with_custom_format'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event.rb:193:in `block in each'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event.rb:192:in `each'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event.rb:192:in `each'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:942:in `handle_stream_with_custom_format'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:870:in `execute_chunking'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:791:in `emit_buffered'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event_router.rb:159:in `emit_events'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event_router.rb:96:in `emit_stream'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/event_router.rb:87:in `emit'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:337:in `on_message'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:211:in `block in handle_connection'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:248:in `block (3 levels) in read_messages'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:247:in `feed_each'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:247:in `block (2 levels) in read_messages'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/in_forward.rb:256:in `block in read_messages'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin_helper/server.rb:612:in `on_read_without_connection'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/cool.io-1.5.3/lib/cool.io/io.rb:123:in `on_readable'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/cool.io-1.5.3/lib/cool.io/io.rb:186:in `on_readable'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/cool.io-1.5.3/lib/cool.io/loop.rb:88:in `run_once'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/cool.io-1.5.3/lib/cool.io/loop.rb:88:in `run'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin_helper/event_loop.rb:93:in `block in start'
2019-07-15 21:40:27 +0000 [warn]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
2019-07-15 21:40:27 +0000 [error]: #0 [input_forward] unexpected error on reading data host="127.0.0.1" port=37660 error_class=ArgumentError error="record must be a Hash: Array"
2019-07-15 21:40:27 +0000 [error]: #0 suppressed same stacktrace
2019-07-15 21:40:27.339206726 +0000 fluent.info: {"message":"disable filter chain optimization because [Fluent::Plugin::RewriteFilter, Fluent::Plugin::StdoutFilter] uses `#filter_stream` method."}
2019-07-15 21:40:27 +0000 [warn]: #0 no patterns matched tag="fluent.info"
2019-07-15 21:40:27.339438967 +0000 fluent.warn: {"error":"#<ArgumentError: record must be a Hash: Array>","location":"/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:809:in `metadata'","tag":"monoecs","message":"emit transaction failed: error_class=ArgumentError error=\"record must be a Hash: Array\" location=\"/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/lib/fluent/plugin/output.rb:809:in `metadata'\" tag=\"monoecs\""}
2019-07-15 21:40:27.339641312 +0000 fluent.error: {"host":"127.0.0.1","port":37660,"error":"#<ArgumentError: record must be a Hash: Array>","message":"[input_forward] unexpected error on reading data host=\"127.0.0.1\" port=37660 error_class=ArgumentError error=\"record must be a Hash: Array\""}
2019-07-15 21:40:27 +0000 [warn]: #0 no patterns matched tag="fluent.error"