Our Blog

AWS CloudWatch – Defining Custom Metric

Posted by:

Amazon CloudWatch is a web service that provides real-time monitoring to Amazon’s EC2 customers on their resource utilization such as CPU, hard disk and network. CloudWatch does not provide any memory, disk space, or load average metrics without running additional software on the instance. Amazon provides example scripts for Linux instances. The data is aggregated and provided through AWS management console. It can also be accessed through command line tools and Web APIs, if the customer desires to monitor their EC2 resources through their enterprise monitoring software.

Problem

Our 24/7 Network Engineers needed to monitor PHP-FPM using the CloudWatch. but it didn’t offer such a plug-in to monitor PHP-FPM. Therefore, they had to write custom metric for CloudWatch.

Solution

Since May 2011, Amazon CloudWatch accepts custom metrics that can be submitted via Web Services API (CLI, Python boto) and then monitored the same way as all other internal metrics, including setting up the alarms for them.

For PHP-FPM, our 24/7 Network Engineers wrote custom based script to monitor metric using AWS CLI. To enable monitoring, they took the following steps:

  • Enabled PHP-FPM Status
  • Installed AWS CL
  • Configured IAM Rules accordingly
  • Wrote scripts using the AWS CLI to define and send metric
0


Add a Comment

Time limit is exhausted. Please reload CAPTCHA.

# #