PHPackages                             osit/laravel-log-sentinel - 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. osit/laravel-log-sentinel

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

osit/laravel-log-sentinel
=========================

A Laravel admin package for monitoring application, server, database, and security logs through a Blade dashboard.

v0.1.0(2mo ago)01MITPHP ^8.2

Since May 20Compare

[ Source](https://github.com/OmniSolInfoTech/laravel-log-sentinel)[ Packagist](https://packagist.org/packages/osit/laravel-log-sentinel)[ RSS](/packages/osit-laravel-log-sentinel/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

[![PHP Version](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)[![Laravel](https://camo.githubusercontent.com/88ce7f9ac798288a91de4918224da3cf354ffc092c40118a331bb5fa3c59f968/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d726564)](https://camo.githubusercontent.com/88ce7f9ac798288a91de4918224da3cf354ffc092c40118a331bb5fa3c59f968/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d726564)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![Status](https://camo.githubusercontent.com/b411594136144442e4c5e6e2e2d63ee7461762fbe5e2eb0e5abbbec3fd812845/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d73756363657373)](https://camo.githubusercontent.com/b411594136144442e4c5e6e2e2d63ee7461762fbe5e2eb0e5abbbec3fd812845/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d73756363657373)[![Package](https://camo.githubusercontent.com/ef95adb81ea75fde7cb4cac1476427ec987aa041f76bdf178330e00abe29373f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b6167652d6c61726176656c2d2d6c6f672d2d73656e74696e656c2d626c61636b)](https://camo.githubusercontent.com/ef95adb81ea75fde7cb4cac1476427ec987aa041f76bdf178330e00abe29373f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b6167652d6c61726176656c2d2d6c6f672d2d73656e74696e656c2d626c61636b)[![Packagist Version](https://camo.githubusercontent.com/6762197ede4694628e915d2b189c7efc0e20e044f5a875352995ddabf75490d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7369742f6c61726176656c2d6c6f672d73656e74696e656c)](https://camo.githubusercontent.com/6762197ede4694628e915d2b189c7efc0e20e044f5a875352995ddabf75490d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7369742f6c61726176656c2d6c6f672d73656e74696e656c)[![Packagist Downloads](https://camo.githubusercontent.com/486b43c4a230f09b5a2d8f1f9fd9cc063d461734adaed0fc4d2783b31f009805/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7369742f6c61726176656c2d6c6f672d73656e74696e656c)](https://camo.githubusercontent.com/486b43c4a230f09b5a2d8f1f9fd9cc063d461734adaed0fc4d2783b31f009805/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7369742f6c61726176656c2d6c6f672d73656e74696e656c)

Tags
----

[](#tags)

`laravel` `logs` `log-monitoring` `security-alerts` `admin-dashboard` `blade` `apache` `nginx` `mysql` `postgresql` `ssh` `linux` `datatables` `sweetalert2` `monitoring` `devops`

Laravel Log Sentinel
====================

[](#laravel-log-sentinel)

Laravel Log Sentinel is a Laravel admin package for monitoring application, web server, database, SSH/authentication, and Linux system logs through a clean Blade dashboard.

It provides log source management, log parsing, searchable DataTables views, security alert detection, dashboard analytics, and retention/pruning tools.

Features
--------

[](#features)

- Blade-based admin dashboard
- Log source management
- Laravel log parser
- Apache access and error log parsers
- Nginx access and error log parsers
- SSH/auth log parser
- Linux system log parser
- MySQL error log parser
- PostgreSQL log parser
- DataTables log viewer
- DataTables alert viewer
- SweetAlert2 toast and confirmation notifications
- Security alert detection engine
- Dashboard analytics overview
- Log retention and pruning command
- Configurable path security
- Installer command

Supported Log Sources
---------------------

[](#supported-log-sources)

SourceParser KeyLaravel logs`laravel`Apache access logs`apache_access`Apache error logs`apache_error`Nginx access logs`nginx_access`Nginx error logs`nginx_error`SSH/auth logs`ssh_auth`Linux system logs`linux_system`MySQL error logs`mysql_error`PostgreSQL logs`postgresql`Generic/custom logs`generic`Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13
- MySQL, MariaDB, PostgreSQL, or another Laravel-supported database
- Composer

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

[](#installation)

Install the package with Composer:

```
composer require osit/laravel-log-sentinel
```

Run the installer:

```
php artisan log-sentinel:install
```

Run migrations:

```
php artisan migrate
```

Optionally create the default Laravel log source during installation:

```
php artisan log-sentinel:install --with-default-source
```

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

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=log-sentinel-config
```

The config file will be published to:

```
config/log-sentinel.php

```

Important settings include:

```
'enabled' => env('LOG_SENTINEL_ENABLED', true),

'route_prefix' => env('LOG_SENTINEL_ROUTE_PREFIX', 'admin/log-sentinel'),

'middleware' => ['web', 'auth'],

'path_security' => [
    'allow_only_configured_paths' => true,
    'allowed_base_paths' => [
        storage_path('logs'),
        '/var/log',
        '/var/log/apache2',
        '/var/log/nginx',
        '/var/log/mysql',
        '/var/log/postgresql',
    ],
],
```

Admin Dashboard
---------------

[](#admin-dashboard)

After installation, open:

```
/admin/log-sentinel

```

The dashboard includes:

- Total log sources
- Active log sources
- Total log entries
- Entries today
- Error entries
- Open alerts
- Critical alerts
- Activity overview
- Top alert types
- Top IP addresses
- Latest alerts
- Latest log entries

Managing Log Sources
--------------------

[](#managing-log-sources)

Open:

```
/admin/log-sentinel/sources

```

From this page, admins can:

- Add log sources
- Edit log sources
- Enable or disable log sources
- Test file readability
- Scan individual sources
- Delete source records

Deleting a source does not delete the actual log file.

Log Viewer
----------

[](#log-viewer)

Open:

```
/admin/log-sentinel/logs

```

The log viewer supports:

- Server-side DataTables loading
- Search
- Sorting
- Filtering by source
- Filtering by source type
- Filtering by level
- Filtering by HTTP status code
- Filtering by date range
- Viewing full log details

Alert Viewer
------------

[](#alert-viewer)

Open:

```
/admin/log-sentinel/alerts

```

The alert viewer supports:

- Server-side DataTables loading
- Search
- Filtering by severity
- Filtering by status
- Filtering by alert type
- Acknowledge alerts
- Resolve alerts
- Reopen alerts
- View linked log entries

Security Alert Detection
------------------------

[](#security-alert-detection)

Log Sentinel detects alerts for activity such as:

- `.env` access attempts
- `.git` access attempts
- phpMyAdmin scans
- WordPress admin scans
- HTTP 500 errors
- HTTP 403 responses
- Failed SSH logins
- Invalid SSH users
- Database authentication failures
- MySQL access denied errors
- PostgreSQL authentication failures
- Out-of-memory events
- Service failures
- Laravel critical errors
- Apache/Nginx permission denied events

Run detection against existing logs:

```
php artisan log-sentinel:detect-alerts --limit=5000
```

New alerts are automatically detected during log scans.

Artisan Commands
----------------

[](#artisan-commands)

### Install

[](#install)

```
php artisan log-sentinel:install
```

Options:

```
php artisan log-sentinel:install --force
php artisan log-sentinel:install --with-default-source
```

### Scan Logs

[](#scan-logs)

```
php artisan log-sentinel:scan
```

Scan one source only:

```
php artisan log-sentinel:scan --source_id=1
```

### Detect Alerts

[](#detect-alerts)

```
php artisan log-sentinel:detect-alerts --limit=5000
```

### Prune Logs

[](#prune-logs)

Dry run:

```
php artisan log-sentinel:prune --dry-run
```

Run pruning:

```
php artisan log-sentinel:prune
```

Override retention days:

```
php artisan log-sentinel:prune --days=7 --dry-run
```

Scheduler Setup
---------------

[](#scheduler-setup)

Add the commands to the host Laravel application scheduler.

In Laravel 11+ / 12, this is usually done in:

```
routes/console.php

```

Example:

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

Schedule::command('log-sentinel:scan')->everyFiveMinutes();
Schedule::command('log-sentinel:prune')->dailyAt('02:00');
```

Production Security Checklist
-----------------------------

[](#production-security-checklist)

Before using this package in production:

- Use authentication middleware.
- Restrict access to admin users only.
- Keep path security enabled.
- Only allow trusted base paths.
- Do not allow arbitrary file browsing.
- Disable Laravel debug mode.
- Run pruning daily.
- Review retention settings.
- Protect server log file permissions.

Recommended middleware config:

```
'middleware' => ['web', 'auth'],
```

For projects with custom admin middleware:

```
'middleware' => ['web', 'auth', 'can:access-admin'],
```

or:

```
'middleware' => ['web', 'auth', 'role:admin'],
```

Path Security
-------------

[](#path-security)

Log Sentinel is designed to read log files only from configured base paths.

Example:

```
'path_security' => [
    'allow_only_configured_paths' => true,

    'allowed_base_paths' => [
        storage_path('logs'),
        '/var/log',
        '/var/log/apache2',
        '/var/log/nginx',
        '/var/log/mysql',
        '/var/log/postgresql',
    ],
],
```

Avoid disabling path restrictions in production.

Retention
---------

[](#retention)

Retention settings are configured in:

```
'retention' => [
    'default_log_days' => 30,
    'resolved_alert_days' => 90,
    'keep_entries_with_open_alerts' => true,
    'prune_chunk_size' => 500,
],
```

Each log source can also define its own retention period.

Publishing Views
----------------

[](#publishing-views)

To customize the Blade views:

```
php artisan vendor:publish --tag=log-sentinel-views
```

Views will be published to:

```
resources/views/vendor/log-sentinel

```

Publishing Migrations
---------------------

[](#publishing-migrations)

```
php artisan vendor:publish --tag=log-sentinel-migrations
```

Development Notes
-----------------

[](#development-notes)

During local package development, the package can be loaded through a Composer path repository:

```
"repositories": [
    {
        "type": "path",
        "url": "packages/osit/log-sentinel",
        "options": {
            "symlink": true
        }
    }
]
```

Then require it in the host Laravel app:

```
"osit/laravel-log-sentinel": "*@dev"
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance87

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

Unknown

Total

1

Last Release

65d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150915028?v=4)[OmniSol Infomation Technology](/maintainers/OmniSolInfoTech)[@OmniSolInfoTech](https://github.com/OmniSolInfoTech)

### Embed Badge

![Health badge](/badges/osit-laravel-log-sentinel/health.svg)

```
[![Health](https://phpackages.com/badges/osit-laravel-log-sentinel/health.svg)](https://phpackages.com/packages/osit-laravel-log-sentinel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/cashier

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

2.5k30.2M151](/packages/laravel-cashier)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

65108.9k](/packages/masterro-laravel-mail-viewer)[hasinhayder/tyro-login

Tyro Login - Beautiful, customizable authentication views for Laravel 12 &amp; 13

2484.9k6](/packages/hasinhayder-tyro-login)

PHPackages © 2026

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