{"_id":"57b1f7f54c0c6f0e00007949","parentDoc":null,"__v":2,"version":{"_id":"56ba46e2ce5d540d00e2d7aa","project":"56ba46e2ce5d540d00e2d7a7","__v":13,"createdAt":"2016-02-09T20:06:58.727Z","releaseDate":"2016-02-09T20:06:58.727Z","categories":["56ba46e3ce5d540d00e2d7ab","5771a6b145c7080e0072927f","5771a72eb0ea6b0e006a5221","5772e5b20a6d610e00dea073","577c3006b20f211700593629","57ae587bca3e310e00538155","57ae593a7c93fa0e001e6b50","57b1f8263ff6c519005cf074","582601f155b1060f00ec4173","582a62857a96051b0070b011","58ebfae58d5a860f00851fb9","590a75a1ec0d5e190095ab38","59e5253fd460b50010237bed"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"57ae593a7c93fa0e001e6b50","__v":0,"project":"56ba46e2ce5d540d00e2d7a7","version":"56ba46e2ce5d540d00e2d7aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-12T23:18:18.323Z","from_sync":false,"order":4,"slug":"platforms","title":"Platforms"},"project":"56ba46e2ce5d540d00e2d7a7","user":"5732062ad720220e008ea1d2","updates":["59a011975bcba7000f92abe3"],"next":{"pages":[],"description":""},"createdAt":"2016-08-15T17:12:21.791Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"For the best user experience, we recommend logging into the [LogDNA web app](https://app.logdna.com/) and following the [account-tailored add log source instructions](https://app.logdna.com/pages/add-host). You may also follow the more generic instructions below\n\nCopy the configuration below into a .conf file in your Elastic Beanstalk app's .ebextensions directory. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"files:\\n  \\\"/home/ec2-user/logdna.sh\\\" :\\n    mode: \\\"000777\\\"\\n    owner: root\\n    group: root\\n    content: |\\n      #!/bin/sh\\n      echo \\\"[logdna]\\n      name=LogDNA packages\\n      baseurl=http://repo.logdna.com/el6/\\n      enabled=1\\n      gpgcheck=0\\\" | tee /etc/yum.repos.d/logdna.repo\\n      yum -y install logdna-agent\\n      logdna-agent -k INSERT-YOUR-INGESTION-KEY-HERE\\n      # The LogDNA agent recursively monitors the /var/log directory by default\\n      # To optionally specify additional directories, modify and uncomment the line below:\\n      #logdna-agent -d /home/myhome/myapp/,/var/myapplogs/\\n      chkconfig logdna-agent on\\n      service logdna-agent start\\ncommands:\\n  logdna:\\n    command: \\\"/home/ec2-user/logdna.sh\\\"\\n\",\n      \"language\": \"yaml\",\n      \"name\": \"000logdna.conf\"\n    }\n  ]\n}\n[/block]\nBefore redeploying your Elastic Beanstalk app, be sure to insert your [LogDNA Ingestion Key](https://app.logdna.com/manage/profile) and specify any custom directories you want the LogDNA agent to monitor.","excerpt":"","slug":"elastic-beanstalk","type":"basic","title":"Elastic Beanstalk"}
For the best user experience, we recommend logging into the [LogDNA web app](https://app.logdna.com/) and following the [account-tailored add log source instructions](https://app.logdna.com/pages/add-host). You may also follow the more generic instructions below Copy the configuration below into a .conf file in your Elastic Beanstalk app's .ebextensions directory. [block:code] { "codes": [ { "code": "files:\n \"/home/ec2-user/logdna.sh\" :\n mode: \"000777\"\n owner: root\n group: root\n content: |\n #!/bin/sh\n echo \"[logdna]\n name=LogDNA packages\n baseurl=http://repo.logdna.com/el6/\n enabled=1\n gpgcheck=0\" | tee /etc/yum.repos.d/logdna.repo\n yum -y install logdna-agent\n logdna-agent -k INSERT-YOUR-INGESTION-KEY-HERE\n # The LogDNA agent recursively monitors the /var/log directory by default\n # To optionally specify additional directories, modify and uncomment the line below:\n #logdna-agent -d /home/myhome/myapp/,/var/myapplogs/\n chkconfig logdna-agent on\n service logdna-agent start\ncommands:\n logdna:\n command: \"/home/ec2-user/logdna.sh\"\n", "language": "yaml", "name": "000logdna.conf" } ] } [/block] Before redeploying your Elastic Beanstalk app, be sure to insert your [LogDNA Ingestion Key](https://app.logdna.com/manage/profile) and specify any custom directories you want the LogDNA agent to monitor.