You use Treasure Agent (td-agent) to import logs from your MaxOS X environment. For MacOS X, TD-agent is distributed as a .dmg Installer package.
td-agent3 is the last supported version that is available for MacOS X. We recommend using MacOS X for testing purposes only and not for production.
Download the .dmg file and install the software.
You can launch TD-agent with launchctl command. Make sure the daemon started correctly from the log (/var/log/td-agent/td-agent.log).
MacOS X 10.11.1 (El Capitan) introduced some security changes. When the td-agent is installed, edit the /Library/LaunchDaemons/td-agent.plist file to change /usr/sbin/td-agent to /opt/td-agent/usr/sbin/td-agent.
sudo launchctl load /Library/LaunchDaemons/td-agent.plist
less /var/log/td-agent/td-agent.logYour configuration file is located at /etc/td-agent/td-agent.conf. Your plugin directory is at /etc/td-agent/plugin. To stop the agent, execute the following command:
$ sudo launchctl unload /Library/LaunchDaemons/td-agent.plistBy 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 following curl command:
curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test
tail -n 1 /var/log/td-agent/td-agent.logtd-agent for Mac doesn’t provide an uninstallation application.
To uninstall TD-agent from your Mac, remove these files and directories.
/Library/LaunchDaemons/td-agent.plist
/etc/td-agent
/opt/td-agent
/var/log/td-agent