Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Tuesday, October 8, 2013

CloudWatch custom metric examples

Creating custom metric requires some custom coding or scripting using the AWS Command Line Interface or SDK.   As the name implies these metric are custom so some custom coding / scripting is required to be done.  Here are some places to start that will provide examples of creating custom metric:
CloudWatch custom metric for MySQL using PHP:
http://aws.typepad.com/aws/2011/05/how-to-use-the-new-cloudwatch-user-defined-metrics-feature-with-php-1.html

Linux script sample custom CloudWatch metric for memory, disk space, and swap space:
http://aws.amazon.com/code/8720044071969977

More examples using the CloudWatch Command Interface to create custom metric:
http://blogs.clogeny.com/custom-metrics-in-amazon-cloudwatch/

Sample code for instance memory reporting:



Friday, May 3, 2013

AWS AMI manifest and content


There are no formal documents that I’m aware of that explain how the images are structured. The details are really self-evident from the existing tools which don’t really obfuscate any of the details.  The details are in the code is in the ec2-bundle-image CLI (90% Ruby and 10% BASH) which actually builds the AMI and manifest file.