Skip to content

AWS SQS metric exporter for Prometheus

License

Notifications You must be signed in to change notification settings

lettdigital/sqs-exporter

 
 

Repository files navigation

AWS SQS exporter

A Prometheus SQS metrics exporter

Metrics

Metric Description
aws_sqs_approximate_number_of_messages Number of messages available
aws_sqs_approximate_number_of_messages_delayed Number of messages delayed
aws_sqs_approximate_number_of_messages_not_visible Number of messages in flight

Lables

  • queue name
  • tags - you can disable with flag

For more information see the AWS SQS Documentation

Configuration

Flags:

  • interval - how often to update queue list, env INTERVAL
  • tags - Add a tag to filter the queues of a desired team

Credentials to AWS are provided in the following order:

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

For more information see the AWS SDK Documentation

AWS IAM permissions

The app needs sqs list and read access to the sqs policies

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sqs:GetQueueAttributes",
                "sqs:GetQueueUrl",
                "sqs:ListDeadLetterSourceQueues",
                "sqs:ListQueueTags",
                "sqs:ListQueues"
            ],
            "Resource": "*"
        }
    ]
}

Running

You need to specify the region you to connect to Running on an ec2 machine using IAM roles: docker run -e AWS_REGION=<region> -d -p 9108:9108 sqs-exporter

Or running it externally: docker run -d -p 9108:9108 -e AWS_ACCESS_KEY_ID=<access_key> -e AWS_SECRET_ACCESS_KEY=<secret_key> -e AWS_REGION=<region> sqs-exporter

About

AWS SQS metric exporter for Prometheus

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 74.0%
  • Mustache 11.3%
  • Shell 10.5%
  • Dockerfile 4.2%