aws cloudwatch metrics - AVG over a range

Viewed 1198

I want to make an average graph of the CDCLatencySource and CDCLatencyTarget of few ARNs.

CDCLatencySource are m1,m2,m3,m4

CDCLatencyTarget are m5,m6,m7,m8

So I made another row - AVG([m1,m4]) for the Source and same for the target. But it looks like it average only the m1 & m4 and not the whole range.

What am I missing?

2 Answers

You will need to include all metrics, so for your CDCLatencySource it would be AVG([m1,m2,m3,m4]).

Similarly for CDCLatencyTarget the value would be AVG([m5,m6,m7,m8])

The functions do not accept ranges, instead they accept each metric id individually in the list that is passed into the function.

More information for metric math is available here for further reading.

From the docs:

AVG The AVG of a single time series returns a scalar representing the average of all the data points in the metric. The AVG of an array of time series returns a single time series. Missing values are treated as 0.

Thus you need to provide full array of time series:

AVG([m1,m2,m3,m4])
AVG([m5,m6,m7,m8])
Related