You are here

Simplify Memory and Disk Utilization Monitoring in AWS

Amazon Web Services CloudWatch is a monitoring tool that surfaces many metrics within your AWS cloud. These metrics help you keep track of your instance performance. However, CloudWatch doesn’t readily surface all of the information you might be looking for. Since AWS does not have access to your OS, some metrics are missing including disk and memory utilization.

AWS has how-to instructions on creating memory, disk and swap checks via Perl scripts located at https://aws.amazon.com/code/8720044071969977. These scripts are manual and need cron to be configured to use designated intervals, every 5 minutes, for example.

Done correctly, scripts are a great way to enhance your monitoring or automation needs. The difficult item to do with scripts is to be able to keep track of what is running and what happens in case of a failure. 

Below, I will show the metrics used in the monitoring scripts along with a sample cron job.

Using cron to run monitoring scripts

Fig 1: Using cron to run monitoring scripts every 5 minutes

Here is a list of the available metrics within the monitoring scripts:

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

AWS CloudWatch metrics memory monitoring view for an EC2 instance

Fig 2: AWS CloudWatch metrics monitoring view for EC2 memory monitoring

The simpler way is to use Agents

A simpler way to get disk and memory usage is to deploy agents that will extract this information. This method is scalable, efficient and can be modified to perform almost any type of monitoring. Agents are available for Linux and Windows servers and contain secure methods for communication. Agents are extensible and can be used to add scripts for handling events within your environment. Agents will give you these benefits. Agents allow for application metrics such as Nginx, MySQL, MongoDB and more. Learn more about Opsview Agents.

Learn More About Opsview Monitoring

More like this

How to monitor AWS
Blog

AWS performance monitoring is more efficient by using Opsview's Opspacks to oversee a variety of AWS services. 

Extending Puppet into your Monitoring Environment
Blog

Opsview has introduced the Opsview Puppet Module, which automatically registers compute instances for monitoring within Opsview Monitor. 

AWS Monitoring
Blog

A look at the advantages of monitoring AWS on top of CloudWatch monitoring, particularly for data capture, metrics and service checks.