Skip to content
Last updated July 2, 2026

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.

  • PHP 8.2+
  • Laravel 11 or 12
  • A HostAtlas account with an API key
Terminal window
composer require hostatlas/queue-monitor

The service provider is auto-discovered — no manual registration needed.

Publish the config file:

Terminal window
php artisan vendor:publish --tag=hostatlas-queue-config

Add to your .env:

Terminal window
HOSTATLAS_URL=https://my.hostatlas.app
HOSTATLAS_API_KEY=ha_your_api_key_here
HOSTATLAS_SERVER=web-prod-01
VariableDescriptionDefault
HOSTATLAS_URLYour HostAtlas instance URLhttps://my.hostatlas.app
HOSTATLAS_API_KEYAPI key from Settings → API Keys
HOSTATLAS_SERVERServer hostname — must match a server registered in HostAtlasSystem hostname

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).

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.

Terminal window
php artisan hostatlas:queue-metrics

Example output:

default: 42 pending, 2 failed
emails: 8 pending, 0 failed
Queue metrics reported to HostAtlas.
DriverAuto-detect QueuesMetrics
RedisYes (scans Redis keys for queue names)Size, failed count, system type
DatabaseYes (GROUP BY queue on the jobs table)Size, failed count, processing count
SQSNo (uses the configured queue name)Size

Per queue:

  • Queue name — auto-detected from the driver, or configured explicitly
  • Pending jobs — current queue size
  • Failed jobs — count from the failed_jobs table
  • Processing jobs — jobs currently being worked (database driver only)
  • System type — always laravel for this package

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:

Terminal window
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

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
  • API key transmitted via Authorization: Bearer header 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
  • CLIhostatlas queues lists queue-monitor data from the terminal
Was this page helpful?