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

ActiveLibrary

ericmakesstuff/laravel-server-monitor
=====================================

Server Monitoring Command for Laravel Applications

1.2.5(7y ago)42660.1k↓100%37[3 issues](https://github.com/ericmakesstuff/laravel-server-monitor/issues)[2 PRs](https://github.com/ericmakesstuff/laravel-server-monitor/pulls)MITPHP

Since Mar 25Pushed 6y ago21 watchersCompare

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

READMEChangelog (9)Dependencies (5)Versions (10)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.

##### 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],
        ],
    ],
```

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

43

↑

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~113 days

Recently: every ~223 days

Total

9

Last Release

2743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34b37c820dfa62fdb44575c0056b47f97cdb77364cf7687eb3ab1a81bbd12a24?d=identicon)[eblount](/maintainers/eblount)

---

Top Contributors

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

---

Tags

composercomposer-packageslaravellaravel-5-packagelaravel-packagephpphp-libraryserver-monitoring

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

20887.0k](/packages/erag-laravel-disposable-email)[dymantic/laravel-instagram-feed

Fetches the instagram feed for given authenticated profiles

151152.2k](/packages/dymantic-laravel-instagram-feed)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27330.5k](/packages/rahulalam31-laravel-abuse-ip)[casperlaitw/laravel-fb-messenger

A Laravel Package to Integrate Facebook Messenger API

10431.5k](/packages/casperlaitw-laravel-fb-messenger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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