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달 전358회 조회
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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠