- Newest
- Most votes
- Most comments
- You can set a custom label on the Y-axis in Options tab of graph
- Also, turn off the option to display the units
- SUM(METRICS()) is the quick way to sum all fully-named metrics
- /PERIOD(m1) will convert the total time, to total time per second
The following graph should do the trick:
{
"metrics": [
[ { "expression": "SUM(METRICS())/PERIOD(m1)", "label": "Total", "id": "total", "region": "us-west-2", "yAxis": "left" } ],
[ "AWS/ApplicationELB", "TargetResponseTime", "LoadBalancer", "app/k8s-warXXXXXX-XXXXX/XXXXX", { "label": "a", "region": "us-west-2", "id": "m1", "visible": false } ],
[ "...", { "region": "us-west-2", "label": "b", "id": "m2", "visible": false } ],
[ "...", { "region": "us-west-2", "label": "c", "id": "m3", "visible": false } ],
[ "...", { "region": "us-west-2", "label": "d", "id": "m4", "visible": false } ],
[ "...", { "region": "us-west-2", "label": "e", "id": "m5", "visible": false } ]
],
"period": 60,
"region": "us-east-1",
"stat": "Average",
"title": "Target Response Time (per second)",
"yAxis": {
"left": {
"min": 0,
"label": "Seconds",
"showUnits": false
}
},
"view": "timeSeries",
"stacked": false
}
Hello!
Thank you for contacting AWS re:Post!
Since SUM is nothing but the sum of the values of the all data points collected during the period, there is no unit associated with the expression and CloudWatch attaches no significance to a unit internally, other applications can derive semantic information based on the unit. [1][2]
That being said, the response shared above by user @Amazon-CloudWatch-0 (Thanks!) includes a valid workaround of using a custom label on the Y-axis in Options tab of graph. I am glad to see that response was of help to you.
I hope you will find the above information useful. In the meantime, please feel free to reach out in case you have any further queries or concerns. We would be happy to assist you.
====================
References:
[1] CloudWatch statistics definitions - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html
[2] Amazon CloudWatch concepts - Units - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Unit
Relevant content
- asked 5 years ago
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
- How do I troubleshoot an increase in the TargetResponseTime metric for an Application Load Balancer?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
The expression you provided did not work but adding "label": "Seconds", "showUnits": false in the query is an acceptable workaround. Thank you very much