Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

easier way to specify --gemfile option for td-agent #69

Open
ttanimichi opened this issue Dec 13, 2014 · 0 comments
Open

easier way to specify --gemfile option for td-agent #69

ttanimichi opened this issue Dec 13, 2014 · 0 comments

Comments

@ttanimichi
Copy link

Hi.

This feature request is related with #68.

fluentd can use Gemfile to specify plugins using "--gemfile" option. In production environment, we want to specify the plugins' version, repository and branch strictly, because sometimes fluent-plugins have bugs or version incompatibilities. Although we can use any version of plugin putting it into /etc/td-agent/plugin, it's difficult to automate provisioning by Chef or Ansible.

Now, td-agent can specify the fluentd's --gemfile option by setting the environment variable TD_AGENT_ARGS and PATH at /etc/sysconfig/td-agent or somewhere (but there is no documentation about this).

# /etc/sysconfig/td-agent
PATH="$PATH:/opt/td-agent/embedded/bin"
TD_AGENT_ARGS="/usr/sbin/td-agent --group td-agent --log /var/log/td-agent/td-agent.log --gemfile /etc/td-agent/Gemfile --use-v1-config"

This way is a little difficult. To use --gemfile option, you have to read the source code of /etc/init.d/td-agent and check the default value of TD_AGENT_ARGS. Besides, if you start td-agent without setting PATH like PATH="$PATH:/opt/td-agent/embedded/bin", td-agent will shutdown abnormally with no error message (That's because /opt/td-agent/embedded/bin/bundler isn't in PATH and fluentd's daemon can't start. Exit code is 127).

I think it's better for td-agent to prepare easier way to specify --gemfile option. e.g. Prepare the /etc/sysconfig/td-agent file with sample configrution in the installation process (like nginx and other many middlewares). What do you think about that?

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant