Monitor Laravel Queues, Commands, and Schedulers on Any Driver with Vigilance

Last updated on by

Monitor Laravel Queues, Commands, and Schedulers on Any Driver with Vigilance image

Vigilance is a monitoring dashboard that tracks how your background work actually behaves in production. It records jobs, artisan commands, and scheduled tasks as they move from queued to running to done or failed, capturing parameters, exit codes, and exception traces along the way. The part that sets it apart from existing tools is that it does not care which queue driver you run: database, Redis, SQS, Beanstalkd, and sync all reports into the same place. It requires PHP 8.2+, Laravel 12 or 13, Livewire 3.5+ or 4, and is MIT-licensed.

One Record Per Run, Across Every Driver

Horizon only watches Redis queues, and Telescope is built for local debugging rather than production. Vigilance instead writes a single row for each run and updates it throughout the run's lifecycle, so you end up with a single timeline that covers queued jobs, CLI- or scheduler-invoked commands, and the scheduler itself. Each record contains the execution parameters, the final state, and a redacted exception trace when an exception is thrown. Secrets are stripped automatically before anything is stored.

Because storing every successful run gets expensive, Vigilance samples at dispatch time and keeps failures regardless of the sample rate:

VIGILANCE_SAMPLE_RATE=0.1
VIGILANCE_RETENTION_DAYS=7
VIGILANCE_DB_CONNECTION=monitoring

Keeping 10% of successful runs while retaining all failures keeps the volume manageable on a busy queue, and pointing VIGILANCE_DB_CONNECTION to a separate database isolates monitoring writes from your application's primary connection. Pruning runs on a scheduled command driven by the retention setting.

Manual Dispatch From Typed Forms

When you opt in to the control features, Vigilance can dispatch jobs straight from the dashboard. You mark a job with the Dispatchable contract, and the dashboard reads the constructor signature through reflection to build a form for it:

use Vigilance\Contracts\Dispatchable;
 
class ProcessPodcast implements ShouldQueue, Dispatchable
{
public static string $vigilanceLabel = 'Process a podcast';
 
public function __construct(public Podcast $podcast, public bool $notify = true) {}
}

The generated form handles scalars, enums, dates, and Eloquent model binding, so a constructor that expects a Podcast model produces a field that resolves the record for you. The same mechanism runs allowlisted artisan commands from the UI. Both capabilities are off by default and gated behind a config flag:

VIGILANCE_CONTROL_ENABLED=true

Custom Metrics and Core Web Vitals

Alongside the run history, Vigilance collects two kinds of application data. Business metrics use a counter and gauge API you call from your own code:

use Vigilance\Vigilance;
 
Vigilance::increment('signups');
Vigilance::gauge('cart_value', $cart->total());

For frontend data, enabling Real User Monitoring (RUM) and adding a Blade directive to your layout collects Core Web Vitals (LCP, INP, CLS, FCP, TTFB) from real visitors:

VIGILANCE_RUM=true
@vigilanceRum

These feed the dashboard's performance views, which report p50, p95, and p99 latencies and error rates next to the queue and command timelines.

Installation and Securing the Dashboard

Install the package, run the installer, and migrate:

composer require anousss007/vigilance
php artisan vigilance:install
php artisan migrate

The dashboard is local-only until you explicitly authorise access. Define who can see it with a callback in a service provider's boot() method, or with a Gate:

use Vigilance\Vigilance;
 
Vigilance::auth(fn ($request) => in_array($request->user()?->email, [
'you@example.com',
]));

From there, it lives at /vigilance by default.

That covers the core of what Vigilance records, but the dashboard goes beyond queue history. It groups exceptions into a fingerprinted issues inbox spanning web requests, queued jobs, commands, and the browser, tracks service-level objectives with error budgets and burn-rate alerts, and watches release health by comparing error rates before and after a deploy. Other optional pieces include request and job tracing with per-request waterfalls and N+1 detection, uptime checks that record availability and latency, a searchable log explorer correlated to traces, alerting to Slack, Discord, Teams, or a webhook, a worker supervisor that fills Horizon's role for non-Redis drivers, and read-only AI agent access over an MCP server.

You can read the documentation and source on GitHub.

Yannick Lyn Fatt photo

Staff Writer at Laravel News and Full stack web developer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud

The latest

View all →
Watch the Teaser for 'The Story of PHP' Documentary image

Watch the Teaser for 'The Story of PHP' Documentary

Read article
Ship AI with Laravel: Give Your AI Agent Live Web Search image

Ship AI with Laravel: Give Your AI Agent Live Web Search

Read article
Lattice: Describe Inertia UIs in PHP image

Lattice: Describe Inertia UIs in PHP

Read article
How We Cached Laravel News at the Edge with Fast Laravel image

How We Cached Laravel News at the Edge with Fast Laravel

Read article
The artisan dev Command in Laravel 13.16.0 image

The artisan dev Command in Laravel 13.16.0

Read article
LaraOwl: Self-Hosted Monitoring for Laravel Applications image

LaraOwl: Self-Hosted Monitoring for Laravel Applications

Read article