How To plot AWS ALB Availability on graph panel with AWS Cloudwatch as datasource

Grafana Version: Grafana v7.3.1 (6668161a88)
Datasource: Cloudwatch Metrics
Query Mode: Cloudwatch Metrics
NameSpace: AWS/ApplicationELB

I am trying to plot ALB availability using following formula

Availability % = (RequestCount - HttpCode_ELB_5xx_Count) / RequestCount
I could easily get Requestcount and HttpCode_ELB_5xx_Count queries. However, I am not able to get ahead with calculations part. I am aware of transformations. I added “Add Field from Calculations” it is not giving any values in graph. Neither subtraction nor division.

Would appreciate community experts help.

You need to use CloudWatch metric math. That is supported also by Grafana.

Thanks for your response,. Yes, I ended up with adding custom metrics and plotting it in grafana. I wish grafana has inbuilt support to do simple math on queries and also have alerting capabilities on those queries.

I didnt mean to use custom metric, but metric math https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html

If you have any working example in public domain which you can point to that would be great. I also need to setup the alerts on the same.

However, Googling and looking at forum posts, it looks like it does not work.

Thanks for engaging with the question.

This dashboard https://grafana.com/grafana/dashboards/12979 implements cloudwatch metric math in the grafana.