td-agent-gem ~/filter_split_msg.rb
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command ~/filter_split_msg.rb
what I am doing wrong here?.
--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fluentd -p /path/to/plugin
fluentd -p ~/filter_split_msg.rb
2017-01-12 10:10:27 -0500 [info]: reading config file path="/etc/fluent/fluent.conf"
/usr/local/lib/ruby/gems/2.3.0/gems/fluentd-0.14.9/lib/fluent/supervisor.rb:659:in `read': No such file or directory @ rb_sysopen - /etc/fluent/fluent.conf (Errno::ENOENT)
from /usr/local/lib/ruby/gems/2.3.0/gems/fluentd-0.14.9/lib/fluent/supervisor.rb:659:in `read_config'
from /usr/local/lib/ruby/gems/2.3.0/gems/fluentd-0.14.9/lib/fluent/supervisor.rb:416:in `run_supervisor'
from /usr/local/lib/ruby/gems/2.3.0/gems/fluentd-0.14.9/lib/fluent/command/fluentd.rb:286:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/fluentd-0.14.9/bin/fluentd:5:in `<top (required)>'
from /usr/local/bin/fluentd:23:in `load'
from /usr/local/bin/fluentd:23:in `<main>'
I have tried this too.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
<filter test>
@type split_msg
</filter>
2017-01-13 10:08:22 -0500 [error]: config error file="/etc/fluent/fluent.conf" error="Unknown filter plugin 'split_msg'. Run 'gem search -rd fluent-plugin' to find plugins"
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
<filter test>
@type split_msg
</filter>
module Fluent
class SplitMsgFilter < Filter
Fluent::Plugin.register_output('split_msg', self)
# config_param works like other plugins
def configure(conf)
super
end
def filter(tag, time, record)
msgs = record['message'].split("\|")
event_time = msgs[0]
ip = msgs[2]
# replace profile4 or add ip to record or etc...
record
end
end
end