Score:0

amazon-cloudwatch-agent shuts down on every application reload

cn flag

I have a Tomcat app on Elastic Beanstalk, and I want to send logs to Cloudwatch Logs. To that end, I set up log4j to write to file, and in .ebextension, amazon-cloudwatch-agent is installed and run.

commands:
#  00_download_and_install:
#    command: rpm --upgrade --force https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
  01_start:
    command: /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json -s
packages:
  yum:
    amazon-cloudwatch-agent: []
files:
  "/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json":
    content: |
       {...
       }

Unfortunately, every time I deploy the app to Elastic Beanstalk, the agent shuts down, and I have to restart it manually via ssh.

f.khantsis avatar
cn flag
if someone with rep can create a tag `amazon-cloudwatch-agent`, it'd be nice
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.