I am writing alarms for the MSK cluster and for the CPU utilization I need to create a composite metric which is sum of two metrices CpuUser and CpuSystem. The alarm will get triggered when the composite metric reaches an average of CPU utilization of 60%. https://repost.aws/knowledge-center/msk-broker-high-cpu-usage
Can anyone help here? AWS official documentation suggests using the Math function for this https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/using-metric-math.html.
I achieved this by using 'metric_query'. created two metric queries for both metrics 'CpuUser' and 'CpuUser' then in the third one provided expression of addition.. so finally the code looks like this.