Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS CloudWatch alarms be paused/disabled during specific hours?

Tags:

I want to automatically toggle alarms on/off during specific periods of time so that they do not fire during maintenance windows. I'm doubting that an easy or direct method exists since I could not find such a thing in the documentation. Does anyone know of a different approach to achieve this while still using CloudWatch alarms, or did I miss an obvious solution?

like image 554
jmsb Avatar asked Jul 14 '14 13:07

jmsb


People also ask

How do I temporarily disable CloudWatch alarm?

What you want to do is: right before the maintenance window starts you Disable the alarm actions. As the windows ends you Enable the alarm actions. Show activity on this post.

How do I turn on my CloudWatch alarm?

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances. Select the instance and choose Actions, Monitor and troubleshoot, Manage CloudWatch alarms. On the Manage CloudWatch alarms detail page, under Add or edit alarm, select Create an alarm.

What is the minimum duration of a CloudWatch alarm?

When setting an alarm on a basic monitoring metric, select a period of at least 300 seconds (5 minutes). Detailed monitoring for Amazon EC2 provides metrics for your instances with a resolution of 1 minute.


1 Answers

I got here while looking for something that would help me to disable alerts for my machine which is performing backups every Saturday between 11:00 and 11:30. The only solution I found is to create cronjob to disable/enable particular alert and run them on particular times:

59 10 * * 6 ec2-user aws cloudwatch disable-alarm-actions --alarm-names "Alarm-1" "Alarm-2" 31 11 * * 6 ec2-user aws cloudwatch disable-alarm-actions --alarm-names "Alarm-1" "Alarm-2" 

Your node needs to have access to CloudWatch, obviously. I gave it CloudWatchFullAccess.

like image 185
Remigiusz Avatar answered Sep 20 '22 12:09

Remigiusz