jmal98 / sqs-exporter

A Prometheus Exporter for the Amazon Simple Queue Service (SQS)
Apache License 2.0
26 stars 28 forks source link

Exporter not getting all queues if denied access to one #12

Open azelezni opened 4 years ago

azelezni commented 4 years ago

I've noticed this after creating a new queue and not updating the exporter IAM role. We had 4 queues:

  1. qa-queue-cpu
  2. qa-queue-gpu
  3. qa-queue-mem
  4. qa-queue-tasks

The exporter was configured with SQS_QUEUE_NAME_PREFIX=qa and was working fine, yesterday we added a new queue qa-queue-split and didn't update the IAM role for the exporter, then I noticed that the qa-queue-tasks metrics are gone, but all the other are working fine. After updating the IAM role I finally got metrics from all the queues.

It seems to me that queues are being sorted alphabetically, and if the exporter doesn't have access to one of them, it'll stop at that one, this explains why it didn't get metrics from a queue that was working before we added the new one.