Queue Monitor
Know your queues
before they overflow.
A Laravel Composer package that collects queue metrics and pushes them to HostAtlas. Track queue sizes, failed jobs, active workers, and throughput across Redis, Database, and SQS drivers. For non-Laravel systems, push metrics via the API from any language.
Install via Composer
$ composer require hostatlas/queue-monitor_ 0
Queue systems supported
0
Metrics per queue
<0 min
Setup time
0
API endpoint for any language
Installation
Two commands. Queues monitored.
Install the package via Composer, publish the config file, set your API key, and queue monitoring is live. The package auto-detects your queue driver and discovers active queues automatically for Redis connections.
Require the package
composer require hostatlas/queue-monitor Publish config
php artisan vendor:publish --tag=hostatlas-queue-config Set your environment variables
HOSTATLAS_URL=https://my.hostatlas.app
HOSTATLAS_API_KEY=your-api-key
HOSTATLAS_SERVER=your-server-uuid
# Install and configure
$ composer require hostatlas/queue-monitor
Using version ^1.2 for hostatlas/queue-monitor
./composer.json has been updated
Installing dependencies...
Package hostatlas/queue-monitor installed.
$ php artisan vendor:publish --tag=hostatlas-queue-config
Publishing config...
config/hostatlas-queue.php published.
$ php artisan hostatlas:queue-metrics
Detecting queue driver... redis
Discovering queues... default, emails, notifications
Collecting metrics...
Metrics pushed to HostAtlas.
Queue Drivers
Redis. Database. SQS. All covered.
The package auto-detects your configured queue driver and collects metrics accordingly. Redis queues are auto-discovered — no need to list them manually. Database and SQS drivers require queue names in config.
Redis
Full auto-detection of all Redis queues. The package scans your Redis connection for Laravel queue keys and discovers every active queue without any manual configuration.
- check Auto-discover queues from Redis keys
- check Queue size, reserved, and delayed counts
- check Zero configuration required
Database
Queries the jobs table directly to count pending, reserved, and failed jobs per queue. Works with MySQL, PostgreSQL, and SQLite queue tables out of the box.
- check Direct query on the jobs table
- check MySQL, PostgreSQL, SQLite support
- check Configure queue names in config file
Amazon SQS
Fetches queue attributes directly from the SQS API. Tracks approximate message count, in-flight messages, and delayed messages per queue.
- check SQS GetQueueAttributes API integration
- check Approximate messages visible and in-flight
- check Uses existing AWS credentials from Laravel
Metrics
Six metrics per queue. Full visibility.
Every collection cycle captures a complete snapshot of each queue's health. These metrics are stored, charted, and available for alerting on the HostAtlas dashboard.
Queue Size
Total number of jobs waiting to be processed. A growing queue size indicates workers can't keep up with incoming jobs.
queue_size: 1,247
Failed Jobs
Count of jobs that have exhausted their retry attempts and moved to the failed jobs table. Spike detection triggers immediate alerts.
failed_jobs: 3
Processing Count
Jobs currently being processed by workers. A high processing count with a growing queue size means you need more workers.
processing: 8
Active Workers
Number of worker processes currently consuming from the queue. Zero workers means jobs will pile up indefinitely.
workers: 4
Jobs per Minute
Throughput rate calculated from queue size deltas between collection cycles. Track processing velocity over time.
jobs_per_minute: 142
Wait Time
Average time a job waits in the queue before a worker picks it up. Rising wait times signal capacity issues.
avg_wait_ms: 340
Beyond Laravel
Laravel. BullMQ. Sidekiq. Celery.
The Composer package is purpose-built for Laravel, but HostAtlas accepts queue metrics from any system through the push API. Bring your own collector or use our reference implementations.
Laravel
First-class Composer package with auto-detection, artisan commands, and scheduler integration. Redis queues discovered automatically.
Composer packageBullMQ
Push metrics from your Node.js application using the API endpoint. Query BullMQ's Redis structures and POST the results to HostAtlas.
API pushSidekiq
Use the Sidekiq API to collect queue stats and push them via HTTP. Works with Sidekiq's built-in Stats and Queue classes.
API pushCelery
Query Celery's broker (Redis or RabbitMQ) for queue lengths and push metrics via the API. Works with Flower or direct broker inspection.
API pushConfiguration
Three env vars. One config file.
The published config file gives you full control over which queues to monitor, the collection interval, and the API endpoint. Redis users can rely on auto-discovery; all others specify queue names explicitly.
<?php
return [
// HostAtlas platform URL
'url' => env('HOSTATLAS_URL', 'https://my.hostatlas.app'),
// API key for authentication
'api_key' => env('HOSTATLAS_API_KEY'),
// Server UUID on HostAtlas
'server' => env('HOSTATLAS_SERVER'),
// Queue names (null = auto-discover for Redis)
'queues' => null,
// Or specify explicitly:
// 'queues' => ['default', 'emails', 'exports'],
];
HOSTATLAS_URL
The base URL of your HostAtlas instance. Defaults to the hosted platform. Override for self-hosted installations.
HOSTATLAS_API_KEY
Your team's API key from the HostAtlas dashboard. Used to authenticate every metrics push request.
HOSTATLAS_SERVER
The UUID of the server on HostAtlas that these queues belong to. Found in your server settings page.
Usage
Artisan command. Or schedule it.
Run the metrics collector manually with the artisan command, or add it to Laravel's task scheduler to push metrics automatically every minute. Both approaches collect the same data and push to the same API endpoint.
Artisan Command
Run manually or from a cron job
# Collect and push queue metrics
$ php artisan hostatlas:queue-metrics
Queues discovered: 3
default: 247 pending, 0 failed
emails: 1,089 pending, 2 failed
notifications: 18 pending, 0 failed
Metrics pushed successfully.
Scheduler Integration
Automatic collection every minute
// In your schedule method:
protected function schedule(Schedule $schedule)
{
$schedule
->command('hostatlas:queue-metrics')
->everyMinute()
->withoutOverlapping()
->runInBackground();
}
External API
Push from any language. One HTTP call.
Not using Laravel? Push queue metrics from any application using a simple POST request. The API accepts JSON payloads with queue names and their metrics. Use it with BullMQ, Sidekiq, Celery, or your own custom queue system.
# Push queue metrics via API
$ curl -X POST \
https://my.hostatlas.app/api/v1/queue/push \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"server": "server-uuid",
"queues": [
{
"name": "default",
"size": 247,
"failed": 0,
"processing": 4,
"workers": 4,
"jobs_per_minute": 142
}
]
}'
Endpoint
POST /api/v1/queue/push Authentication
Bearer token via Authorization header. Use your team's API key.
Content-Type
application/json
Required fields per queue
name — string — queue identifier
size — int — pending job count
failed — int — failed job count
processing — int — in-progress jobs
workers — int — active worker count
jobs_per_minute — float — throughput rate
Dashboard
All your queues. One screen.
Queue metrics appear on your server's dashboard alongside CPU, memory, and disk data. Set alert thresholds on queue size, failed jobs, or worker count to get notified before problems escalate.
default
4 workers · 142 jobs/min
247 pending
0 failed · 4 processing
emails
2 workers · 38 jobs/min
1,089 pending
2 failed · 2 processing
notifications
2 workers · 89 jobs/min
18 pending
0 failed · 1 processing
Get started
Stop discovering queue failures from user complaints.
Install the Composer package, set three environment variables, and queue monitoring is live in under two minutes. Track queue sizes, failed jobs, and worker health across all your servers. Set alert thresholds to catch issues before they affect users. Free plan included. No credit card required.
Install the package
$ composer require hostatlas/queue-monitor_