Overview
Amazon Simple Queue Service (SQS) is a fully managed message queuing service. SigNoz helps you monitor queue depth, message age, and throughput.
Prerequisites
- AWS account with appropriate permissions
- SigNoz Cloud account or Self-Hosted SigNoz
One-Click Integration
One-Click Integration is available for SigNoz Cloud only and includes pre-built dashboards. This method uses AWS CloudFormation and CloudWatch, which may incur additional AWS charges.
Step 1: Connect Your AWS Account
Follow the One-Click AWS Integrations Guide to:
- Deploy the CloudFormation stack
- Connect your AWS account to SigNoz
Step 2: Enable SQS Monitoring
Once connected, SigNoz will auto-discover your SQS queues and begin collecting CloudWatch metrics.
What's Collected
| Metric | Description |
|---|---|
ApproximateNumberOfMessagesVisible | Messages available for retrieval |
ApproximateNumberOfMessagesNotVisible | Messages in flight |
ApproximateNumberOfMessagesDelayed | Delayed messages |
ApproximateAgeOfOldestMessage | Age of oldest message |
NumberOfMessagesSent | Messages sent to queue |
NumberOfMessagesReceived | Messages received from queue |
NumberOfMessagesDeleted | Messages deleted |
Pre-built Dashboards
Navigate to Dashboards and search for "SQS" to find automatically imported dashboards.
Manual Setup (SQS Exporter)
Manual setup works for both SigNoz Cloud and Self-Hosted.
This guide uses the SQS Exporter, a Prometheus exporter that queries SQS directly (not via CloudWatch). This approach is simpler, more cost-effective, and provides real-time queue metrics.
Prerequisites
Before proceeding, ensure you have:
- OpenTelemetry Collector installed and configured. See Get Started with OTel Collector.
- Docker installed on the host machine.
- AWS credentials configured via environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION), IAM role, or instance profile. - IAM permissions for the credentials:
sqs:ListQueuessqs:GetQueueAttributes
Where to Run the SQS Exporter
The SQS Exporter should run on a machine that:
- Has network access to AWS SQS APIs.
- Has AWS credentials configured.
- Is network-accessible from your OpenTelemetry Collector.
For SigNoz Cloud users, run the exporter on any EC2 instance, VM, or container with AWS credentials. The OTel Collector on the same host will forward metrics to SigNoz Cloud.
For Self-Hosted users, run the exporter on the same host as your OTel Collector, or ensure network connectivity between them.
Step 1: Run the SQS Exporter
Run the SQS Exporter as a Docker container:
docker run -d \
--name sqs-exporter \
-p 9384:9384 \
-e AWS_ACCESS_KEY_ID=<your-access-key> \
-e AWS_SECRET_ACCESS_KEY=<your-secret-key> \
-e AWS_REGION=<aws-region> \
jmal98/sqs-exporter:0.2.0
Replace the following:
<your-access-key>: Your AWS access key ID.<your-secret-key>: Your AWS secret access key.<aws-region>: Your AWS region where SQS queues are deployed (e.g.,us-east-1,eu-west-1,ap-south-1).
If running on an EC2 instance with an IAM role, you can omit the AWS credential environment variables. The exporter will use the instance profile credentials automatically.
Verify the exporter is running by checking the metrics endpoint:
curl http://localhost:9384/metrics | grep sqs_
You should see metrics like:
sqs_approximatenumberofmessages– Messages available for retrievalsqs_approximatenumberofmessagesdelayed– Messages waiting to be availablesqs_approximatenumberofmessagesnotvisible– Messages currently being processed (in-flight)
Step 2: Configure OpenTelemetry Collector
Add Prometheus Receiver
Add the following
prometheusreceiver to yourotel-collector-config.yamlto scrape the SQS Exporter:otel-collector-config.yamlreceivers: prometheus: config: scrape_configs: - job_name: 'aws-sqs' scrape_interval: 60s static_configs: - targets: ['<exporter-host>:9384']Replace
<exporter-host>with the IP/hostname where the SQS Exporter is running (uselocalhostif on the same machine).Add Resource Processor
The dashboard requires a
deployment.environmentlabel to filter metrics. Add thisresourceprocessor to tag your metrics:otel-collector-config.yamlprocessors: resource/env: attributes: - key: deployment.environment value: production # Replace with your environment name action: upsertUpdate Pipeline
Enable both the
prometheusreceiver and theresource/envprocessor in your metrics pipeline:otel-collector-config.yamlservice: pipelines: metrics: receivers: [otlp, prometheus] processors: [resource/env, batch] exporters: [otlp]
Append the receivers and processors blocks to your existing configuration. For the service pipeline, update your existing metrics pipeline to include the new components.
Restart your OpenTelemetry Collector to apply the changes.
Validate
To confirm that SQS metrics are flowing to SigNoz:
- Import the Dashboard: Navigate to AWS SQS Prometheus Dashboard and Import Dashboard.
- Verify Metrics: Open the imported dashboard. You should see charts populated with data like queue depth and message age.
- Alternative - Query Builder:
- Go to Dashboards → New Dashboard → New Panel.
- Search for metrics starting with
sqs_(e.g.,sqs_approximatenumberofmessages). - Verify that metrics have
queue_namelabels matching your SQS queues.
If the dashboard is populated or you see metrics in the query builder, your setup is working correctly.
What's Collected
| Metric | Description |
|---|---|
sqs_approximatenumberofmessages | Messages available for retrieval from the queue |
sqs_approximatenumberofmessagesdelayed | Messages waiting to be added to the queue |
sqs_approximatenumberofmessagesnotvisible | Messages currently being processed (in-flight) |
Pre-built Dashboard
Import the AWS SQS Prometheus Dashboard for a comprehensive view of your SQS queues:
This dashboard provides queue health monitoring, message flow analysis, and multi-environment support.
Next Steps
Once SQS metrics are flowing to SigNoz, you can:
- Set up alerts for critical metrics like queue depth or message age. See Alerts.
- Create dashboards to visualize SQS performance. See Dashboards.