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 個月前檢視次數 356 次
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
已回答 7 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南