PHPackages                             cboxdk/laravel-queue-monitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. cboxdk/laravel-queue-monitor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

cboxdk/laravel-queue-monitor
============================

Laravel queue monitoring with individual job tracking, payload storage, replay, and analytics

v1.7.3(1mo ago)5796MITPHPPHP ^8.3 || ^8.4 || ^8.5CI passing

Since Jan 20Pushed 1mo agoCompare

[ Source](https://github.com/cboxdk/laravel-queue-monitor)[ Packagist](https://packagist.org/packages/cboxdk/laravel-queue-monitor)[ Docs](https://github.com/cboxdk/laravel-queue-monitor)[ GitHub Sponsors](https://github.com/cboxdk)[ RSS](/packages/cboxdk-laravel-queue-monitor/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (28)Versions (34)Used By (0)

Queue Monitor for Laravel
=========================

[](#queue-monitor-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bc6033e936af31e778306463a5384419eb24d5dcbfe7947a564420843d0af840/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63626f78646b2f6c61726176656c2d71756575652d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cboxdk/laravel-queue-monitor)[![Total Downloads](https://camo.githubusercontent.com/c1ec7fa6028bccb59554227aec2fb741053998473aed547e283b130683b0c58b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63626f78646b2f6c61726176656c2d71756575652d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cboxdk/laravel-queue-monitor)

**Deep queue monitoring for any Laravel queue driver. Not just Horizon.**

Track every queue job with per-job CPU, memory, payload, exceptions, and retry chains on `database`, `redis`, `sqs`, `beanstalkd`, or any driver that fires Laravel's queue events. No Redis required. No Horizon required.

Why?
----

[](#why)

Laravel Horizon works if you run Redis. Most other monitoring tools stop there. If you run database queues, SQS, or anything else, you're flying blind.

Queue Monitor gives you the same depth of insight on any driver:

- Per-job CPU time and memory usage (via [laravel-queue-metrics](https://github.com/cboxdk/laravel-queue-metrics))
- Full exception traces with retry chain history
- Job payload storage and replay
- Per-queue, per-server, per-job-class analytics
- SLA compliance tracking
- Health checks and alerting

Works with Horizon and enriches the experience with worker supervisor data, but doesn't need it.

Features
--------

[](#features)

- **Driver Agnostic**: `database`, `redis`, `sqs`, `beanstalkd`, any custom driver
- **Individual Job Tracking**: Every job from dispatch to completion/failure
- **Per-Job Resource Metrics**: CPU time, peak memory (RSS), file descriptors via process-level instrumentation
- **Full Retry Chain**: Every attempt preserved with its own exception, duration, and metrics
- **Job Replay**: Re-dispatch failed jobs from stored payloads
- **Web Dashboard**: Full-page job detail, drill-down views, deep-linkable URLs
- **Terminal Dashboard**: k9s-style TUI with keyboard navigation (`php artisan queue-monitor:dashboard`)
- **Analytics**: Per-queue, per-server, per-job-class breakdowns with p50/p95/p99 percentiles
- **Infrastructure**: Worker utilization, queue capacity, SLA compliance, [cboxdk/laravel-queue-autoscale](https://github.com/cboxdk/laravel-queue-autoscale) integration
- **Health Checks**: Stuck job detection, error rate monitoring, queue backlog alerts
- **REST API**: Paginated, filterable, with payload redaction
- **Horizon Integration**: Optional supervisor data, workload metrics, jobs/minute (auto-detected)
- **Autoscale Integration**: Optional scaling timeline, SLA breach/recovery events (with [cboxdk/laravel-queue-autoscale](https://github.com/cboxdk/laravel-queue-autoscale))

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11+
- [cboxdk/laravel-queue-metrics](https://github.com/cboxdk/laravel-queue-metrics) ^3.0 (installed automatically)

Installation
------------

[](#installation)

```
composer require cboxdk/laravel-queue-monitor
```

```
php artisan vendor:publish --tag="queue-monitor-config"
php artisan migrate
```

That's it. The package automatically starts monitoring all queue jobs.

### Metrics Storage

[](#metrics-storage)

Queue Monitor depends on [laravel-queue-metrics](https://github.com/cboxdk/laravel-queue-metrics) for per-job CPU/memory instrumentation. By default, queue-metrics also persists aggregate data (worker heartbeats, throughput, baselines) to a storage backend. Queue Monitor only needs the per-job events, not the aggregate persistence.

If you only use Queue Monitor, you can disable metrics persistence to avoid any storage backend requirement:

```
QUEUE_METRICS_PERSISTENCE=false
```

This gives you per-job CPU and memory tracking with zero additional infrastructure. No Redis, no extra tables.

> **Note:** [cboxdk/laravel-queue-autoscale](https://github.com/cboxdk/laravel-queue-autoscale) requires persistence enabled. It reads worker heartbeats, throughput, and baselines from queue-metrics to make scaling decisions.

#### With persistence enabled (default)

[](#with-persistence-enabled-default)

Keep persistence enabled if you want the full metrics stack (Prometheus export, baselines, worker heartbeats) or use queue-autoscale. Two storage options:

**Redis (recommended):**

```
QUEUE_METRICS_STORAGE=redis
QUEUE_METRICS_CONNECTION=default
```

**Database** (for low-scale workloads without Redis):

```
QUEUE_METRICS_STORAGE=database
```

```
php artisan vendor:publish --tag="queue-metrics-migrations"
php artisan migrate
```

> **Performance note:** The database driver is for low-scale workloads (&lt; 10 workers). At higher scale, metrics writes compete with your queue jobs for database connections. Set `QUEUE_METRICS_MAX_SAMPLES=500` to keep table sizes manageable. See the [laravel-queue-metrics docs](https://github.com/cboxdk/laravel-queue-metrics) for details.

### Optional: Publish views for customization

[](#optional-publish-views-for-customization)

```
php artisan vendor:publish --tag="queue-monitor-views"
```

Published views are copied into your application and will not receive package UI updates automatically. After upgrading Queue Monitor, remove or republish customized views if you want the latest dashboard.

The dashboard ships with precompiled package-local CSS and JavaScript. If your CSP requires external static files instead of inline package assets, publish them with:

```
php artisan vendor:publish --tag="queue-monitor-assets"
```

Then set:

```
QUEUE_MONITOR_ASSET_MODE=public
```

For a full app-level build override, also publish the source asset files:

```
php artisan vendor:publish --tag="queue-monitor-asset-sources"
```

See the Dashboard Assets guide for `inline`, `public`, and `none` asset modes.

Quick Start
-----------

[](#quick-start)

### Web Dashboard

[](#web-dashboard)

Navigate to `/queue-monitor` in your browser. All views are deep-linkable:

URLView`/queue-monitor`Overview`/queue-monitor#jobs`Jobs list with filters`/queue-monitor#analytics`Analytics`/queue-monitor#health`Health checks`/queue-monitor#infrastructure`Infrastructure`/queue-monitor/job/{uuid}`Job detail (shareable)`/queue-monitor/queue/{name}`Queue drill-down`/queue-monitor/server/{name}`Server drill-down`/queue-monitor/class/{fqcn}`Job class drill-down### Terminal Dashboard

[](#terminal-dashboard)

```
php artisan queue-monitor:dashboard
```

k9s-style keyboard navigation: `1-6` switch views, `j/k` navigate, `Enter` for detail, `S` filter status, `W` filter queue, `F` search.

### Facade

[](#facade)

```
use Cbox\LaravelQueueMonitor\Facades\LaravelQueueMonitor as QueueMonitor;

$job = QueueMonitor::getJob($uuid);
$replayData = QueueMonitor::replay($uuid);
$stats = QueueMonitor::statistics();

$filters = new JobFilterData(
    statuses: [JobStatus::FAILED],
    queuedAfter: Carbon::now()->subHours(24)
);
$failedJobs = QueueMonitor::getJobs($filters);
```

### Artisan Commands

[](#artisan-commands)

```
php artisan queue-monitor:stats
php artisan queue-monitor:replay {uuid}
php artisan queue-monitor:prune --days=30 --statuses=completed
```

### REST API

[](#rest-api)

```
GET  /api/queue-monitor/jobs?statuses[]=failed&limit=50
GET  /api/queue-monitor/jobs/{uuid}
POST /api/queue-monitor/jobs/{uuid}/replay
GET  /api/queue-monitor/statistics
GET  /api/queue-monitor/statistics/queue-health

```

Driver Compatibility
--------------------

[](#driver-compatibility)

DriverJob TrackingPayload/ReplayCPU/MemoryRetry ChainHealth Checks`database`yesyesyesyesyes`redis`yesyesyesyesyes`sqs`yesyesyesyesyes`beanstalkd`yesyesyesyesyesCustom driversyesyesyesyesyesDashboard analytics are tested against SQLite in the package suite and generate driver-specific SQL for MySQL/MariaDB, PostgreSQL, SQL Server, and SQLite when bucketing timestamps or calculating pickup latency.

**With Horizon (optional):** adds worker supervisor data, workload metrics, jobs/minute, busy/total workers.

**With [cboxdk/laravel-queue-autoscale](https://github.com/cboxdk/laravel-queue-autoscale) (optional):** adds scaling timeline, SLA breach/recovery tracking, scaling decision history.

### Cbox Ecosystem

[](#cbox-ecosystem)

Queue Monitor is part of a suite of first-party packages:

PackagePurpose[cboxdk/laravel-queue-monitor](https://github.com/cboxdk/laravel-queue-monitor)Per-job tracking, dashboard, replay, analytics[cboxdk/laravel-queue-metrics](https://github.com/cboxdk/laravel-queue-metrics)Process-level CPU/memory instrumentation[cboxdk/laravel-queue-autoscale](https://github.com/cboxdk/laravel-queue-autoscale)SLA-based predictive autoscaling[cboxdk/system-metrics](https://github.com/cboxdk/system-metrics)Low-level system metrics (RSS, CPU) for PHPInstall any combination. They auto-discover each other via events.

Configuration
-------------

[](#configuration)

Key options in `config/queue-monitor.php`:

```
return [
    'enabled' => env('QUEUE_MONITOR_ENABLED', true),

    'storage' => [
        'store_payload' => env('QUEUE_MONITOR_STORE_PAYLOAD', env('APP_ENV') === 'local'),
        'payload_max_size' => 65535,
    ],

    'retention' => [
        'days' => 30,
        'prune_statuses' => ['completed'],
    ],

    'batch' => [
        'chunk_size' => env('QUEUE_MONITOR_BATCH_CHUNK_SIZE', 100),
        'max_jobs' => env('QUEUE_MONITOR_BATCH_MAX_JOBS', 1000),
    ],

    // Web dashboard
    'ui' => [
        'enabled' => true,
        'route_prefix' => 'queue-monitor',
        'middleware' => ['web'],
        'assets' => [
            'mode' => env('QUEUE_MONITOR_ASSET_MODE', 'inline'),
        ],
    ],

    // REST API
    'api' => [
        'enabled' => env('QUEUE_MONITOR_API_ENABLED', env('APP_ENV') === 'local'),
        'prefix' => 'api/queue-monitor',
        'middleware' => ['api', 'auth:sanctum'],
        'default_limit' => env('QUEUE_MONITOR_API_DEFAULT_LIMIT', 50),
        'max_limit' => env('QUEUE_MONITOR_API_MAX_LIMIT', 1000),
        'sensitive_keys' => ['password', 'token', 'secret', 'key', 'authorization', 'api_key', 'credit_card', 'cvv', 'ssn', 'private_key', 'command'],
    ],

    'export' => [
        'default_limit' => env('QUEUE_MONITOR_EXPORT_DEFAULT_LIMIT', 1000),
        'max_rows' => env('QUEUE_MONITOR_EXPORT_MAX_ROWS', 5000),
    ],
];
```

Security
--------

[](#security)

### Production Checklist

[](#production-checklist)

- Add framework auth middleware to the UI and API routes.
- Register `LaravelQueueMonitor::auth(...)` with an explicit admin/internal access rule.
- Enable the REST API explicitly outside local development with `QUEUE_MONITOR_API_ENABLED=true`.
- Schedule `queue-monitor:prune` so retention settings actually run.
- Decide whether `QUEUE_MONITOR_STORE_PAYLOAD=true` is acceptable for your data. Payload storage defaults on in `local` and off outside `local` unless the env var is explicitly set. Payload redaction only applies to API/dashboard responses; raw payloads are stored for replay.
- If you published `config/queue-monitor.php` before this default changed, update the published `storage.store_payload` and `api.enabled` entries manually.
- Review Content Security Policy. The bundled dashboard uses package-local CSS and JavaScript, inlined from `resources/dist`; publish `queue-monitor-assets` and customize the view if your CSP disallows inline assets.
- If you have published `queue-monitor-views`, remove or republish them after package upgrades to pick up dashboard fixes.
- Run `php artisan queue-monitor:health --readiness` in staging or production to catch unsafe launch configuration.

### Dashboard Authentication

[](#dashboard-authentication)

```
// In the boot() method of AuthServiceProvider
// or another application service provider
use Cbox\LaravelQueueMonitor\LaravelQueueMonitor;

LaravelQueueMonitor::auth(function ($request) {
    return $request->user()?->isAdmin();
});
```

### API Authentication

[](#api-authentication)

The REST API exposes job payloads and operational failure data. Always add auth middleware in production:

```
'api' => [
    'middleware' => ['api', 'auth:sanctum'],
],
```

### Payload Redaction

[](#payload-redaction)

The API automatically masks sensitive keys (`password`, `token`, `secret`, serialized Laravel `command` payloads, etc.). Raw payloads are stored for replay; only API/dashboard responses are redacted.

Architecture
------------

[](#architecture)

- **Action Pattern**: Single-responsibility action classes for all business logic
- **Repository Pattern**: Data access through contracts with Eloquent implementations
- **Event-Driven**: Listens to Laravel queue events (driver-agnostic) and queue-metrics events
- **DTO Pattern**: Strictly-typed data transfer objects throughout

Testing
-------

[](#testing)

```
composer test        # Pest test suite
composer analyse     # PHPStan Level 9
composer format      # Laravel Pint
```

License
-------

[](#license)

The MIT License (MIT). See [License File](LICENSE.md).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

18

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

[![sylvesterdamgaard](https://avatars.githubusercontent.com/u/2431914?v=4)](https://github.com/sylvesterdamgaard "sylvesterdamgaard (150 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravellaravel-packagelaravel-queuelaravel-queuesqueue-monitorqueue-monitoringlaravelcboxlaravel-queue-monitor

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cboxdk-laravel-queue-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/cboxdk-laravel-queue-monitor/health.svg)](https://phpackages.com/packages/cboxdk-laravel-queue-monitor)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
