All Projects → spatie → Server Monitor App

spatie / Server Monitor App

Licence: mit
A PHP application to monitor the health of your servers

Projects that are alternatives of or similar to Server Monitor App

Laravel Failed Job Monitor
Get notified when a queued job fails
Stars: ✭ 582 (+312.77%)
Mutual labels:  laravel, slack, notifications
Laravel Slack Slash Command
Make a Laravel app respond to a slash command from Slack
Stars: ✭ 215 (+52.48%)
Mutual labels:  laravel, slack, notifications
Laravel Fcm
🌐 A Laravel package to send Push Notifications to one or many devices of the user.
Stars: ✭ 56 (-60.28%)
Mutual labels:  laravel, notifications
Notifier
NO LIBRARIES socket per page bridge for your Laravel application. (CLIENT PART INCLUDED)
Stars: ✭ 57 (-59.57%)
Mutual labels:  laravel, notifications
Project
⭐️ Antares Project Application Skeleton. This is the very first place you should start. It allows you to create a brand new awesome project in easy few steps.
Stars: ✭ 84 (-40.43%)
Mutual labels:  laravel, notifications
Laravel Notification
Example package for using the (still under development) Messages API from Nexmo as a notification channel in Laravel
Stars: ✭ 44 (-68.79%)
Mutual labels:  laravel, notifications
Synology Notifications
Synology notifications service
Stars: ✭ 47 (-66.67%)
Mutual labels:  slack, notifications
Laralack
A Slack clone written in PHP & Laravel framework
Stars: ✭ 82 (-41.84%)
Mutual labels:  laravel, slack
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (+458.16%)
Mutual labels:  laravel, notifications
Statusok
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Stars: ✭ 1,522 (+979.43%)
Mutual labels:  slack, notifications
Ravenx
Notification dispatch library for Elixir applications
Stars: ✭ 100 (-29.08%)
Mutual labels:  slack, notifications
Tfsnotificationrelay
An extensible plugin for TFS that sends notifications to Slack, HipChat and IRC
Stars: ✭ 120 (-14.89%)
Mutual labels:  slack, notifications
Builder
Prepare your Laravel apps incredibly fast, with various commands, services, facades and boilerplates.
Stars: ✭ 1,009 (+615.6%)
Mutual labels:  laravel, notifications
Laravel Smsgateway Notification Channel
SMS Gateway notification channel for Laravel
Stars: ✭ 13 (-90.78%)
Mutual labels:  laravel, notifications
Craft Brief
Quick, easy, and customizable user-group notifications for Craft CMS.
Stars: ✭ 47 (-66.67%)
Mutual labels:  slack, notifications
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (-82.98%)
Mutual labels:  slack, notifications
Laravel Console Logger
Logging and Notifications for Laravel Console Commands.
Stars: ✭ 79 (-43.97%)
Mutual labels:  laravel, notifications
Laravel Fcm
Firebase Cloud Messaging (FCM) sender for Laravel
Stars: ✭ 129 (-8.51%)
Mutual labels:  laravel, notifications
Diun
Receive notifications when an image is updated on a Docker registry
Stars: ✭ 704 (+399.29%)
Mutual labels:  slack, notifications
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+415.6%)
Mutual labels:  slack, notifications

A PHP application to monitor your servers' health

Latest Version on Packagist Software License Total Downloads

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:

Screenshot slack

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.

Support us

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.

Requirements

See the requirements in the docs of the underlying package.

Installation

You can install the application by issuing this command:

composer create-project spatie/server-monitor-app <name of install directory>

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 <installation path>/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 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

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' => '[email protected]',
        ],

        '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

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 <name>

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:

php artisan server-monitor:sync-file <hosts.json>

Advanced usage

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 <installation directory>/database.sqlite to store all monitors.

Documentation

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.

Postcardware

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.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

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.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].