Nagios has a nice feature called passive checks. You can define a passive service and configure a "freshness_threshold". That works great for regular jobs (i.e. backup jobs or similar) where the admin only needs to be warned if the job did not run.

So this works effectively like a "dead man's switch". As long as everything is fine, the administrator gets no alert at all. Only when the job did not run for a certain time, the alert is triggered.

I tried to find a similar functionality in AWS CloudWatch without success. Can CloudWatch Alerts be configured to work similar to this?

You should be able to do this by selecting the "less than" symbol when defining your alarm threshold, then logging an invocation whenever your task runs.

In other words, if your metric falls to 0 executions over your typical execution cycle then trigger an alarm.

This is possible with a combination of the check period, evaluation period, and the "treat missing data" option. Check out https://ruempler.eu/2017/06/26/dead-mans-switch-backup-alerting-aws-cloudwatch/ for an example and a CloudFormation snippet.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.