Configure log steams from beanstalk using the new format?

0

hi.. i've managed to configure cloudwatch logs using the sample config found here https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/configuration-files/aws-provided/instance-configuration/logs-streamtocloudwatch-linux.config

but the reference https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html says that this is an old cloudwatch agent and suggest moving to a unified cloudwatch agent, which makes me somewhat confused.. is it the same rule for beanstalk? the docs don't seem to be that clear for the new agent. do i still need to place it in the .ebextension?

질문됨 2년 전604회 조회
1개 답변
0

The older CloudWatch Logs agent, supports the collection of logs from only servers running Linux. If you're already using that agent, you can continue to do so. However, the older agent requires Python 2.7, 3.0, and 3.3. Because current EC2 instances do not use those versions of Python and those versions are deprecated and are no longer being patched, AWS strongly recommend that you migrate to the unified CloudWatch agent.

Elastic Beanstalk integration with CloudWatch Logs doesn't directly support the streaming of log files that your application generates. So I am assuming that you are trying to log custom files and not the defaults called out per platform within the AWS docs.

If your need is specific to custom logs then install the unified agent through use of an ebextension that simply installs the amazon-cloudwatch-agent package. If you are not familiar with customising the agent a quick and easy way is to run the wizard. You can then have an ebextension start the agent using a saved version that the wizard generated or even start the agent and reference the configuration from the SSM Parameter Store which the wizard can upload config files to.

RoB
답변함 2년 전
  • do i need to install the agent the same way i did with the old one? i'm not familiar with ebextension but looking at the sample file it looks a little similar to ansible script where it actually downloads and install via yum, then writes the config file from scratch, would i need to do the same here as well? can i install the wizard on my own workstation just generate the file? (can i install it on windows to generate configs it for linux machines? does a beanstalk role need to include the CloudWatchAgentServerPolicy for it to be used

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠