PHPackages                             webvimark/laravel-server-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. webvimark/laravel-server-monitor

ActiveLibrary

webvimark/laravel-server-monitor
================================

Server Monitoring Command for Laravel Applications

1.2.6(9y ago)016MITPHP

Since Mar 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/webvimark/laravel-server-monitor)[ Packagist](https://packagist.org/packages/webvimark/laravel-server-monitor)[ RSS](/packages/webvimark-laravel-server-monitor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (11)Used By (0)

Server monitoring for Laravel apps
==================================

[](#server-monitoring-for-laravel-apps)

[![Latest Version](https://camo.githubusercontent.com/3dbafd79f0480764b43f3c1ff1db77d7cf91fd277cb2cf694f37645ccc6e1e01/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f657269636d616b657373747566662f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/ericmakesstuff/laravel-server-monitor/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/3047b00170fd1f8dce7b5c064f7f8868f2bffdc7d746d1720be507416459781f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f657269636d616b657373747566662f6c61726176656c2d7365727665722d6d6f6e69746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ericmakesstuff/laravel-server-monitor)[![Quality Score](https://camo.githubusercontent.com/31bf23cd7f5ad621ab1ad838d9d9b44895b1672ac2470f5f0b939f6306c22353/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f657269636d616b657373747566662f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ericmakesstuff/laravel-server-monitor)[![Total Downloads](https://camo.githubusercontent.com/9d3b10cc87eef5f6ad393facb7935863a79f19d2ef423740d318b5da9ecdf672/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657269636d616b657373747566662f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ericmakesstuff/laravel-server-monitor)

This Laravel 5 package will periodically monitor the health of your server and website. Currently, it provides healthy/alarm status notifications for Disk Usage, an HTTP Ping function to monitor the health of external services, and a validation/expiration monitor for SSL Certificates.

Once installed, monitoring your server is very easy. Just issue this artisan command:

```
php artisan monitor:run
```

You can run only certain monitors at a time:

```
php artisan monitor:run HttpPing
php artisan monitor:run SSLCertificate,DiskUsage
```

How It Works
------------

[](#how-it-works)

Using the configuration file in your project, any number of monitors can be configured to check for problems with your server setup.

When the `monitor:run` artisan command is executed, either from the command line or using the Laravel command scheduler, the monitors run and alert if there is an issue. The alarm state is configurable, and alerts can be sent to the log, or via email, Pushover, and Slack.

##### Disk Usage Monitors

[](#disk-usage-monitors)

Disk usage monitors check the percentage of the storage space that is used on the given partition, and alert if the percentage exceeds the configurable alarm percentage.

##### HTTP Ping Monitors

[](#http-ping-monitors)

HTTP Ping monitors perform a simple page request and alert if the HTTP status code is *not* 200. They can optionally check that a certain phrase is included in the source of the page.

> Note: If you provide *checkPhrase* that should be in response, then HTTP status code is *not* checked. This way you can check that your *403* page returns something like *{"error":{"code":403,"message":"Invalid authorization headers"}}*

##### SSL Certificate Monitors

[](#ssl-certificate-monitors)

SSL Certificate monitors pull the SSL certificate for the configured URL and make sure it is valid for that URL. Wildcard and multi-domain certificates are supported.

The monitor will alert if the certificate is invalid or expired, and will also alert when the expiration date is approaching. The days on which to alert prior to expiration is also configurable.

Installation and usage
----------------------

[](#installation-and-usage)

You can install this package via composer using:

`composer require ericmakesstuff/laravel-server-monitor`

You'll need to register the ServiceProvider:

```
// config/app.php

'providers' => [
    // ...
    EricMakesStuff\ServerMonitor\ServerMonitorServiceProvider::class,
];
```

To publish the config file to app/config/server-monitor.php run:

`php artisan vendor:publish --provider="EricMakesStuff\ServerMonitor\ServerMonitorServiceProvider"`

Monitor Configuration
---------------------

[](#monitor-configuration)

After publishing the configuration file, you can edit the `'monitors'` section of app/config/server-monitor.php.

The default monitor configurations are:

```
'monitors' => [
    /*
     * DiskUsage will alert when the free space on the device exceeds the alarmPercentage.
     * path is any valid file path, and the monitor will look at the usage of that disk partition.
     *
     * You may add as many DiskUsage monitors as you require.
     */
    'DiskUsage' => [
        [
            'path' => base_path(),
            'alarmPercentage' => 75,
        ],
    ],
    /*
     * HttpPing will perform an HTTP request to the configured URL and alert if the response code
     * is not 200, or if the optional checkPhrase is not found in the response.
     */
    'HttpPing' => [
        [
            'url' => 'http://www.example.com/',
        ],
        [
            'url' => 'http://www.example.com/',
            'checkPhrase' => 'Example Domain',
            'timeout' => 10,
            'allowRedirects' => false,
        ],
    ],
    /*
     * SSLCertificate will download the SSL Certificate for the URL and validate that the domain
     * is covered and that it is not expired. Additionally, it can warn when the certificate is
     * approaching expiration.
     */
    'SSLCertificate' => [
        [
            'url' => 'https://www.example.com/',
        ],
        [
            'url' => 'https://www.example.com/',
            'alarmDaysBeforeExpiration' => [14, 7],
        ],
    ],
```

Optionally you can define configurations as anonymous functions. For example

```
'monitors' => [
    'HttpPing' => function(){
        return \App\Models\Domain::all()->map(function(\App\Models\Domain $domain){
            return [
                'url'=>$domain->url,
                'checkPhrase'=>$domain->check_phrase,
            ];
        })->toArray();
    },
]
```

Alert Configuration
-------------------

[](#alert-configuration)

Alerts can be logged to the default log handler, or sent via email, Pushover, or Slack. Allowed values are `log`, `mail`, `pushover`, and `slack`.

The default alert configurations are:

```
'events' => [
    'whenDiskUsageHealthy'       => ['log'],
    'whenDiskUsageAlarm'         => ['log', 'mail'],
    'whenHttpPingUp'             => ['log'],
    'whenHttpPingDown'           => ['log', 'mail'],
    'whenSSLCertificateValid'    => ['log'],
    'whenSSLCertificateInvalid'  => ['log', 'mail'],
    'whenSSLCertificateExpiring' => ['log', 'mail'],
],
```

Scheduling
----------

[](#scheduling)

After you have performed the basic installation you can start using the monitor:run command. In most cases you'll want to schedule this command so you don't have to manually run monitor:run every time you want to know the health of your server.

The commands can, like an other command, be scheduled in Laravel's console kernel.

```
// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
   $schedule->command('monitor:run')->daily()->at('10:00');
   $schedule->command('monitor:run HttpPing')->hourly();
}
```

Of course, the schedules used in the code above are just an example. Adjust them to your own preferences.

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Next Steps
----------

[](#next-steps)

More monitoring metrics. Feel free to submit ideas via issues or pull requests!

##### Ideas

[](#ideas)

- Remote server disk space usage (over SSH)
- NTP Offset in seconds

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Eric Blount](https://github.com/ericmakesstuff) - Author
- [Freek Van der Herten](https://github.com/freekmurze) - Inspiration/Base Package ([Backup](https://github.com/spatie/laravel-backup))

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 73.3% 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 ~33 days

Recently: every ~65 days

Total

10

Last Release

3395d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6502086?v=4)[webvimark](/maintainers/webvimark)[@webvimark](https://github.com/webvimark)

---

Top Contributors

[![eblount](https://avatars.githubusercontent.com/u/1424719?v=4)](https://github.com/eblount "eblount (22 commits)")[![webvimark](https://avatars.githubusercontent.com/u/6502086?v=4)](https://github.com/webvimark "webvimark (5 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (2 commits)")[![johny011409](https://avatars.githubusercontent.com/u/59572323?v=4)](https://github.com/johny011409 "johny011409 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webvimark-laravel-server-monitor/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.4k10.6M274](/packages/laravel-boost)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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