Recently, I've been investigating how to setup CloudWatch Monitoring in our AWS instances to include Mem Util and Disk Util.
I've followed this guide. It worked like a charm.
I have everything working on our Production-REF (Reference) box. I create an Image, and add it to our Launch Configuration for our AutoScaleGroup. Everything deploys fine, and all the scripts run.
The Problem: The instance-id is cached on the AutoScale boxes, so it sends all information back as the Production-REF box.
I don't really want to tweak the out of the box AWS script, but I see in CloudWatchClient.pm it calls get_instance_id, which calls get_meta_data, which uses cache [ http://169.254.169.254/latest/meta-data ].
Anyway to clear http://169.254.169.254/latest/meta-data cache? Preferably just the first time its called on that instance. Maybe another way?
Any help is appreciated!