Failed to start CloudWatch agent on ubuntu22.04

0

Software package download

wget https://amazoncloudwatch-agent.s3.amazonaws.com/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb

amazon-cloudwatch-agent version

dpkg: version 1.300032.2b361-1 of amazon-cloudwatch-agent already installed, skipping

Run the installation command

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m onPremise -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json

` processing amazon-cloudwatch-agent 2024/01/08 09:45:20 E! Failed to open Common Config: open /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml: no such file or directory``

No errors occurred while installing the software. There is only an empty directory amazon-cloudwatch-agent.d in the etc directory. After manually editing the configuration file amazon-cloudwatch-agent.json and starting the agent, an error is reported but there is no "/opt/aws/amazon-cloudwatch-agent/etc/common-config.toml" ” Is it a problem with this version?

DD-Boom
質問済み 5ヶ月前542ビュー
1回答
0

You need a valid configuration file before it will start. Please follow one of the 2 links in this page https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-cloudwatch-agent-configuration-file.html

It may be easier for you initally to use the wizard by running sudo amazon-cloudwatch-agent-config-wizard

profile picture
エキスパート
回答済み 5ヶ月前
  • Even if I use the wizard, the /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml file is not generated. Does this version not have these configuration files by default?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ