{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Macos XへのTD Agentのインストール","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"macos-xへのtd-agentのインストール","__idx":0},"children":["Macos XへのTD Agentのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Agent(td-agent)を使用して、MaxOS X環境からログをインポートします。MacOS X用には、TD-agentは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://td-agent-package-browser.herokuapp.com/3/macosx"},"children":[".dmg Installer"]},"パッケージとして配布されています。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agent3は、MacOS Xで利用可能な最後のサポート対象バージョンです。MacOS Xは、本番環境ではなくテスト目的でのみ使用することをお勧めします。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"macos-xへのtd-agentのインストール-1","__idx":1},"children":["MacOS Xへのtd-agentのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[".dmgファイルを",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://td-agent-package-browser.herokuapp.com/3/macosx"},"children":["ダウンロード"]},"して、ソフトウェアをインストールしてください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-agentの起動","__idx":2},"children":["TD-agentの起動"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["launchctlコマンドを使用してTD-agentを起動できます。ログ(/var/log/td-agent/td-agent.log)からデーモンが正しく起動したことを確認してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MacOS X 10.11.1(El Capitan)では、いくつかのセキュリティ変更が導入されました。td-agentをインストールする際は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["/Library/LaunchDaemons/td-agent.plist"]},"ファイルを編集して、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["/usr/sbin/td-agent"]},"を**/opt/td-agent/usr/sbin/td-agent**に変更してください。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo launchctl load /Library/LaunchDaemons/td-agent.plist\n\nless /var/log/td-agent/td-agent.log\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["設定ファイル"]},"は/etc/td-agent/td-agent.confにあります。プラグインディレクトリは/etc/td-agent/pluginにあります。エージェントを停止するには、以下のコマンドを実行してください:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ sudo launchctl unload /Library/LaunchDaemons/td-agent.plist\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"httpを使用したサンプルログの投稿","__idx":3},"children":["HTTPを使用したサンプルログの投稿"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトでは、/etc/td-agent/td-agent.confは、HTTPからログを取得してstdout(/var/log/td-agent/td-agent.log)にルーティングするように設定されています。以下のcurlコマンドを使用してサンプルログレコードを投稿できます:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST -d 'json={\"json\":\"message\"}' http://localhost:8888/debug.test\n\ntail -n 1 /var/log/td-agent/td-agent.log\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-agentのアンインストール","__idx":4},"children":["TD-agentのアンインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mac用のtd-agentは、アンインストールアプリケーションを提供していません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Macからtd-agentをアンインストールするには、以下のファイルとディレクトリを削除してください。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["/Library/LaunchDaemons/td-agent.plist"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["/etc/td-agent"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["/opt/td-agent"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["/var/log/td-agent"]}]}]}]},"headings":[{"value":"Macos XへのTD Agentのインストール","id":"macos-xへのtd-agentのインストール","depth":1},{"value":"MacOS Xへのtd-agentのインストール","id":"macos-xへのtd-agentのインストール-1","depth":1},{"value":"TD-agentの起動","id":"td-agentの起動","depth":2},{"value":"HTTPを使用したサンプルログの投稿","id":"httpを使用したサンプルログの投稿","depth":2},{"value":"TD-agentのアンインストール","id":"td-agentのアンインストール","depth":2}],"frontmatter":{"seo":{"title":"Macos XへのTD Agentのインストール"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/integration-hub/streaming/td-agent/installing-td-agent-on-macos-x","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}