Amazon EC2 · Finder + automated fixer

Fix the CloudWatch agent configuration on EC2

FixCloudWatch Agent Configuration

Finds EC2 instances where the CloudWatch agent runs but does not publish memory metrics in the form Compute Optimizer reads, and fixes the agent's configuration.

What happens, in order.

  1. Finder · read-only

    Finds the opportunity

    Scans your connected accounts with a read-only role. It can see resource metadata and usage; it can’t change anything.

  2. You

    Approve in Recommendations

    It appears in your Recommendations view with what it would save. Approve the resources you choose. Nothing has changed yet.

  3. Fixer

    Runs in your account

    The fixer runs as an AWS Systems Manager Automation runbook in your AWS account, and acts only on the resources you approved.

  4. Record

    Logs the execution

    The Systems Manager execution is logged, so every change can be audited.

Finder role

Read-only. It can see resource metadata and usage. It can’t change anything.

Fixer role

A separate, minimal role that acts only on the resources you approved, through AWS Systems Manager.

Why it costs money

This fix saves nothing directly. The record places it in a set of fixes meant to widen SSM Agent and CloudWatch agent coverage, the groundwork other savings depend on.

Configuration decides what the agent reports. For EC2 memory, AWS says Compute Optimizer looks under particular metric names, in a particular namespace, with the InstanceId dimension, and cannot collect the data when that dimension is missing or renamed.

A misconfigured agent is not free either. In the classic configuration every metric it publishes is billed as a custom metric, and AWS publishes guidance on cutting their number and cost.

What to look at

  • Linux instances. Compute Optimizer reads mem_used_percent in the CWAgent namespace, or the legacy MemoryUtilization metric in System/Linux.
  • Windows instances. It reads Available MBytes in the CWAgent namespace, and AWS recommends configuring that metric as the Windows memory metric.
  • The namespace and dimensions in the configuration file. CWAgent is the default, and a missing or renamed InstanceId dimension stops Compute Optimizer collecting the instance’s memory data.
  • The opentelemetry section. Metrics configured there are not published in a namespace at all.
  • An agent that will not start. On Linux its configuration errors are logged in configuration-validation.log under /opt/aws/amazon-cloudwatch-agent/logs.

What the change does

  • CloudFix fixes the CloudWatch agent configuration on EC2 instances, as the record names it.
  • To check the agent before and after, AWS’s AWSSupport-TroubleshootCloudWatchAgent runbook checks the agent’s status and analyzes its logs.
  • Compute Optimizer’s default look-back for utilization metrics is 14 days.

Sources: AWS: Compute Optimizer EC2 metrics (memory); AWS: CloudWatch agent configuration file; AWS: Troubleshooting the CloudWatch agent; AWS: Metrics collected by the CloudWatch agent; AWS: Collect metrics, logs and traces with the CloudWatch agent; AWS: Compute Optimizer enhanced infrastructure metrics.

See whether this one applies to your account.

A free savings assessment reports which fixers can be applied to your environment. Results typically within 24 hours.