aws-samples / amazon-cloudwatch-auto-alarms

Automatically create and configure Amazon CloudWatch alarms for EC2 instances, RDS, and AWS Lambda using tags for standard and custom CloudWatch Metrics.
MIT No Attribution
91 stars 85 forks source link

disk_used_percent does not work with device name xvda1 in Amazon Linux AMI #43

Open vumdao opened 1 year ago

vumdao commented 1 year ago

From the CwAgent namespace, the collected metrics do not contain information xvda1 device name but the mapping

[root@ip-10-0-196-70 bin]# ls -la /dev/xvda1
lrwxrwxrwx 1 root root 9 Apr 21 15:25 /dev/xvda1 -> nvme0n1p1
[root@ip-10-0-196-70 bin]# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

image

knizami commented 1 year ago

Hello, thanks for reporting this, it appears the default device name has changed. I have updated the default_alarms dictionary to reflect the new default device nvme0n1p1:

118789b