All Projects → spatie → Uptime Monitor App

spatie / Uptime Monitor App

Licence: mit
A PHP application to monitor uptime and ssl certificates

Projects that are alternatives of or similar to Uptime Monitor App

Laravel Failed Job Monitor
Get notified when a queued job fails
Stars: ✭ 582 (+183.9%)
Mutual labels:  slack, notifications, monitor
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 (+642.44%)
Mutual labels:  slack, notifications, monitor
Diun
Receive notifications when an image is updated on a Docker registry
Stars: ✭ 704 (+243.41%)
Mutual labels:  update, slack, notifications
Jonsnow
App Store/Google Play review watcher, deliver new reviews to slack channel
Stars: ✭ 65 (-68.29%)
Mutual labels:  slack, monitor
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (-88.29%)
Mutual labels:  slack, notifications
Synology Notifications
Synology notifications service
Stars: ✭ 47 (-77.07%)
Mutual labels:  slack, notifications
Laravel Server Monitor
Don't let your servers just melt down
Stars: ✭ 595 (+190.24%)
Mutual labels:  notifications, monitor
Gatus
⛑ Gatus - Automated service health dashboard
Stars: ✭ 1,203 (+486.83%)
Mutual labels:  slack, monitor
Base
Base is the foundation for creating modular, unit testable and highly pluggable, server-side node.js applications.
Stars: ✭ 67 (-67.32%)
Mutual labels:  application, update
Backgroundupdate
后台更新APP(两句代码实现)
Stars: ✭ 80 (-60.98%)
Mutual labels:  update, notifications
Ravenx
Notification dispatch library for Elixir applications
Stars: ✭ 100 (-51.22%)
Mutual labels:  slack, notifications
Tfsnotificationrelay
An extensible plugin for TFS that sends notifications to Slack, HipChat and IRC
Stars: ✭ 120 (-41.46%)
Mutual labels:  slack, notifications
Vigil
🚦 Microservices Status Page. Monitors a distributed infrastructure and sends alerts (Slack, SMS, etc.).
Stars: ✭ 804 (+292.2%)
Mutual labels:  slack, monitor
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+254.63%)
Mutual labels:  slack, notifications
Craft Brief
Quick, easy, and customizable user-group notifications for Craft CMS.
Stars: ✭ 47 (-77.07%)
Mutual labels:  slack, notifications
Checknewappversionavailable
It makes a request to Play Store to check if there is a new version of your published app
Stars: ✭ 69 (-66.34%)
Mutual labels:  update, notifications
Glass Isc Dhcp
Glass - ISC DHCP Server Interface
Stars: ✭ 486 (+137.07%)
Mutual labels:  slack, monitor
Server Monitor App
A PHP application to monitor the health of your servers
Stars: ✭ 141 (-31.22%)
Mutual labels:  slack, notifications
Gocd Slack Build Notifier
GoCD (gocd.org) plugin to push build notifications to Slack
Stars: ✭ 96 (-53.17%)
Mutual labels:  slack, notifications
Health
Laravel Health Panel
Stars: ✭ 1,774 (+765.37%)
Mutual labels:  notifications, monitor

A PHP application to monitor uptime and ssl certificates

Latest Version on Packagist Software License Total Downloads

uptime-monitor-app is a powerful, easy to configure uptime monitor written in PHP 7. It will notify you when one of your sites goes down (and when it comes back up). You can also be notified a few days before an SSL certificate on one of your sites expires. Out of the box you can be notified via mail or Slack.

Here are some examples of how the Slack notifications look like:




Under the hood the uptime-monitor is a vanilla Laravel 5.3 application with the laravel-uptime-monitor installed into it. If you know your way around Laravel, it's recommended that you use laravel-uptime-monitor instead of this app.

Installation

You can install the application by issuing this command:

composer create-project spatie/uptime-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 notifications.slack.url key in configuration.php found in the installation directory. You can create a new webhook url on the Slack website.

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 uptime-monitor-app can do. Here's the content of the config file:

return [

    /*
     * You can get notified when specific events occur. Out of the box you can use 'mail'
     * and 'slack'. Of course you can also specify your own notification classes.
     */
    'notifications' => [

        'notifications' => [
            \Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckFailed::class => ['slack'],
            \Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckRecovered::class => ['slack'],
            \Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckSucceeded::class => [],

            \Spatie\UptimeMonitor\Notifications\Notifications\CertificateCheckFailed::class => ['slack'],
            \Spatie\UptimeMonitor\Notifications\Notifications\CertificateExpiresSoon::class => ['slack'],
            \Spatie\UptimeMonitor\Notifications\Notifications\CertificateCheckSucceeded::class => [],
        ],

        /*
         * The location from where you are running this Laravel application. This location will be
         * mentioned in all notifications that will be sent.
         */
        'location' => '',

        /*
         * To keep reminding you that a site is down, notifications
         * will be resent every given number of minutes.
         */
        'resend_uptime_check_failed_notification_every_minutes' => 60,

        'mail' => [
            'to' => ['[email protected]'],
        ],

        'slack' => [
            'webhook_url' => env('UPTIME_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\UptimeMonitor\Notifications\Notifiable::class,

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

    'uptime_check' => [

        /*
         * When the uptime check could reach the url of a monitor it will pass the response to this class
         * If this class determines the response is valid, the uptime check will be regarded as succeeded.
         *
         * You can use any implementation of Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\UptimeResponseChecker here.
         */
        'response_checker' => Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\LookForStringChecker::class,

        /*
         * An uptime check will be performed if the last check was performed more than the
         * given number of minutes ago. If you change this setting you have to manually
         * update the `uptime_check_interval_in_minutes` value of your existing monitors.
         *
         * When an uptime check fails we'll check the uptime for that monitor every time `monitor:check-uptime`
         * runs regardless of this setting.
         */
        'run_interval_in_minutes' => 5,

        /*
         * To speed up the uptime checking process the package can perform the uptime check of several
         * monitors concurrently. Set this to a lower value if you're getting weird errors
         * running the uptime check.
         */
        'concurrent_checks' => 10,

        /*
         * The uptime check for a monitor will fail if the url does not respond after the
         * given number of seconds.
         */
        'timeout_per_site' => 10,

        /*
         * Because networks can be a bit unreliable the package can make three attempts
         * to connect to a server in one uptime check. You can specify the time in
         * milliseconds between each attempt.
         */
        'retry_connection_after_milliseconds' => 100,

        /*
         * Fire `Spatie\UptimeMonitor\Events\MonitorFailed` event only after
         * the given number of uptime checks have consecutively failed for a monitor.
         */
        'fire_monitor_failed_event_after_consecutive_failures' => 2,

        /*
         * When reaching out to sites this user agent will be used.
         */
        'user_agent' => 'spatie/laravel-uptime-monitor uptime checker',

        /*
         * When reaching out to the sites these headers will be added.
         */
        'additional_headers' => [],
    ],

    'certificate_check' => [

        /*
         * The `Spatie\UptimeMonitor\Events\SslExpiresSoon` event will fire
         * when a certificate is found whose expiration date is in
         * the next number of given days.
         */
        'fire_expiring_soon_event_if_certificate_expires_within_days' => 10,
    ],

    /*
     * To add or modify behaviour to the Monitor model you can specify your
     * own model here. The only requirement is that it should extend
     * `Spatie\UptimeMonitor\Models\Monitor`.
     */
    'monitor_model' => Spatie\UptimeMonitor\Models\Monitor::class,
];

Basic usage

To start monitoring a url:

php artisan monitor:create <url>

and answer the questions that are asked. If your url starts with https:// the application will also monitor the ssl certificate.

To stop monitoring a url issue this command:

php artisan monitor:delete <url>

To list all monitors you can perform:

php artisan monitor:list

Advanced usage

Under the hood the uptime-monitor is a vanilla Laravel 5.3 application with our laravel-uptime-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-uptime-monitor package on https://docs.spatie.be/laravel-uptime-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, Samberstraat 69D, 2060 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].