출처 : https://docs.fluentd.org/v0.12/articles/install-by-dmg#step2:-launch-td-agent
For MacOS X, we’re using the OS native .dmg Installer to distribute td-agent.
Step1: Install td-agent
Please download the .dmg
file from here, and install the software.
Step2: Launch td-agent
You can launch td-agent
with launchctl
command. Please make sure the daemon started correctly from the log (/var/log/td-agent/td-agent.log
).
$ sudo launchctl load /Library/LaunchDaemons/td-agent.plist $ less /var/log/td-agent/td-agent.log 2013-04-19 16:55:03 -0700 [info]: starting fluentd-0.10.33 2013-04-19 16:55:03 -0700 [info]: reading config file path="/etc/td-agent/td-agent.conf"
Your configuration file is located at /etc/td-agent/td-agent.conf
. Your plugin directory is at /etc/td-agent/plugin
. In case you want to stop the agent, please execute the command below.
$ sudo launchctl unload /Library/LaunchDaemons/td-agent.plist
Step3: Post Sample Logs via HTTP
By default, /etc/td-agent/td-agent.conf
is configured to take logs from HTTP and route them to stdout (/var/log/td-agent/td-agent.log
). You can post sample log records using the curl command.
$ curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test $ tail -n 1 /var/log/td-agent/td-agent.log 2013-04-19 16:51:47 -0700 debug.test: {"json":"message"}
Uninstall td-agent
td-agent for Mac doesn’t provide uninstallation app unlike rpm / deb. If you want to uninstall td-agent from your Mac, remove these files / directories.
- /Library/LaunchDaemons/td-agent.plist
- /etc/td-agent
- /opt/td-agent
- /var/log/td-agent
Next Steps
You’re now ready to collect your real logs using Fluentd. Please see the following tutorials to learn how to collect your data from various data sources.
- Basic Configuration
- Application Logs
- Examples
Please refer to the resources below for further steps.
'DevOps' 카테고리의 다른 글
kubernetes 명령어#1 (0) | 2018.12.27 |
---|---|
미니큐브 설치 맥 (0) | 2018.12.23 |
macbook에 프로메테우스 설치 (0) | 2018.11.30 |
MSA모니터링-Prometheus개념 (0) | 2018.11.29 |
MSA-Spring Cloud (0) | 2018.09.28 |