xorsyst
xorsyst

Reputation: 8237

Can I have a cloudwatch alarm when a custom metric isn't being produced?

I'm running a python process on an EC2 instance, and I want to alarm if it stops working properly. My plan was to have it add a custom metric data point every minute, and have a custom alarm if no data points are set for 5 minutes, say.

Is this possible? Is there another way to do what I want?

Upvotes: 0

Views: 361

Answers (1)

sysconfig
sysconfig

Reputation: 1407

You can do that, if you use SampleCount for the statistic, not Average or Sum. Then you can trigger an alert if the number of samples is less than a certain threshold.

(On a side note: Average or Sum would eventually go into Insufficient Data status rather than Alarm, if no samples are received at all.)

Upvotes: 2

Related Questions