$ 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
2015-08-19 14:17:15 +0900 [info]: following tail of /var/log/nginx/access.log 2015-08-19 14:17:15 +0900 [info]: following tail of /var/log/nginx/error.log
nginx.service - nginx - high performance web server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled) Active: active (running) since Mon 2015-08-03 06:07:44 UTC; 2s ago Docs: http://nginx.org/en/docs/ Process: 12642 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Process: 12641 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Main PID: 12645 (nginx) CGroup: /system.slice/nginx.service ├─12645 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.... └─12646 nginx: worker process
Aug 03 06:07:44 ip-172-31-19-253 systemd[1]: Starting nginx - high performan.... Aug 03 06:07:44 ip-172-31-19-253 nginx[12641]: nginx: the configuration file...k Aug 03 06:07:44 ip-172-31-19-253 nginx[12641]: nginx: configuration file /et...l Aug 03 06:07:44 ip-172-31-19-253 systemd[1]: Failed to read PID from file /r...t Aug 03 06:07:44 ip-172-31-19-253 systemd[1]: Started nginx - high performanc.... Hint: Some lines were ellipsized, use -l to show in full.
EC2のCentOS7で 以下のように go get した際にbzrが見当たらないというエラーが発生した。
1 2 3 4 5
$ go get launchpad.net/goamz/aws
[centos@ip-xxx-xx-xx-xx src]$ go get launchpad.net/goamz/aws go: missing Bazaar command. See http://golang.org/s/gogetcmd package launchpad.net/goamz/aws: exec: "bzr": executable file not found in $PATH
INFO 2015/08/19 14:48:38 harness.go:165: Listening on :9000 2015/08/19 14:48:40 server.go:1775: http: TLS handshake error from 127.0.0.1:36799: tls: first record does not look like a TLS handshake