项目作者: functionalstreams

项目描述 :
Prometheus exporter for SQS
高级语言: Python
项目地址: git://github.com/functionalstreams/sqs-prometheus-exporter.git


SQS Prometheus Exporter

Build Status

A simple SQS prometheus exporter written in python. It reads the attributes from the SQS queue and exposes the
corresponding prometheus metrics.

Example response from /metrics endpoint:

  1. # HELP approximate_number_of_messages Number of messages available
  2. # TYPE approximate_number_of_messages gauge
  3. approximate_number_of_messages{queue="queue1"} 0.0
  4. # HELP approximate_number_of_messages_delayed Number of messages delayed
  5. # TYPE approximate_number_of_messages_delayed gauge
  6. approximate_number_of_messages_delayed{queue="queue1"} 2.0
  7. # HELP approximate_number_of_messages_not_visible Number of messages in flight
  8. # TYPE approximate_number_of_messages_not_visible gauge
  9. approximate_number_of_messages_not_visible{queue="queue1"} 1.0

Access configuration

Credentials for AWS are provided in the following order:

  • Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN)
  • Shared credentials file (~/.aws/credentials)
  • IAM role for Amazon EC2

Run with docker

  1. docker run -p 9095:9095 -it -e AWS_REGION=eu-west-1 \
  2. -e AWS_ACCESS_KEY_ID={{ACCESS_KEY_ID}} \
  3. -e AWS_SECRET_ACCESS_KEY={{SECRET_ACCESS_KEY}} \
  4. -e AWS_SESSION_TOKEN={{SESSION_TOKEN}} \
  5. -e QUEUES_TO_MONITOR=queue1,queue2 \
  6. functionalstreams/sqs-prometheus-exporter:0.1.1

Docker images are hosted here

Installing with helm

Helm chart repository is hosted here. More info on the helm chart can
be found here

For simplicity when managing versions, helm chart and docker image they always have the same version and so app_version is omitted from the helm chart.