marcodiperna / filament-queue-monitor
Code, job falliti e batch di Laravel nel pannello Filament, sulle tabelle standard del driver database: nessuna tabella in piu', nessun listener.
Package info
github.com/marcodiperna/filament-queue-monitor
pkg:composer/marcodiperna/filament-queue-monitor
Requires
- php: ^8.2
- filament/filament: ^5.0
- illuminate/support: ^12.0|^13.0
Requires (Dev)
- laravel/pint: ^1.13
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^11.5|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
English · Italiano
Laravel queues, failed jobs and batches in your Filament panel.
It reads Laravel's standard tables for the database driver — jobs, failed_jobs,
job_batches — with no extra tables, listeners or migrations: what you see is what the
worker sees.
| Page | Shows | Actions |
|---|---|---|
| Queue | waiting, running and scheduled jobs, with attempts and times | delete a stuck job |
| Failed jobs | job, queue, first line of the error; the full exception on click | retry (one, selected, all), delete, flush |
| Batches | progress, total and failed jobs, state | — |
| History (optional) | every run: outcome, duration, attempt, error | filters by state, job and day |
The Queue and Failed jobs menu items show a counter when not empty. Queue and History have stats on top: how many jobs are waiting and for how long the oldest has been; for the history, runs, failures, average duration and working time over the last 24 hours, with the trend of the last days (7, configurable).
Requirements
- PHP 8.2+
- Laravel 12 or 13
- Filament 5
- the
databasequeue driver (QUEUE_CONNECTION=database)
Installation
composer require marcodiperna/filament-queue-monitor
In your panel:
use MarcoDiPerna\FilamentQueueMonitor\QueueMonitorPlugin; ->plugins([ QueueMonitorPlugin::make() ->navigationGroup('System') ->authorize(fn ($user) => $user?->can('manage system')), ])
Without
authorize()the pages are open to anyone who can enter the panel. In production, always restrict them.
Options
| Method | Default | |
|---|---|---|
navigationGroup(string|Closure|null) |
none | menu group |
navigationSort(int) |
90 |
position of the first item; the others follow (+1, +2, +3) |
navigationIcons(queued:, failed:, batches:, history:) |
Heroicons | menu icons, all or some |
authorize(Closure) |
everyone | receives the logged-in user, returns bool |
formatJobNameUsing(Closure) |
class without namespace | receives the full job name ($name) |
formatOperatorUsing(Closure) |
name attribute |
receives the user model ($user) |
hideQueueColumn() |
visible | for apps with a single queue |
groupRecordActions(bool) |
true |
row actions in Filament's three-dots menu; false shows them inline |
modifyErrorModalUsing(Closure) |
— | reshapes the error modal; receives and returns the Action |
resource(string $page, string $class) |
— | replaces a page (queued, failed, batches, history) with your own subclass |
History and operator
Two optional features, switched on from the configuration rather than the plugin, because they must run in the worker too, where Filament panels are not loaded:
QUEUE_MONITOR_HISTORY=true # one row per run, History page QUEUE_MONITOR_KEEP_DAYS=7 # daily cleanup of older rows QUEUE_MONITOR_STATS_DAYS=7 # days in the stats trend QUEUE_MONITOR_TRACK_OPERATOR=true # who started the job
History. Laravel deletes a job as soon as it finishes: without a history there is no way
to know whether last night's backup ran. When enabled, the package creates the
queue_monitor_runs table through your usual php artisan migrate and prunes it daily
(model:prune in the scheduler), never below the stats period.
Operator. The logged-in user's id goes into the payload at dispatch time, while the session still exists. Jobs queued by a running job inherit their parent's operator, so a whole chain stays attributed to whoever pressed the button. It shows on Queue, Failed jobs and History; on Batches when the history is enabled. Jobs started without a user (scheduler, commands) read as System.
To customise the rest (payload key, user model, table name):
php artisan vendor:publish --tag=filament-queue-monitor-config
php artisan vendor:publish --tag=filament-queue-monitor-migrations # only to change the table
Customising a page
Every page is a plain Filament resource: to change its columns, filters or actions, extend it and register yours instead.
use MarcoDiPerna\FilamentQueueMonitor\Resources\FailedJobs\FailedJobResource; class FailedJobs extends FailedJobResource { public static function table(Table $table): Table { return parent::table($table)->defaultPaginationPageOption(50); } } QueueMonitorPlugin::make()->resource('failed', FailedJobs::class)
The package ships no templates or styles of its own: it only uses Filament components, so your panel's theme, colours and customisations apply here too.
Translations
English and Italian included; app.locale decides. To change them:
php artisan vendor:publish --tag=filament-queue-monitor-translations
Coming from moox/jobs
composer remove moox/jobs- remove the four
Jobs*Pluginfrom the panel and addQueueMonitorPlugin - delete
config/core.phpandconfig/jobs.phpif published
moox's tables (job_manager, job_batch_manager, job_queue_workers) are no longer needed:
they stay in the database until a migration drops them. If you had added to moox the user who
starts a job, it is built in here: QUEUE_MONITOR_TRACK_OPERATOR=true.
Tests
composer install
composer test
Tests run on a throwaway Laravel app created by Orchestra Testbench, with in-memory SQLite. CI repeats them on Laravel 12 and 13.
License
MIT