We have a couple of machines in AWS EC2 and are running the Amazon CloudWatch Agent on them to collect metrics. Instead of the default ImageId, InstanceId, InstanceType triplet, the agent is configured to aggregate by InstanceId only:

    "aggregation_dimensions": [
        ["InstanceId", "path"],

In CloudWatch we can then use a SEARCH query to produce a graph:

SEARCH('{CWAgent,InstanceId} MetricName="mem_used_percent"', 'Average', 60)

Which looks like this:

Memory used graph

It's great, except for the labels. These are only showing instance IDs, not instance names. But I swear that yesterday the instance names were showing up in parentheses after the instance ID!

I would really like to see our hand-picked, artisanal instance names here, instead of Amazon's industrial mass-produced instance IDs. I've read about dynamic labels but they don't seem to be a solution.

Is there a way to make instance names show up reliably – either next to the instance ID or all by themselves?

  • I believe in you, I also saw the instance names between parentheses, but after refreshing the page they were gone, so I'm super confused now... Did you manage to workaround this? Jan 15 at 17:59
  • 1
    Yes and no... CloudWatch turned out to be crazy expensive for custom metrics (such as memory usage collected by the CloudWatch agent), so we switched to Prometheus + Grafana. A bit more effort, but far more control, and in our case literally 100x cheaper.
    – Thomas
    Jan 16 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.