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
已提问 7 个月前339 查看次数
1 回答
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
支持工程师
Sagar_T
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则