PHPackages                             ntm-dev/laravel-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ntm-dev/laravel-monitor

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ntm-dev/laravel-monitor
=======================

Local-first application monitoring for Laravel — deep request/job/query insights (requests, queries, jobs, exceptions, cache, mail, ...) on a self-hosted Livewire dashboard like Pulse.

v1.0.0(3w ago)18[2 PRs](https://github.com/ntm-dev/laravel-monitor/pulls)MITPHPPHP ^8.1CI passing

Since Jul 10Pushed 4d agoCompare

[ Source](https://github.com/ntm-dev/laravel-monitor)[ Packagist](https://packagist.org/packages/ntm-dev/laravel-monitor)[ Docs](https://github.com/ntm-dev/laravel-monitor)[ RSS](/packages/ntm-dev-laravel-monitor/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (26)Versions (26)Used By (0)

Laravel Monitor
===============

[](#laravel-monitor)

Local-first application monitoring for Laravel — deep request/job/query insights on a self-hosted dashboard, in the spirit of Pulse. No external service, no agent, no fee: everything is captured from framework events and stored in your own database.

**What it monitors:**

CardSourceRequests (count, avg/max time, status)`RequestHandled`Slow queries (with app-code location)`QueryExecuted` over a thresholdExceptions (grouped by fingerprint, handled/unhandled, occurrence timeline, Ignition-style stack trace + detail page)`MessageLogged`Logs (filterable by level)`MessageLogged`Queue jobs (queued / processed / failed, runtime)queue eventsScheduled tasks (finished / failed / skipped)scheduler eventsCache (hit rate, writes, busiest keys)cache eventsOutgoing HTTP (count, errors, avg time)HTTP client eventsMail &amp; notificationsmail / notification eventsUsers (most active, recent logins)auth events + request attributionRequirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, 12 or 13
- Livewire 3 or 4 (installed automatically)

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

[](#installation)

```
composer require ntm-dev/laravel-monitor
php artisan migrate
```

That's it. Open `/monitor` in your browser (allowed automatically in the `local` environment).

Optionally publish the config and views:

```
php artisan vendor:publish --tag=monitor-config
php artisan vendor:publish --tag=monitor-views
```

Dashboard authorization
-----------------------

[](#dashboard-authorization)

Outside the `local` environment the dashboard returns 403 by default. Grant access by defining the gate in a service provider:

```
use Illuminate\Support\Facades\Gate;

Gate::define('viewMonitor', function ($user = null) {
    return $user?->isAdmin() ?? false;
});
```

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

[](#configuration)

All options live in `config/monitor.php`. Highlights:

```
'enabled' => env('MONITOR_ENABLED', true),   // master switch
'path' => env('MONITOR_PATH', 'monitor'),    // dashboard URL
'retention' => ['hours' => 168],             // used by monitor:prune

'recorders' => [
    Recorders\SlowQueries::class => [
        'enabled' => true,
        'threshold' => 100, // ms
    ],
    // ... every recorder can be disabled or tuned individually
],
```

Pruning old data
----------------

[](#pruning-old-data)

Schedule the prune command so the table doesn't grow forever:

```
// routes/console.php (Laravel 11+) or app/Console/Kernel.php
Schedule::command('monitor:prune')->daily();
```

`php artisan monitor:clear` wipes everything.

Aggregating trend data
----------------------

[](#aggregating-trend-data)

`monitor:aggregate` rolls raw entries up into fixed-width buckets (`monitor_aggregates`) — count, plus sum/max/min of `duration` — so the dashboard's unfiltered trend charts *and* headline totals (Overview, Requests, Application, Exceptions, ...) read that much smaller table instead of scanning every raw row on every page load. Schedule it to run about once every `monitor.aggregates.period` seconds (60 by default) — each run only covers one bucket, so it needs to run at roughly that cadence to stay caught up:

```
// routes/console.php (Laravel 11+) or app/Console/Kernel.php
Schedule::command('monitor:aggregate')->everyMinute();
```

Charts and totals filtered to a single route/job/user still scan raw entries directly — aggregates only ever back the unfiltered case. Until this is scheduled (or for any range older than the aggregator has backfilled), those reads fall back to scanning raw entries directly rather than under-reporting — slower, but never silently wrong.

Storage drivers
---------------

[](#storage-drivers)

The default `database` driver stores entries in a `monitor_entries` table (MySQL, PostgreSQL, SQLite). Point it at a separate connection to keep monitoring data out of your main database:

```
MONITOR_DB_CONNECTION=monitor_sqlite
```

Custom drivers implement `LaravelMonitor\Contracts\Storage` and are registered in a service provider:

```
use LaravelMonitor\StorageManager;

public function boot(): void
{
    $this->app->make(StorageManager::class)->extend('redis', function ($app) {
        return new RedisStorage($app['redis']);
    });
}
```

Then set `MONITOR_STORAGE_DRIVER=redis`.

Recording custom entries
------------------------

[](#recording-custom-entries)

```
use LaravelMonitor\Facades\Monitor;

Monitor::record(
    type: 'deployment',
    key: 'v1.4.2',
    payload: ['by' => 'manh'],
);

// Run something without it being monitored:
Monitor::ignore(fn () => Cache::get('secret'));
```

How it works
------------

[](#how-it-works)

Recorders subscribe to framework events and buffer entries in memory. The buffer is flushed in a single batch when the request (or queue job / scheduled task) finishes, so monitoring adds no queries during the request itself. Recording is paused while flushing, so the monitor never observes its own writes.

Testing
-------

[](#testing)

```
composer install
composer test
```

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance97

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

7

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a60fe83f0632bdb11310c7c11d50b9fba6f3e63c9690d55318245a54ae1f474?d=identicon)[nguyenthemanh2601](/maintainers/nguyenthemanh2601)

---

Top Contributors

[![ntm-dev](https://avatars.githubusercontent.com/u/27183035?v=4)](https://github.com/ntm-dev "ntm-dev (270 commits)")

---

Tags

laravelmonitoringobservabilitytelescopepulse

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ntm-dev-laravel-monitor/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[anousss007/vigilance

A driver-agnostic control center for Laravel queues, jobs, commands and the scheduler. Monitor what ran (with parameters), see failures, and dispatch jobs or run artisan commands manually from a self-contained dashboard.

1949.9k](/packages/anousss007-vigilance)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M163](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k16.3M159](/packages/laravel-pulse)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M362](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M342](/packages/laravel-ai)

PHPackages © 2026

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