Install by .dmg Package (Mac OS)

Install td-agent Version 4

  1. Install td-agent by downloading and installing the .dmg package.

Note: If your OS is not supported, consider gem installation instead.

  1. Launch td-agent using launchctl command to launch td-agent. Make sure that the daemon is started correctly. Check logs (/var/log/td-agent/td-agent.log).
$ sudo launchctl load /Library/LaunchDaemons/td-agent.plist
$ less /var/log/td-agent/td-agent.log
2018-01-01 16:55:03 -0700 [info]: starting fluentd-1.0.2
2018-01-01 16:55:03 -0700 [info]: reading config file path="/etc/td-agent/td-agent.conf"

The configuration file is located at /etc/td-agent/td-agent.conf and the plugin directory is at /etc/td-agent/plugin.

To stop the agent, run the following command:

$ sudo launchctl unload /Library/LaunchDaemons/td-agent.plist
  1. Post Sample Logs via HTTP.

The default configuration (/etc/td-agent/td-agent.conf) is to receive logs at an HTTP endpoint and route them to stdout. For td-agent logs, see /var/log/td-agent/td-agent.log.

You can post sample log records with 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.log
2018-01-01 17:51:47 -0700 debug.test: {"json":"message"}

Uninstalling td-agent

On macOS, td-agent does not provide any uninstallation app like rpm / deb on Ubuntu.

To uninstall td-agent from macOS, remove these files / directories:

  • /Library/LaunchDaemons/td-agent.plist
  • /etc/td-agent
  • /opt/td-agent
  • /var/log/td-agent

Installing calyptia-fluentd Version 1

  1. Install calyptia-fluentd by downloading and installing the .dmg package.

Note:

  • If your OS is not supported, consider gem installation instead.
  • Since calyptia-fluentd v1.3.1, intel version and apple silicon version of packages are provided, -intel suffix is for Intel version and -apple suffix is for Apple Silicon.
  1. Launch calyptia-fluentd by using launchctl command to launch calyptia-fluentd. Make sure that the daemon is started correctly. Check logs (/var/log/calyptia-fluentd/calyptia-fluentd.log).
$ sudo launchctl load /Library/LaunchDaemons/calyptia-fluentd.plist
$ less /var/log/calyptia-fluentd/calyptia-fluentd.log
2021-05-31 14:29:38 +0900 [info]: starting fluentd-1.12.3 pid=72608 ruby="3.0.1"
2021-05-31 14:29:38 +0900 [info]: spawn command to main: cmdline=["/opt/calyptia-fluentd/bin/ruby", "-Eascii-8bit:ascii-8bit", "/opt/calyptia-fluentd/usr/sbin/calyptia-fluentd", "--log", "/var/log/calyptia-fluentd/calyptia-fluentd.log", "--use-v1-config", "--under-supervisor"]

The configuration file is located at /etc/calyptia-fluentd/calyptia-fluentd.conf and the plugin directory is at /etc/calyptia-fluentd/plugin.

To stop the agent, run the following command:

$ sudo launchctl unload /Library/LaunchDaemons/calyptia-fluentd.plist
  1. Post Sample Logs via HTTP.

The default configuration (/etc/calyptia-fluentd/calyptia-fluentd.conf) is to receive logs at an HTTP endpoint and route them to stdout. For calyptia-fluentd logs, see /var/log/calyptia-fluentd/calyptia-fluentd.log.

You can post sample log records with curl command:

$ curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test
$ tail -n 1 /var/log/calyptia-fluentd/calyptia-fluentd.log
2021-05-31 14:32:02.707482000 +0900 debug.test: {"json":"message"}

Uninstalling calyptia-fluentd

On macOS, calyptia-fluentd uses dmg which includes macOS installer a.k.a. pkg. It does not provide any uninstallation app functionality like rpm / deb on CentOS / Ubuntu.

To uninstall calyptia-fluentd from macOS, remove the following files / directories:

  • /Library/LaunchDaemons/calyptia-fluentd.plist
  • /etc/calyptia-fluentd
  • /opt/calyptia-fluentd
  • /var/log/calyptia-fluentd

You must now install the SixthSense log monitoring agent. For more informaiton, see Installing Log Monitoring agents.