serf-td-agent
td-agent process management with serf
Installation
Use RubyGems:
gem install serf-td-agent
The serf command is automatically downloaded and bundled into the bin directory. Set the environment variable PATH as:
export PATH=$(gem path serf-td-agent)/bin:$PATH
How to setup the serf cluster
Run the first serf at any of hosts to run td-agent like:
$ serf agent -event-handler=serf-td-agent
Run later serfs at other hosts to run td-agent like:
$ serf agent -join=${the first serf address} -event-handler=serf-td-agent
Hint: -log-level=debug option should be helpful for debugging.
How to start td-agent via serf
Send a serf event from any of hosts running the serf like:
$ serf event td-agent-start
This will propagate the start event to the entire serf cluster and execute sudo /etc/init.d/td-agent start at all hosts.
Available events
Following events are available:
td-agent-starttd-agent-stoptd-agent-reloadtd-agent-restarttd-agent-condrestarttd-agent-statustd-agent-configtest
which corresponds with /etc/init.d/td-agent command.
ToDo
Use serf query for commands which requires responses like status and configtest.
ChangeLog
See CHANGELOG.md for details.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Copyright
Copyright (c) 2014 Naotoshi Seo. See LICENSE for details.
The license of serf belongs to serf. See serf/LICENSE.