A PHP application to monitor the health of your servers
A PHP application to monitor the health of your servers
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.
When something goes wrong it can notify you via Slack or mail. This is what a Slack notification looks like:
Under the hood the server-monitor-app is a vanilla Laravel 5.4 application with the laravel-server-monitor installed into it. If you know your way around Laravel, it's recommended that you use laravel-server-monitor instead of this app.
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
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. We publish all received postcards on our virtual postcard wall.
See the requirements in the docs of the underlying package.
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:runSecondly, 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 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.
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:
…To start monitoring a server:
php artisan server-monitor:add-hostand 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-hostsYou can also list all active checks on all hosts:
php artisan server-monitor:list-checksFinally, if you've got a large amount of servers to monitor you can import them from a JSON file:
php artisan server-monitor:sync-file Under the hood the server-monitor-app is a vanilla Laravel 5.4 application with our laravel-server-monitor installed into it. Please refer to it's extensive documentation 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.
You'll find the documentation of the underlying laravel-server-monitor package on https://docs.spatie.be/laravel-server-monitor/v1.
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, we'll try to address it as soon as possible.
You're free to use this package (it's MIT-licensed), 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.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
The MIT License (MIT). Please see License File for more information.
No open issues yet, or sync has not completed.