0
votes

I have an application. Basically, I want to measure the time between it starts and the request is done processing. I call it latency of processing a request.

I wonder if I can create a custom AWS Cloudwatch metric to monitor it by using PutMetricData API.

1
FYI, if you are using a Classic Elastic Load Balancer, then this metric is already being populated in CloudWatch. See: Elastic Load Balancing Metrics and Dimensions - John Rotenstein
I know it. But I want a custom metric to collect my own logged errors data. - Cong Wang

1 Answers

1
votes

You can create a custom metric.

Define metric name, dimension and value for metric. You can do all statistical methods on those as you usually do with other standard metrics.

Also you can create alarms based on those metric too.

If you use nodejs use the below documentation to put metric.

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatch.html#putMetricData-property

All custom metrics data will appear under Custom Namespaces under CloudWatch > Metrics