python-munin
python-munin copied to clipboard
Unable to get queue length for queues not in us-east-1
The munin plugin tracebacks when trying to query the queue length for message queues outside the default region of us-east-1.
$ sudo munin-run aws_sqs_queue_length_test-queue-us-west-2
Traceback (most recent call last):
File "/etc/munin/plugins/aws_sqs_queue_length_sg-test-queue", line 45, in <module>
AWSSQSQueueLengthPlugin().run()
File "/usr/lib/python2.6/site-packages/munin/__init__.py", line 50, in run
values = self.execute()
File "/etc/munin/plugins/aws_sqs_queue_length_sg-test-queue", line 41, in execute
for qname in self.queues
File "/etc/munin/plugins/aws_sqs_queue_length_sg-test-queue", line 41, in <genexpr>
for qname in self.queues
AttributeError: 'NoneType' object has no attribute 'get_queue'
Since the SQSConnection() method is being called the region is being set to the defaults in boto
class SQSConnection(AWSQueryConnection):
...
DefaultRegionName = 'us-east-1'
DefaultRegionEndpoint = 'sqs.us-east-1.amazonaws.com'
...