Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created March 1, 2012 05:44
Show Gist options
  • Save kyanny/1947613 to your computer and use it in GitHub Desktop.
Save kyanny/1947613 to your computer and use it in GitHub Desktop.
Makefile for fluentd convenient use
$ fluentd -c ./fluent
$ cd ./fluent
$ make start
$ make stop
$ make restart
$ make reload
$ make flush
$ make add
start:
fluentd -c ./fluent.conf -o /var/log/fluentd.log -d ./fluentd.pid -vv
stop:
pkill -f fluentd
restart:
pkill -f fluentd
sleep 1
fluentd -c ./fluent.conf -o /var/log/fluentd.log -d ./fluentd.pid -vv
check:
pgrep -f fluentd
flush:
pkill -USR1 -f fluentd
reload:
pkill -HUP -f fluentd
add:
echo '{"k1":"v1","k2":"v2","k3":"v3"}' | fluent-cat foo.bar.baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment