PHPackages                             my-monitor/cli-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. my-monitor/cli-server-monitor

ActiveLibrary

my-monitor/cli-server-monitor
=============================

Monitor servers

1.3.2(8y ago)08MITPHPPHP ^7.1

Since Feb 20Pushed 8y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (11)Versions (22)Used By (0)

An easy to use powerful server monitor
======================================

[](#an-easy-to-use-powerful-server-monitor)

[![Latest Version on Packagist](https://camo.githubusercontent.com/72b63603e20f4b5ebfd507273daec3c8736ccfb2c575301382037e0bd925aca1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-server-monitor)[![Build Status](https://camo.githubusercontent.com/b34e8783f61f86ff9b40c3ecffeeadca4669670f2713b5ddd962a3c67ffeedbb/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7370617469652f6c61726176656c2d7365727665722d6d6f6e69746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/spatie/laravel-server-monitor)[![Quality Score](https://camo.githubusercontent.com/3a5c3d756ec6ce68755ccce26aa38dae6d4eae748e7c1d8863dd2d5329ca092f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7370617469652f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/spatie/laravel-server-monitor)[![StyleCI](https://camo.githubusercontent.com/0d72adf6613915d140332546477b7de563fc1c603bd7d2bf4c8152b4ebfa9b5c/68747470733a2f2f7374796c6563692e696f2f7265706f732f38323035313337392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/82051379)[![Total Downloads](https://camo.githubusercontent.com/031bcce89873e039c53f50428eacf5efa2303dd266147564c0baa0a72e57e8f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d7365727665722d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-server-monitor)

We all dream of servers that need no maintenance at all. But unfortunately in reality this is not the case. Disks can get full, processes can crash, the server can run out of memory...

This package keeps an eye on the health of all your servers. There are a few [checks that come out of the box](https://docs.spatie.be/laravel-server-monitor/v1/monitoring-basics/built-in-checks). [Adding new checks](https://docs.spatie.be/laravel-server-monitor/v1/monitoring-basics/writing-your-own-checks) is a breeze.

When something goes wrong it can [notify you](https://docs.spatie.be/laravel-server-monitor/v1/monitoring-basics/notifications-and-events) via Slack or mail. Here's how a Slack notification look like:

[![](https://camo.githubusercontent.com/6e0b4dbb8225a03f9ccdf1d9ff1dde864795147fef799036d0ed04b79988ea35/68747470733a2f2f646f63732e7370617469652e62652f696d616765732f7365727665722d6d6f6e69746f722f636865636b2d6661696c65642e6a7067)](https://camo.githubusercontent.com/6e0b4dbb8225a03f9ccdf1d9ff1dde864795147fef799036d0ed04b79988ea35/68747470733a2f2f646f63732e7370617469652e62652f696d616765732f7365727665722d6d6f6e69746f722f636865636b2d6661696c65642e6a7067)

Behind the scenes [Laravel's native notification system](https://laravel.com/docs/5.4/notifications) is leveraged so you can use one of the [many notification drivers](http://laravel-notification-channels.com/).

Documentation
-------------

[](#documentation)

The full documentation is available on [our documentation site](https://docs.spatie.be/laravel-server-monitor).

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

[](#installation)

You can install this package via composer using this command:

```
composer require spatie/laravel-server-monitor
```

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework, you must install the service provider:

```
// config/app.php
'providers' => [
    ...
    Spatie\ServerMonitor\ServerMonitorServiceProvider::class,
];
```

You can publish the migrations with:

```
php artisan vendor:publish --provider="Spatie\ServerMonitor\ServerMonitorServiceProvider" --tag="migrations"
```

After the migration has been published you can create the `hosts` and `checks `tables by running the migrations:

```
php artisan migrate
```

You must publish the config-file with:

```
php artisan vendor:publish --provider="Spatie\ServerMonitor\ServerMonitorServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [

    /*
     * These are the checks that can be performed on your servers. You can add your own
     * checks. The only requirement is that they should extend the
     * `Spatie\ServerMonitor\Checks\CheckDefinitions\CheckDefinition` class.
     */
    'checks' => [
        'diskspace' => Spatie\ServerMonitor\CheckDefinitions\Diskspace::class,
        'elasticsearch' => Spatie\ServerMonitor\CheckDefinitions\Elasticsearch::class,
        'memcached' => Spatie\ServerMonitor\CheckDefinitions\Memcached::class,
        'mysql' => Spatie\ServerMonitor\CheckDefinitions\MySql::class,
    ],

    /*
     * The performance of the package can be increased by allowing a high number
     * of concurrent ssh connections. Set this to a lower value if you're
     * getting weird errors running the check.
     */
    'concurrent_ssh_connections' => 5,

    /*
     * This string will be appended to the ssh command generated by the package.
     */
    'ssh_command_suffix' => '',

    'notifications' => [

        'notifications' => [
            Spatie\ServerMonitor\Notifications\Notifications\CheckSucceeded::class => [],
            Spatie\ServerMonitor\Notifications\Notifications\CheckRestored::class => ['slack'],
            Spatie\ServerMonitor\Notifications\Notifications\CheckWarning::class => ['slack'],
            Spatie\ServerMonitor\Notifications\Notifications\CheckFailed::class => ['slack'],
        ],

        /*
         * To avoid burying you in notifications, we'll only send one every given amount
         * of minutes when a check keeps emitting warning or keeps failing.
         */
        'throttle_failing_notifications_for_minutes' => 60,

        'mail' => [
            'to' => 'your@email.com',
        ],

        'slack' => [
            'webhook_url' => env('SERVER_MONITOR_SLACK_WEBHOOK_URL'),
        ],

        /*
         * Here you can specify the notifiable to which the notifications should be sent. The default
         * notifiable will use the variables specified in this config file.
         */
        'notifiable' => \Spatie\ServerMonitor\Notifications\Notifiable::class,

        /*
         * The date format used in notifications.
         */
        'date_format' => 'd/m/Y',
    ],

    /*
     * To add or modify behaviour to the `Check` model you can specify your
     * own model here. The only requirement is that they should
     * extend the `Check` model provided by this package.
     */
    'check_model' => Spatie\ServerMonitor\Models\Check::class,

    /*
     * Right before running a check it's process will be given to this class. Here you
     * can perform some last minute manipulations on it before it will
     * actually be run.
     *
     * This class should implement Spatie\ServerMonitor\Manipulators\Manipulator
     */
    'process_manipulator' => Spatie\ServerMonitor\Manipulators\Passthrough::class,

    /*
     * Thresholds for disk space's alert.
     */
    'diskspace_percentage_threshold' => [
        'warning' => 80,
        'fail' => 90,
    ],
];
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

To run the tests you'll have to start the included node based dummy ssh server first in a separate terminal window.

```
cd tests/server
npm install
./start_server.sh
```

With the server running, you can start testing.

```
vendor/bin/phpunit
```

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.

Postcardware
------------

[](#postcardware)

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

We publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards).

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

The code to execute commands on a remote server was copied from [Envoy](https://github.com/laravel/envoy).

Support us
----------

[](#support-us)

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

Does your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/spatie). All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 82% 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 ~16 days

Recently: every ~66 days

Total

21

Last Release

2982d ago

Major Versions

0.1.0 → 1.0.02017-03-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8f7720b07ee7addde37df48b85d7de8e127f043d7c1b7aacd0af79328301f0d?d=identicon)[ahmedash95](/maintainers/ahmedash95)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (196 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (17 commits)")[![ahmedash95](https://avatars.githubusercontent.com/u/8272048?v=4)](https://github.com/ahmedash95 "ahmedash95 (6 commits)")[![matt-croft](https://avatars.githubusercontent.com/u/11648395?v=4)](https://github.com/matt-croft "matt-croft (4 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (4 commits)")[![akoepcke](https://avatars.githubusercontent.com/u/5311185?v=4)](https://github.com/akoepcke "akoepcke (2 commits)")[![ptondereau](https://avatars.githubusercontent.com/u/4287777?v=4)](https://github.com/ptondereau "ptondereau (2 commits)")[![matthewtrask](https://avatars.githubusercontent.com/u/4731244?v=4)](https://github.com/matthewtrask "matthewtrask (1 commits)")[![srmklive](https://avatars.githubusercontent.com/u/839335?v=4)](https://github.com/srmklive "srmklive (1 commits)")[![bbashy](https://avatars.githubusercontent.com/u/1149200?v=4)](https://github.com/bbashy "bbashy (1 commits)")[![Big-Shark](https://avatars.githubusercontent.com/u/646054?v=4)](https://github.com/Big-Shark "Big-Shark (1 commits)")[![blueclock](https://avatars.githubusercontent.com/u/586174?v=4)](https://github.com/blueclock "blueclock (1 commits)")[![introwit](https://avatars.githubusercontent.com/u/11228182?v=4)](https://github.com/introwit "introwit (1 commits)")[![kapersoft](https://avatars.githubusercontent.com/u/13007854?v=4)](https://github.com/kapersoft "kapersoft (1 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")

---

Tags

spatielaravel-server-monitor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/my-monitor-cli-server-monitor/health.svg)

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

8549.3M60](/packages/spatie-laravel-health)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k36.2M405](/packages/spatie-laravel-medialibrary)[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.1M159](/packages/spatie-laravel-backup)[spatie/laravel-server-monitor

Monitor servers

844276.4k6](/packages/spatie-laravel-server-monitor)[spatie/laravel-event-sourcing

The easiest way to get started with event sourcing in Laravel

8913.6M24](/packages/spatie-laravel-event-sourcing)[spatie/laravel-uptime-monitor

A powerful, easy to configure uptime monitor

1.1k224.4k8](/packages/spatie-laravel-uptime-monitor)

PHPackages © 2026

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