Duplicate disk_used_percent metrics

0

I have CloudWatch Agent installed on Ubuntu instances, set to monitor disk_used_percent for two paths ("/", and "/mnt/data")

These are Nitro instances, so the nvme device names can change after reboot (e.g. nvme0n1p1 can become nvme1n1p1). To deal with the nvme device name changes, I use "aggregation_dimensions" leaving out the "device" dimension in the CloudWatch Agent config. This works, but I get duplicate metrics being sent to CloudWatch.

In the CloudWatch console, I see disk_used_percent metrics for both paths listed under
CWAgent > InstanceId, fstype, path

But I also see disk_used_percent metrics for both paths listed under
CWAgent > InstanceId, device, fstype, path

How can I deal with the changing device name, but not send duplicate metrics? Thanks!

Here is my CloudWatch Agent config:

{
  "metrics": {
    "append_dimensions": {                      
      "InstanceId": "${!aws:InstanceId}"
    },
    "aggregation_dimensions" : [["InstanceId","fstype","path"]],
    "metrics_collected": {
      "disk": {
        "measurement": [
          "disk_used_percent"
        ],                
        "resources": [
          "/",
          "/mnt/data"
        ]
      }
    }
  }
}
a-ron
질문됨 3년 전1147회 조회
1개 답변
0

Found the solution. Specify the drop_device option for the "disk" portion of the CloudWatch Agent config, and then you don't need to bother with aggregation_dimensions

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html

"drop_device – Setting this to true causes Device to not be included as a dimension for disk metrics."

a-ron
답변함 3년 전

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

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

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

관련 콘텐츠