{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"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":"td-agentの設定","__idx":0},"children":["TD Agentの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Agent",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(td-agent)"]},"をインストールした後、設定ファイルを変更できます。ファイルは/etc/td-agent/td-agent.confにあります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定ファイルにはいくつかのサンプル設定が含まれています。設定内に以下の行があります。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apikey"]},"オプションを設定してAPIキーを指定してください。APIキーはTreasure コンソールから確認できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"conf","header":{"controls":{"copy":{}}},"source":"# HTTP input\n<source>\n  type http\n  port 8888\n</source>\n\n# Treasure Data output\n<match td.*.*>\n  type tdlog\n  endpoint api-import.treasuredata.com\n  apikey YOUR_API_KEY\n  auto_create_table\n  buffer_type file\n  buffer_path /var/log/td-agent/buffer/td\n  use_ssl true\n  num_threads 8\n</match>\n","lang":"conf"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUR_API_KEY"]}," は、実際の apikey 文字列に置き換える必要があります。API キーは、Treasure コンソール のプロファイルから取得できます。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/my-settings/getting-your-api-keys"},"children":["Write-only API key"]}," の使用が推奨されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"td-agentサービスの再起動","__idx":1},"children":["td-agentサービスの再起動"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Linux\nsudo /etc/init.d/td-agent restart\n\n# macOS\nsudo launchctl unload /Library/LaunchDaemons/td-agent.plist\nsudo launchctl load /Library/LaunchDaemons/td-agent.plist\n","lang":"bash"},"children":[]}]},"headings":[{"value":"TD Agentの設定","id":"td-agentの設定","depth":1},{"value":"td-agentサービスの再起動","id":"td-agentサービスの再起動","depth":1}],"frontmatter":{"seo":{"title":"TD Agentの設定"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/integration-hub/streaming/td-agent/setting-up-td-agent","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}