Elastic Beanstalk Logs

Learn how to get setup to start collecting, monitoring, and analyzing your elb logs for easy, centralized log management.

For the best user experience, we recommend logging into the LogDNA web app and following the account-tailored add log source instructions. 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.

files:
  "/home/ec2-user/logdna.sh" :
    mode: "000777"
    owner: root
    group: root
    content: |
      #!/bin/sh
      echo "[logdna]
      name=LogDNA packages
      baseurl=http://repo.logdna.com/el6/
      enabled=1
      gpgcheck=0" | tee /etc/yum.repos.d/logdna.repo
      yum -y install logdna-agent
      logdna-agent -k INSERT-YOUR-INGESTION-KEY-HERE
      # The LogDNA agent recursively monitors the /var/log directory by default
      # To optionally specify additional directories, modify and uncomment the line below:
      #logdna-agent -d /home/myhome/myapp/,/var/myapplogs/
      chkconfig logdna-agent on
      service logdna-agent start
commands:
  logdna:
    command: "/home/ec2-user/logdna.sh"

Before redeploying your Elastic Beanstalk app, be sure to insert your LogDNA Ingestion Key and specify any custom directories you want the LogDNA agent to monitor.

Elastic Beanstalk Logs

Learn how to get setup to start collecting, monitoring, and analyzing your elb logs for easy, centralized log management.