AWS cloudwatch terminal output logs

380 Views Asked by At

I'm currently doing my internship, and we were tasked to set up a hawkbit service on EWS ECR. Hawkbit is used for software update roll-outs. We hace hit 2 bumps that we're currently stuck on.

first if we run the docker image on our local server the hawkbit service starts automatically by using a sh-file and running the following command in our dockerfile : CMD ["/hawkbit.sh"]

if we run the image in a cluster on ECR the service doesn't start automatically.

secondly, when hawkbit is running it outputs on the terminal, I can out this output into a log file, however, I'm not able to check the log on cloudwatch. I used the following to create the file and put the input into the file: 2>&1 > /var/log/hawkbit/hawkbit

and I've edited the awslog.conf file as following:

[/var/log/hawkbit/hawkbit]
file = /var/log/hawkbit/hawkbit.*
log_group_name = /var/log/hawkbit/hawkbit
log_stream_name = {cluster}/{container_instance_id}
datetime_format = %Y-%m-%dT%H:%M:%SZ

any idea's would be very appreciated

1

There are 1 best solutions below

0
On

Things to check regarding awslogs agent:

  1. ensure that the service is running
  2. check /var/log/awslogs.log file for errors
  3. make sure instance has role attached with permissions sufficient for agent to work, read about required permissions here.