Unverified Commit 835a518e by Feanil Patel Committed by GitHub

Make it so we update alarms even when they already exist.

parent e81a31fa
......@@ -143,11 +143,8 @@ def check_queues(host, port, environment, deploy, max_metrics, threshold,
alarm_name = "{}-{} {} queue length over threshold".format(environment,
deploy,
queue)
if len(cloudwatch.describe_alarms_for_metric(Namespace=namespace,
MetricName=metric_name,
Dimensions=dimensions)
['MetricAlarms']) < 1:
print('Creating new alarm "{}"'.format(alarm_name))
print('Creating or updating alarm "{}"'.format(alarm_name))
cloudwatch.put_metric_alarm(AlarmName=alarm_name,
AlarmDescription=alarm_name,
Namespace=namespace,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment