{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"AWS Elastic Beanstalk インポート統合","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":"aws-elastic-beanstalk-インポート統合","__idx":0},"children":["AWS Elastic Beanstalk インポート統合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AWS Elastic BeanstalkとTreasure Dataを組み合わせることで、フロントエンドとバックエンドの両方のシステムにおいて、即座にスケーラビリティを実現できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure Dataの基本知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AWS Elastic Beanstalkの基本知識"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"treasure-agentのインストール","__idx":2},"children":["Treasure Agentのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の手順に従って、Treasure Agent(td-agent)ストリーミングデータコレクターをアプリケーションにインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-agentとは","__idx":3},"children":["td-agentとは?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure DataのTd-agentは、AWS Elastic Beanstalkコンテナ上でTreasure Dataを使用するために必要な分散ログコレクターです。td-agentを使用して、AWS Elastic BeanstalkアプリケーションからTreasure Dataのクラウドデータウェアハウスにログをインポートします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"インストール","__idx":4},"children":["インストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コンテナ内にtd-agentをインストールするためのボイラープレートアプリケーションは、次のリポジトリで利用できます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/elastic-beanstalk-td-agent"},"children":["treasure-data/elastic-beanstalk-td-agent"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ebextensionsスクリプトのインストール","__idx":5},"children":[".ebextensionsスクリプトのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例に示すように、GitHubから2つのファイルをダウンロードし、.ebextensionsディレクトリに配置します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ cd $YOUR\\_REPO\n$ mkdir -p .ebextensions\n$ wget -O.ebextensions/0-td-agent-gen-config.config '<https://raw.github.com/treasure-data/elastic-beanstalk-td-agent/master/.ebextensions/0-td-agent-gen-config.config>'\n$ wget -O.ebextensions/1-td-agent-install.config '<https://raw.github.com/treasure-data/elastic-beanstalk-td-agent/master/.ebextensions/1-td-agent-install.config>'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"apiキーの設定","__idx":6},"children":["APIキーの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次に、設定ファイル内の適切な場所にAPIキーを配置します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td apikey:show\n$ emacs .ebextensions/0-td-agent-gen-config.config\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"デプロイ","__idx":7},"children":["デプロイ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最後に、変更を本番環境にデプロイします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ git add .ebextensions/0-td-agent-gen-config.config\n$ git add .ebextensions/1-td-agent-install.config\n$ git commit -a -m 'custom extensions to install td-agent'\n$ git aws.push\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"データアップロードの確認","__idx":8},"children":["データアップロードの確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["curlコマンドを発行して、ローカルシステムからTreasure Dataにログをインポートできます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["数分後(通常は約5分)、次のコマンドを発行して、データがクラウドにアップロードされたことを確認できます。カウントがゼロより大きい場合、データのアップロードは成功しています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td tables testdb\n+----------+-------------------------+------+-------+----------------+\n| Database | Table | Type | Count | Schema |\n+----------+-------------------------+------+-------+----------------+\n| testdb | www\\_access | log | 5 | |\n+----------+-------------------------+------+-------+----------------+\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"アプリケーションからのデータインポート","__idx":9},"children":["アプリケーションからのデータインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これで、td-agent経由でアプリケーションからTreasure Dataにデータをインポートする準備が整いました。アプリケーションの言語に適したロガーを選択してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Supported Languages"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/ruby-apps-import-integration"},"children":["Ruby"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/rails-apps-import-integration"},"children":["Rails"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/java-apps-import-integration"},"children":["Java"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/perl-apps-import-integration"},"children":["Perl"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/python-apps-import-integration"},"children":["Python"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/php-apps-import-integration"},"children":["PHP"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/scala-apps-import-integration"},"children":["Scala"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/node-js-apps-import-integration"},"children":["Node.js"]}]}]}]},"headings":[{"value":"AWS Elastic Beanstalk インポート統合","id":"aws-elastic-beanstalk-インポート統合","depth":1},{"value":"前提条件","id":"前提条件","depth":1},{"value":"Treasure Agentのインストール","id":"treasure-agentのインストール","depth":1},{"value":"td-agentとは?","id":"td-agentとは","depth":2},{"value":"インストール","id":"インストール","depth":2},{"value":".ebextensionsスクリプトのインストール","id":"ebextensionsスクリプトのインストール","depth":3},{"value":"APIキーの設定","id":"apiキーの設定","depth":3},{"value":"デプロイ","id":"デプロイ","depth":3},{"value":"データアップロードの確認","id":"データアップロードの確認","depth":2},{"value":"アプリケーションからのデータインポート","id":"アプリケーションからのデータインポート","depth":1}],"frontmatter":{"seo":{"title":"AWS Elastic Beanstalk インポート統合"}},"lastModified":"2025-11-13T08:46:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/aws-elastic-beanstalk-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}