Queue Monitor
The HostAtlas Queue Monitor is a Laravel composer package that pushes queue metrics — pending jobs, failed jobs, processing jobs — to the HostAtlas platform. Queue health then shows up alongside the rest of your infrastructure in the same dashboard.
The package speaks to a generic /api/v1/queue/push endpoint that any language or framework can hit; the Laravel package just handles the auto-detection and scheduling for you.
Requirements
Section titled “Requirements”- PHP 8.2+
- Laravel 11 or 12
- A HostAtlas account with an API key
Install
Section titled “Install”composer require hostatlas/queue-monitorThe service provider is auto-discovered — no manual registration needed.
Configure
Section titled “Configure”Publish the config file:
php artisan vendor:publish --tag=hostatlas-queue-configAdd to your .env:
HOSTATLAS_URL=https://my.hostatlas.appHOSTATLAS_API_KEY=ha_your_api_key_hereHOSTATLAS_SERVER=web-prod-01| Variable | Description | Default |
|---|---|---|
HOSTATLAS_URL | Your HostAtlas instance URL | https://my.hostatlas.app |
HOSTATLAS_API_KEY | API key from Settings → API Keys | — |
HOSTATLAS_SERVER | Server hostname — must match a server registered in HostAtlas | System hostname |
Queue selection
Section titled “Queue selection”By default, all queues are auto-detected. To monitor a specific subset, edit config/hostatlas-queue.php:
'queues' => ['default', 'emails', 'notifications'],Use ['*'] to auto-detect every queue on the driver (default).
Scheduler (recommended)
Section titled “Scheduler (recommended)”Add to routes/console.php:
Schedule::command('hostatlas:queue-metrics')->everyMinute();The scheduler-driven mode is the recommended production setup — HostAtlas expects a push per minute.
Manual
Section titled “Manual”php artisan hostatlas:queue-metricsExample output:
default: 42 pending, 2 failed emails: 8 pending, 0 failed Queue metrics reported to HostAtlas.Supported queue drivers
Section titled “Supported queue drivers”| Driver | Auto-detect Queues | Metrics |
|---|---|---|
| Redis | Yes (scans Redis keys for queue names) | Size, failed count, system type |
| Database | Yes (GROUP BY queue on the jobs table) | Size, failed count, processing count |
| SQS | No (uses the configured queue name) | Size |
What gets reported
Section titled “What gets reported”Per queue:
- Queue name — auto-detected from the driver, or configured explicitly
- Pending jobs — current queue size
- Failed jobs — count from the
failed_jobstable - Processing jobs — jobs currently being worked (database driver only)
- System type — always
laravelfor this package
API push endpoint
Section titled “API push endpoint”The package POSTs to {HOSTATLAS_URL}/api/v1/queue/push with Authorization: Bearer <api-key>. You can push the same shape from any other stack:
curl -X POST https://my.hostatlas.app/api/v1/queue/push \ -H "Authorization: Bearer ha_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "server": "web-prod-01", "queues": [ {"name": "default", "size": 42, "failed": 2, "processing": 3, "system": "laravel"} ] }'The system field is the free-form label HostAtlas uses to group metrics — pick one per stack:
laravel(this package)bullmq(Node.js)sidekiq(Ruby)celery(Python)- Anything else you’d like grouped together in the dashboard
Multi-system support
Section titled “Multi-system support”The HostAtlas queue dashboard is stack-agnostic — Laravel is one supported system, but everything drives through the same push endpoint. Reference clients for the common ecosystems:
- Laravel — this package
- BullMQ (Node.js) — via API push (no first-party package yet)
- Sidekiq (Ruby) — via API push
- Celery (Python) — via API push
Security
Section titled “Security”- API key transmitted via
Authorization: Bearerheader over HTTPS only - No sensitive data collected — only queue names and counts
- 10-second HTTP timeout per push request
- Errors are reported via Laravel’s
report()helper — logged, never thrown, so a HostAtlas outage cannot break your app’s request path
Related
Section titled “Related”- CLI —
hostatlas queueslists queue-monitor data from the terminal