title: How to capture Memory usage on Elasticbeanstalk using Cloudwatch Logs on Linux instance
body: <p>I have read the AWS docs on Elasticbeanstalk logging and the Cloudwatch agent and it seems the cloudwatch agent should be reporting memory usage (<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/metrics-collected-by-CloudWatch-agent.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/metrics-collected-by-CloudWatch-agent.html</a>) but this dosn't seem to be happening for me. 
  when i go into the Cloudwatch -> metrics -> ec2 i can't see anything related to memory. cpu, network etc is collected but not memory. </p>
  
  <p>The platform version i am using is "PHP 7.2 running on 64bit Amazon Linux/2.8.7"</p>
  
  <p>All the googling seems to indicate that you need to run custom scripts (perl) to get that info, but the article linked above seems to contradict that. </p>
  
  <p>in my .ebextensions folder i have a .config file that turns on the logs. i am also able to send custom application logs without issue.</p>
  
  <pre><code>option_settings:
    - namespace: aws:elasticbeanstalk:cloudwatch:logs
      option_name: StreamLogs
      value: true
  </code></pre>
  
  <p>am i missing an argument somewhere?</p>
  
  <p>Edit: After a bit more research i dont think the "enable log streaming" option i have set actually uses the cloudwatch agent,  <code>/usr/bin/aws logs...</code> is running on the server. so i guess that option enables log pushing via the aws cli?  </p>
  
  <p>i have done some googling and can not find an exampled of how to install the cloud watch agent using .ebextentions. i could try my self but if no one else is doing it that way am i thinking about it wrong?</p>