Unverified Commit 09a00278 by Joseph Mulloy Committed by GitHub

Merge pull request #4278 from edx/jdmulloy/ops2545/fix_redis_script

Jdmulloy/ops2545/fix redis script
parents 3e2bcc07 fe8a382b
...@@ -73,7 +73,7 @@ class CwBotoWrapper(object): ...@@ -73,7 +73,7 @@ class CwBotoWrapper(object):
help='Maximum number of CloudWatch metrics to publish') help='Maximum number of CloudWatch metrics to publish')
@click.option('--threshold', default=50, @click.option('--threshold', default=50,
help='Maximum queue length before alarm notification is sent') help='Maximum queue length before alarm notification is sent')
@click.option('--sns-arn', '-s', help='ARN for SNS alert topic') @click.option('--sns-arn', '-s', help='ARN for SNS alert topic', required=True)
def check_queues(host, port, environment, deploy, max_metrics, threshold, def check_queues(host, port, environment, deploy, max_metrics, threshold,
sns_arn): sns_arn):
timeout = 1 timeout = 1
...@@ -117,6 +117,7 @@ def check_queues(host, port, environment, deploy, max_metrics, threshold, ...@@ -117,6 +117,7 @@ def check_queues(host, port, environment, deploy, max_metrics, threshold,
'Value': redis_client.llen(queue) 'Value': redis_client.llen(queue)
}) })
if len(metric_data) > 0:
cloudwatch.put_metric_data(Namespace=namespace, MetricData=metric_data) cloudwatch.put_metric_data(Namespace=namespace, MetricData=metric_data)
for queue in queues: for queue in queues:
......
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