13

After cloning an EC2 instance using AMI (to change a hosts security group), none of the statistics reported by the Amazon-provided mon-put-instance-data.pl script are showing up in CloudWatch.

I can confirm that the script is reporting the data to CloudWatch but it's not showing up in the CloudWatch console:

# ./mon-put-instance-data.pl --aws-credential-file=/root/.aws-credentials --mem-util --disk-space-util --disk-path=/ --swap-util
Successfully reported metrics to CloudWatch. Reference Id: xxxxxxxx-xxxx-xxxx-xxxx-93f25b4efbc7

1 Answers1

25

Figured it out thanks to strace. The current instance id is cached in /var/tmp/aws-mon and that incorrect cache was preserved via the AMI process.

The solution:

# mv /var/tmp/aws-mon /var/tmp/aws-mon.bak