$ sudo curl -L http://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
起動/サービス登録
1 2
$ sudo systemctl start td-agent $ sudo chkconfig td-agent on
systemctl enableするとchkconfig使ってと怒られます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ sudo systemctl enable td-agent
td-agent.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig td-agent on The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). [root@ip-172-31-19-253 log]#
# HTTP input # POST http://localhost:8888/<tag>?json=<json> # POST http://localhost:8888/td.myapp.login?json={"user"%3A"me"} # @see http://docs.fluentd.org/articles/in_http <source> type http port 8888 </source>
## live debugging agent <source> type debug_agent bind 127.0.0.1 port 24230 </source>
以下のようにコマンドを実行してtd-agent.logを確認してみる。
1 2 3 4 5
$ curl -X POST -d 'json={"json":"TEST!!"}' http://localhost:8888/debug.test