AWS News Blog

New Amazon CloudWatch Monitoring Scripts

Voiced by Polly

Update (January 6, 2016) – The scripts described in this blog post have been deprecated and are no longer available.

For updated information on how to perform the same tasks in a more modern fashion, please take a look at Sending Performance Counters to CloudWatch and Logs to CloudWatch Logs, Configuring a Windows Instance Using the EC2Config Service, and Monitoring Memory and Disk Statistics for Amazon EC2 Linux Instances.


The Amazon CloudWatch team has just released new sample scripts for monitoring memory and disk space usage on your Amazon EC2 instances running Linux.

You can run these scripts on your instances and configure them to report memory and disk space usage metrics to Amazon CloudWatch. Once the metrics are submitted to CloudWatch, you can view graphs, calculate statistics and set alarms on them in the CloudWatch console or via the CloudWatch API.

Available metrics include:

  • Memory Utilization (%)
  • Memory Used (MB)
  • Memory Available (MB)
  • Swap Utilization (%)
  • Swap Used (MB)
  • Disk Space Utilization (%)
  • Disk Space Used (GB)
  • Disk Space Available (GB)

The instance memory and disk space usage metrics are reported as Amazon CloudWatch Custom Metrics. Standard Amazon CloudWatch free tier quantities and pricing apply. This is an unsupported sample but we appreciate all feedback, comments and questions you post to the AWS forums.

To learn more about how to use the scripts, including installation, setup and configuration, please visit “Amazon CloudWatch Monitoring Scripts for Linux” in the Amazon CloudWatch Developer Guide.

— Henry Hahn, Product Manager, Amazon CloudWatch.

Modified 2/9/2021 – In an effort to ensure a great experience, expired links in this post have been updated or removed from the original post.
Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.