Install td-agent2 on AWS EC2 (CentOS7) in 3 Minutes!
Environment
- AWS EC2
- CentOS Linux release 7.1.1503 (Core)
Installing td-agent2
1 | $ sudo curl -L http://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh |
Starting / Registering the Service
1 | $ sudo systemctl start td-agent |
If you run systemctl enable, you’ll get scolded and told to use chkconfig instead.
1 | $ sudo systemctl enable td-agent |
Testing
Looking at the configuration file (/etc/td-agent/td-agent.conf), the default settings
log via the http protocol from port:8888 and route the data to td-agent.log (/var/log/td-agent/td-agent.log).
1 | # HTTP input |
Run the following commands and check td-agent.log.
1 | $ curl -X POST -d 'json={"json":"TEST!!"}' http://localhost:8888/debug.test |
As shown above, we were able to confirm that the data was logged correctly.
Install td-agent2 on AWS EC2 (CentOS7) in 3 Minutes!
https://kenzo0107.github.io/en/2015/09/19/install-td-agent2-centos7/