PHPackages                             spatie/server-monitor-app - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. spatie/server-monitor-app

ActiveProject[Mail &amp; Notifications](/categories/mail)

spatie/server-monitor-app
=========================

A PHP application to monitor the health of your servers

1.0.1(9y ago)17434722MITPHPPHP ^7.1

Since Mar 4Pushed 5mo ago5 watchersCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (0)

A PHP application to monitor your servers' health
=================================================

[](#a-php-application-to-monitor-your-servers-health)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e37da6ab7a68f120d8d3abd4e03d11e91dd78415103e06f1c37d3c9583bdea7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f7365727665722d6d6f6e69746f722d6170702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/server-monitor-app)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/c25d6de50eb33bb26595bf1e3ef9eb81f975cc666f99803f87d6897ca1459e86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f7365727665722d6d6f6e69746f722d6170702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/server-monitor-app)

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 commandline app 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).

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. This is what a Slack notification looks like:

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

Under the hood the server-monitor-app is a vanilla Laravel 5.4 application with the [laravel-server-monitor](https://docs.spatie.be/laravel-server-monitor) installed into it. If you know your way around Laravel, it's recommended that you use [laravel-server-monitor](https://docs.spatie.be/laravel-server-monitor) instead of this app.

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

[](#support-us)

[![](https://camo.githubusercontent.com/231ed714d67d0e7743bc94ff5c6862398bef299253f7b6114503be0da9161edc/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f7365727665722d6d6f6e69746f722d6170702e6a70673f743d31)](https://spatie.be/github-ad-click/server-monitor-app)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Requirements
------------

[](#requirements)

See the requirements [in the docs of the underlying package](https://docs.spatie.be/laravel-server-monitor/v1/requirements).

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

[](#installation)

You can install the application by issuing this command:

```
composer create-project spatie/server-monitor-app
```

To complete your installation these steps must be performed:

First you should add the following command to your cron table. It should run every minute:

```
php /artisan schedule:run
```

Secondly, specify a Slack webhook url in the `SERVER_MONITOR_SLACK_WEBHOOK_URL` key in the `.env` file found in the installation directory. You can [create a new webhook url](https://my.slack.com/services/new/incoming-webhook/) on the Slack website.

Optionally you can configure e-mail notifications by filling in the `MAIL_` keys in the `.env` file located in the installation directory and adding `mail` to the `notifications` array in the `configuration.php` file.

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

[](#configuration)

The configuration file `configuration.php` is located inside the installation directory.

Reading it is a good way to quickly get a feel of what `server-monitor-app` can do. Here's the content of the 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,
];
```

Basic usage
-----------

[](#basic-usage)

To start monitoring a server:

```
php artisan server-monitor:add-host
```

and answer the questions that are asked.`

To stop monitoring an url issue this command:

```
php artisan server-monitor:delete-host
```

To list all monitors you can perform:

```
php artisan server-monitor:list-hosts
```

You can also list all active checks on all hosts:

```
php artisan server-monitor:list-checks
```

Finally, if you've got a large amount of servers to monitor you can [import them from a JSON file](https://docs.spatie.be/laravel-server-monitor/v1/monitoring-basics/managing-hosts#syncing-from-a-file):

```
php artisan server-monitor:sync-file
```

Advanced usage
--------------

[](#advanced-usage)

Under the hood the `server-monitor-app` is a vanilla Laravel 5.4 application with our [laravel-server-monitor](https://github.com/spatie/laravel-server-monitor) installed into it. Please refer to [it's extensive documentation](https://docs.spatie.be/laravel-server-monitor) to know more how to configure and use this application.

By default the application will use a `sqlite` database located at `/database.sqlite` to store all monitors.

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

[](#documentation)

You'll find the documentation of the underlying `laravel-server-monitor` package on .

Find yourself stuck using this app or the underlying package? Found a bug? Do you have general questions or suggestions for improving the uptime monitor? Feel free to [create an issue on GitHub](https://github.com/spatie/laravel-server-monitor/issues), we'll try to address it as soon as possible.

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

[](#postcardware)

You're free to use this package (it's [MIT-licensed](LICENSE.md)), 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, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

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

About Spatie
------------

[](#about-spatie)

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).

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance50

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~6 days

Total

3

Last Release

3393d ago

Major Versions

0.0.1 → 1.0.02017-03-04

### Community

Maintainers

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

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (10 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (8 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![ptondereau](https://avatars.githubusercontent.com/u/4287777?v=4)](https://github.com/ptondereau "ptondereau (1 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (1 commits)")[![Tjoosten](https://avatars.githubusercontent.com/u/5157609?v=4)](https://github.com/Tjoosten "Tjoosten (1 commits)")

---

Tags

hostinglaravelnotificationsphpserver-monitoringslackspatielaravelelasticsearchserverdevopsmonitorlaravel-server-monitordiskspace

### Embed Badge

![Health badge](/badges/spatie-server-monitor-app/health.svg)

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

###  Alternatives

[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.7M4](/packages/spatie-laravel-failed-job-monitor)[spatie/laravel-server-monitor

Monitor servers

844291.4k6](/packages/spatie-laravel-server-monitor)[spatie/laravel-notification-log

Log notifications sent by your Laravel app

207991.4k](/packages/spatie-laravel-notification-log)[spatie/laravel-discord-alerts

Send a message to Discord

153471.7k](/packages/spatie-laravel-discord-alerts)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41340.7k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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