PHPackages                             croustibat/filament-jobs-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. croustibat/filament-jobs-monitor

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

croustibat/filament-jobs-monitor
================================

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

v4.5.0(2d ago)274325.8k↓12%68[4 issues](https://github.com/ultraviolettes/filament-jobs-monitor/issues)[2 PRs](https://github.com/ultraviolettes/filament-jobs-monitor/pulls)6MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI passing

Since May 29Pushed 3w ago5 watchersCompare

[ Source](https://github.com/ultraviolettes/filament-jobs-monitor)[ Packagist](https://packagist.org/packages/croustibat/filament-jobs-monitor)[ Docs](https://github.com/ultraviolettes/filament-jobs-monitor)[ GitHub Sponsors](https://github.com/croustibat)[ RSS](/packages/croustibat-filament-jobs-monitor/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (22)Versions (42)Used By (6)

Background Jobs monitoring like Horizon for all drivers for FilamentPHP
=======================================================================

[](#background-jobs-monitoring-like-horizon-for-all-drivers-for-filamentphp)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d9796fd87a8890fc21e752e9cb912b66b79a5c8eba2a3316cde136da6037655b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63726f757374696261742f66696c616d656e742d6a6f62732d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/croustibat/filament-jobs-monitor)[![Total Downloads](https://camo.githubusercontent.com/ad653a72eaa1f1020b1ca6bcce31faee5d2ac16882b32da03876a263bec77519/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63726f757374696261742f66696c616d656e742d6a6f62732d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/croustibat/filament-jobs-monitor)

This is a package to monitor background jobs for FilamentPHP. It is inspired by Laravel Horizon and is compatible with all drivers.

[![Jobs List](art/screenshot-list.png)](art/screenshot-list.png)

[![Job Progress](art/screenshot-progress-75.png)](art/screenshot-progress-75.png)

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

[](#installation)

Check your filamentPHP version before installing:

VersionFilamentPHPPHP1.\*2.\*8.12.\*3.\*&gt;= 8.13.\*4.\*&gt;= 8.14.\*5.\*&gt;= 8.2Install the package via composer:

```
composer require croustibat/filament-jobs-monitor
```

Publish and run the migrations using:

```
php artisan vendor:publish --tag="filament-jobs-monitor-migrations"
php artisan migrate
```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

The global plugin config can be published using the command below:

```
php artisan vendor:publish --tag="filament-jobs-monitor-config"
```

This is the content of the published config file:

```
return [
    'resources' => [
        'enabled' => true,
        'label' => 'Job',
        'plural_label' => 'Jobs',
        'navigation_group' => 'Settings',
        'navigation_icon' => 'heroicon-o-cpu-chip',
        'navigation_sort' => null,
        'navigation_count_badge' => false,
        'resource' => Croustibat\FilamentJobsMonitor\Resources\QueueMonitorResource::class,
        'cluster' => null,
        'sub_navigation_position' => null, // SubNavigationPosition::Top or ::Sidebar
    ],
    'failures' => [
        'enabled' => true,
        'polling_interval' => '10s',
    ],
    'pruning' => [
        'enabled' => true,
        'retention_days' => 7,
    ],
    'queues' => [
        'default'
    ],
    'tenancy' => [
        'enabled' => false,
        'model' => null, // e.g., App\Models\Tenant::class
        'column' => 'tenant_id',
    ],
];
```

**NOTE:** Since there isn't a universal way to retrieve all used queues, it's necessary to define them to obtain all pending jobs.

### Failures page

[](#failures-page)

The **Failures** page groups failed jobs by signature — exception class, job class and normalised message (dynamic values such as ids, uuids and quoted strings are stripped) — so a thousand occurrences of the same error show up as a single row instead of a thousand, Sentry-style.

It includes:

- A stats overview: open groups, failures in the last hour, 24h failure rate and groups resolved in the last 7 days.
- A table of failure groups with occurrence counts, last-seen time and a 7-day sparkline per group, with **Open / Resolved / All** tabs and filters by exception class and queue.
- A detail slide-over per group with the stack trace of the last occurrence (app frames / all frames / raw toggle), the failed job payload rendered as a collapsible tree, and the most recent occurrences.
- Actions to **mark a group resolved** (a new occurrence reopens it automatically), **reopen** it, or **retry all failed jobs** of the group.

The page can be disabled with `'failures' => ['enabled' => false]`. Failure grouping requires the `add_failures_to_filament-jobs-monitor_table` migration — republish the migrations, migrate and publish the plugin assets when upgrading:

```
php artisan vendor:publish --tag="filament-jobs-monitor-migrations"
php artisan migrate
php artisan filament:assets
```

If the migration has not been run, the plugin keeps working as before and simply skips failure grouping.

### Pruning old records

[](#pruning-old-records)

The `QueueMonitor` model uses Laravel's [`Prunable`](https://laravel.com/docs/eloquent#pruning-models) trait and will prune records older than `pruning.retention_days` (default: 7 days) when `pruning.enabled` is `true`.

> **Important:** Laravel's built-in `php artisan model:prune` command only **auto-discovers** prunable models that live in your application's `app/Models` directory. Because `QueueMonitor` is shipped inside this package (`vendor/...`), it is **never** picked up by a bare `model:prune` call — this is the most common cause of "the model is not pruning".

You have two ways to prune the records:

**1. Use the dedicated command shipped with this package (recommended):**

```
php artisan filament-jobs-monitor:prune
```

This targets the package model directly, so it works regardless of your app structure. Schedule it in `routes/console.php` (Laravel 11+) or `app/Console/Kernel.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('filament-jobs-monitor:prune')->daily();
```

**2. Or call Laravel's `model:prune` with an explicit `--model` flag:**

```
php artisan model:prune --model="Croustibat\FilamentJobsMonitor\Models\QueueMonitor"
```

Pruning can also be toggled/configured at the plugin level:

```
FilamentJobsMonitorPlugin::make()
    ->enablePruning() // or ->enablePruning(false) to disable
    ->pruningRetention(14); // keep records for 14 days
```

### Extending Model

[](#extending-model)

Sometimes it's useful to extend the model to add some custom methods. You can do it by extending the model by creating your own model :

```
$ php artisan make:model MyQueueMonitor
```

Then you can extend the model by adding your own methods :

```
