By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Cloudwatch alarm taking a lot of time with missing data

0

We are currently using cloudwatch alarms(PutMedia.Success metric) to give us a notification whenever there is no frame in Kinesis Video Stream.But the state change(from 'ok' to 'alarm') takes around 6 mins. Upon further investigation, we came across a discussion thread where it has mentioned that this is the expected behaviour of cloudwatch alarms in case of missing data points. Is there any way can we bring the time taken for state change to under a minute? It would be really helpful if you could help us with this. I will attach the discussion thread and screenshot of our cloudwatch configuration with this question. Eagerly waiting for a reply/

https://forums.aws.amazon.com/thread.jspa?threadID=284182

2 Answers
2

Hi there,

I am understanding your question as to when the PutMedia.Success metric from (1) has a missing datapoint you would like to trigger the Alarm in a timely manner, please correct me if I'm wrong.

General background on CloudWatch Alarm evaluation (2), whenever an Alarm tries to evaluate it retrieves more periods of data actually configured as per datapoints to Alarm + Period configured on the Alarm. For example, if you have configured Period=1min(60s), and Datapoints to Alarm of '1 out of 1' on a Standard metric Alarm - then practically last 1 minute of datapoint is required/used for the Alarm evaluation which is called Evaluation Period. However, from CloudWatch service there is an extension to this function which it retrieves more periods of datapoints required/configured for the Alarm and that is called 'Evaluation Range' which typically the number of period for the Range depends on the type of metric and period it is configured.

As explained on (2), with the implementation of Evaluation Range each evaluation has more datapoints required and when the latest datapoints are missing it may or may not be used in the evaluation based on the configuration. Most importantly, CW tends to use Missing Datapoints as less as possible, so when there is enough datapoints required to evaluate the state from Evaluation range then no missing datapoints will be used so in this case Treat Missing Data attributes do not come into the picture if there are enough number of Datapoints to evaluate the state within Evaluation range. When there is not enough datapoints within Evaluation Range, then the Missing Datapoints and TreatMissingData attributes come into the picture. This can be understood effectively from the link (2).

So back to your initial question, if the PutMedia.Success do not publish datapoint(missing datapoint) and then you want the Alarm to trigger - you can utilize metric math FILL() function. Fill function lets you fill the value of a datapoint when the value is missing, so let's say your metric has missing datapoint then if you use FILL(m1,FILLING_VALUE) on the Alarm where FILLING_VALUE is a value that breaches the threshold of your Alarm then this alarm should trigger if 1 out of 1 configuration is in place.

I suggest testing this function on a custom metric or dev environment to fully understand how the function is working in your scenario then proceed with deploying to prod environment.

Feel free to further discuss by providing alarm configuration details.

Thanks

AWS
SUPPORT ENGINEER
answered 3 years ago
1

Hey! Thanks for your help! It worked.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions