Site icon Blog

Custom Metric in Amazon CloudWatch

Amazon CloudWatch is an Amazon Web Service (AWS) utility tool, which allows monitoring of various components like EC2 instance, Elastic load balancer and EBS volumes. One can also monitor CPU utilization, disk read byte, disk writes byte, networking in and networking out for EC2 instance with its support.

Amazon CloudWatch provides custom metrics to avoid various problems. With the help of Amazon CloudWatch, one can simply define the custom metric based on one’s individual need or requirements. And one can also update it at regular intervals.

This can be simply demonstrated by using an example of a free memory. The main objective in this instance is to define a custom metric for a free memory and constant input the data to the metric using the machine which needs to be monitored.

ubuntu@domU-12-41-32-0B-01-A7:~$ mon-put-data -m “FreeMemory” –namespace metaoption –dimensions “instance=i-f23233,servertype=MongoDB” –value 100 -u Bytes

The command will create a free memory in the next 20 minutes, with the customized namespace and dimensions, set as per your needs. For the instance, we have to choose a dummy value and the unit we choose is bytes.

For more information please go through the link:

http://docs.amazonwebservices.com/AmazonCloudWatch/latest/DeveloperGuide/index.html?CLIReference.html

Once it is created, we need to continuously update the data to the metrics that contain information about the current memory status of the system and can be used as the data source.

Deleting Custom Metrics:

A cloud metric will be automatically deleted once it remains unused for 2 weeks.

Pricing: $ 0.50 per metric per month

Exit mobile version