awslogs no longer runs after upgrading to Ubuntu 22.04

1

After the system was upgraded to Ubuntu 22.04, it was no longer possible to upload logs to CloudWatch. The AWS logs program did not generate the log /var/log/awslogs.log. How to fix this problem?

sudo service awslogs status

● awslogs.service - LSB: Daemon for AWSLogs agent. 

    Loaded: loaded (/etc/init.d/awslogs; generated) 


    Active: active (exited) since Tue 2023-10-31 03:13:04 UTC; 43s ago 

    Docs: man:systemd-sysv-generator(8) 

    Process: 1926902 ExecStart=/etc/init.d/awslogs start (code=exited, status=0/SUCCESS) 

    CPU: 22ms

Oct 31 03:13:04 ip-systemd[1]: Starting LSB: Daemon for AWSLogs agent.... 

Oct 31 03:13:04 ip-awslogs[1926908]: Starting system awslogs daemon Oct 31 03:13:04 ip-awslogs[1926910]: process already running. 

Oct 31 03:13:04 ip- awslogs[1926908]: * /var/awslogs/bin/awslogs-agent-launcher.sh is running Oct 31 03:13:04 ip-systemd[1]: Started LSB: Daemon for AWSLogs agent..
DD-Boom
asked 6 months ago316 views
1 Answer
0

Hi there,

Thank you for reaching out to us.

To answer your question and resolve the issue, firstly, CloudWatch Logs agent has been deprecated.

The older logs agent is deprecated. CloudWatch includes a unified agent that can collect both logs and metrics from EC2 instances and on-premises servers. For more information, see : https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_GettingStarted.html

For information about migrating from the older CloudWatch Logs agent to the unified agent, see : https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-cloudwatch-agent-configuration-file-wizard.html

The older CloudWatch Logs agent doesn't support Instance Metadata Service Version 2 (IMDSv2). If your server uses IMDSv2, you must use the newer unified agent instead of the older CloudWatch Logs agent.


Hence, try using the same with Cloudwatch Agent and further test it out.

Because, as mentioned in our public documentation here, the CloudWatch agent is supported for the OS Ubuntu 22.04 : https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html

We require details that are non-public information. Please open a support case with AWS using the following link : https://console.aws.amazon.com/support/home#/case/create

Thank you!

AWS
SUPPORT ENGINEER
Sagar_T
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions