Skip to Content
  • Home
  • Blog
  • Privacy Policy
  • Terms And conditions
  • Disclaimer
  • About Us
      • Home
      • Blog
      • Privacy Policy
      • Terms And conditions
      • Disclaimer
      • About Us
  • Knowledge Base
  • Laravel Job Monitor – Queue Health Tracking
  • Laravel Job Monitor – Queue Health Tracking

    Learn what Laravel Job Monitor does, why queue monitoring matters, and how to install, configure, and use this zero‑dependency package to gain insight into background job health.
    1 February 2026 by
    Suraj Barman

    What is Laravel Job Monitor?

    Laravel Job Monitor is a lightweight package that records the lifecycle of queued jobs in your Laravel application. It stores timestamps, statuses, and execution details in a database table, allowing developers to query and visualize queue health without external services.

    Why Monitor Queue Health?

    • Identify bottlenecks: Spot jobs that run longer than expected.
    • Detect failures early: Get visibility into failed jobs and the users they affect.
    • Improve reliability: Use historical data to fine‑tune retry strategies and resource allocation.
    • No extra infrastructure: Leverages your existing database, keeping the vendor footprint minimal.

    How to Install Laravel Job Monitor

    Installation requires only Composer and a single Artisan command.

    • Run composer require j-sandaruwan/laravel-job-monitor to add the package.
    • Publish the configuration and migration files:
      php artisan vendor:publish --provider="JSandaruwan\LaravelJobMonitor\JobMonitorServiceProvider"
    • Run the migration to create the job_monitor table:
      php artisan migrate

    How to Configure the Package

    After publishing, edit config/job-monitor.php to adjust retention periods, notification channels, or custom table names. The default settings work for most projects.

    How to Use Laravel Job Monitor

    Once installed, the package automatically hooks into Laravel's queue events.

    • Recording: Each job dispatch creates a record with queued_at, started_at, finished_at, and status fields.
    • Querying: Use the provided JobMonitor model to retrieve statistics, e.g.,
      JobMonitor::whereStatus('failed')->lastWeek()->get();
    • API endpoint: The package exposes GET /api/job-monitor/jobs/stats to fetch aggregated health metrics such as total jobs, failures, and average processing time.

    Key Features

    • Zero external dependencies – uses only your existing database.
    • Automatic event listeners for all Laravel queue drivers.
    • Aggregated statistics endpoint for dashboard integration.
    • Extensible configuration for custom notifications (Slack, Discord, etc.).

    Best Practices

    • Retain job records for a reasonable period (e.g., 30 days) to balance insight and storage.
    • Combine the API stats with a simple Blade dashboard for real‑time monitoring.
    • Set up alerting on the failed status to react quickly to critical issues.

    Latest Stories

    Explore fresh ideas and updates from our editorial team.

    See All
    Your Dynamic Snippet will be displayed here... This message is displayed because you did not provide enough options to retrieve its content.

    Copyright © 2026 TechStora. All Rights Reserved.