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?

feita há 2 anos604 visualizações
1 Resposta
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
respondido há 2 anos
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas