Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

systemd support #101

Closed
repeatedly opened this issue Oct 25, 2016 · 5 comments
Closed

systemd support #101

repeatedly opened this issue Oct 25, 2016 · 5 comments

Comments

@repeatedly
Copy link
Contributor

Check list:

One fluentd example: https://gist.github.com/saidie/591157d2c9e306ff43d4

@repeatedly
Copy link
Contributor Author

repeatedly commented Oct 26, 2016

EnvironmentFile is good for 1st case.

@repeatedly
Copy link
Contributor Author

/etc/systemd/system/td-agent.service.d/limits.conf seems to resolve 2nd case.

@repeatedly
Copy link
Contributor Author

Environment is used for 3rd case.

Environment=LD_PRELOAD="${TD_AGENT_HOME}/embedded/lib/libjemalloc.so"

@cosmok
Copy link

cosmok commented Mar 20, 2017

Is there an update on this?

@repeatedly
Copy link
Contributor Author

Here is an example of service file. Does anyone review this?

[Unit]
Description=Treasure Agent: A data collector for Treasure Data
Documentation=https://docs.treasuredata.com/articles/td-agent
After=network-online.target
Wants=network-online.target

[Service]
User=td-agent
Group=td-agent
LimitNOFILE=65536
Environment=LD_PRELOAD=/opt/td-agent/embedded/lib/libjemalloc.so
Environment=GEM_HOME=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/
Environment=GEM_PATH=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/
Environment=FLUENT_CONF=/etc/td-agent/td-agent.conf
Environment=FLUENT_PLUGIN=/etc/td-agent/plugin
Environment=FLUENT_SOCKET=/var/run/td-agent/td-agent.sock
PIDFile=/var/run/td-agent/td-agent.pid
Type=forking
ExecStart=/opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid
ExecStop=/bin/kill -TERM ${MAINPID}
ExecReload=/bin/kill -HUP ${MAINPID}
Restart=always
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target

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

2 participants