amazon-linux-extras on EB for Amazon Linux 2023

0

I have set up an .ebextensions file in a Java deployment on EB to add additional metrics to cloud watch. Just recently tried deploying this to Amazon Linux 2023 with Corretto 17. It's failing to install sudo amazon-linux-extras install collectd -y

Is this no longer necessary on 2023? I don't recall what was needed in the extras package - perhaps already included?


files:
  "/home/ec2-user/amazon-cloudwatch-agent.json":
    mode: "000755"
    owner: root
    group: root
    content: |
      {
        "agent": {
          "metrics_collection_interval": 60
        },
        "metrics": {
          "append_dimensions": {
            "InstanceId": "${aws:InstanceId}"
          },
          "metrics_collected": {
            "mem": {
              "measurement": [
                "mem_total",
                "mem_free",
                "mem_used",
                "mem_used_percent",
                "mem_available",
                "mem_available_percent"
              ],
              "append_dimensions": {
                "AWSEBEnvironmentName": "__EB_ENV__"
              }
            },
            "cpu": {
              "measurement": [
                "cpu_time_active",
                "cpu_time_nice",
                "cpu_time_steal",
                "cpu_usage_active",
                "cpu_usage_idle",
                "cpu_usage_iowait"
              ],
              "append_dimensions": {
                "AWSEBEnvironmentName": "__EB_ENV__"
              }
            },
            "disk": {
              "measurement": [
                "disk_free",
                "disk_total",
                "disk_used",
                "disk_used_percent"
              ],
              "append_dimensions": {
                "AWSEBEnvironmentName": "__EB_ENV__"
              }
            }
          }
        }
      }
container_commands:
  01_install_cloudwatch_agent:
    command: |
      sudo yum install amazon-cloudwatch-agent -y
  02_install_extras:
    command: |
      sudo amazon-linux-extras install collectd -y
  03_prepare_cloudwatch_agent_config:
    command: |
      EB_ENV="$(/opt/elasticbeanstalk/bin/get-config container -k environment_name)"
      sed -i "s/__EB_ENV__/$EB_ENV/g" /home/ec2-user/amazon-cloudwatch-agent.json
  04_run_cloudwatch_agent:
    command: |
      amazon-cloudwatch-agent-ctl -a append-config -m ec2 -c file:/home/ec2-user/amazon-cloudwatch-agent.json -s

質問済み 8ヶ月前807ビュー
1回答
0

Hello.

Unfortunately, Amazon Linux 2023 does not include amazon-linux-extras.
https://aws.amazon.com/linux/amazon-linux-2023/faqs/?nc1=h_ls

Q: Does AL2023 have Amazon-Linux-Extras like AL2?

A: No, AL2023 does not have extras. For higher-level software packages like language runtimes, we will use the quarterly release where we will add major/minor updates to packages as separate namespaced packages in addition to the default package provided in the repository. For example, default Python version in Amazon Linux 2023 may be 3.8, but we will add Python 3.9 (python39) as a separate namespaced package whenever it is made available. These additional packages will closely follow their upstream release cadence and support model and their support policies can be accessed by the package manager for compliance and security use cases. Default packages will continue to be supported throughout the life of AL2023.

So, please execute the following command to install collectd.

sudo yum install collectd
profile picture
エキスパート
回答済み 8ヶ月前

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

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

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

関連するコンテンツ