fluent-gem
fluent-gem
command is used to install Fluentd plugins. This is a wrapper around the gem
command.td-agent
, Use /usr/sbin/td-agent-gem
td-agent
, make sure that you use td-agent-gem
command to install gems for it. Otherwise, you won't be able to find the installed plugins.gcc
, make
, autoconf
, etc.-p
option-p
option is used to add an extra plugin directory to the load path. For example, if you put out_foo.rb
plugin into /path/to/plugin
, you can load it by specifying the -p
option like this:-p
option more than once./etc/fluent/plugin
/etc/fluent/plugin
directory to its load path. Thus, any additional plugins that are placed in /etc/fluent/plugin
will be loaded automatically.td-agent
, Use /etc/td-agent/plugin
td-agent
, Fluentd uses the /etc/td-agent/plugin
directory instead of /etc/fluent/plugin
so put your plugins accordingly.gem install fluentd
gem install fluent-plugin-elasticsearch
gem update # This is very dangerous. Update all existing gems
-v
option:gem install fluentd -v 1.2.1
gem install fluent-plugin-elasticsearch -v 2.10.3
--gemfile
optionBundler
. Fluentd's --gemfile
option takes the same approach, and is useful for managing plugin versions separated from shared gems./etc/fluent/Gemfile
:--gemfile
option:--gemfile
option, Fluentd will try to install the listed gems using Bundler. Fluentd will only load the listed gems separated from shared gems, and will also prevent unexpected plugin updates.td-agent
td-agent
./etc/systemd/system/td-agent.service.d/override.conf
for td-agent
3.1.1:/etc/td-agent/Gemfile
:td-agent
:td-agent
includes them the first time.fluent-gem list
shows multiple plugin versions. Which one is used?2.0.1
version is used.