A Prometheus SQS metrics exporter
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 |
- queue name
- tags - you can disable with flag
For more information see the AWS SQS Documentation
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
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": "*"
}
]
}
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