spatie / laravel-uptime-monitor
A powerful, easy to configure uptime monitor
Fund package maintenance!
spatie
spatie.be/open-source/support-us
Requires
- php: ^8.1
- ext-intl: *
- ext-json: *
- graham-campbell/guzzle-factory: ^5.0|^7.0
- guzzlehttp/guzzle: ^7.4|^7.2
- illuminate/cache: ^10.0|^11.0
- illuminate/config: ^10.0|^11.0
- illuminate/console: ^10.0|^11.0
- illuminate/container: ^10.0|^11.0
- illuminate/contracts: ^10.0|^11.0
- illuminate/events: ^10.0|^11.0
- illuminate/filesystem: ^10.0|^11.0
- illuminate/notifications: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- laravel/slack-notification-channel: ^2.4|^3.2
- spatie/ssl-certificate: ^1.22|^2.1.2
- spatie/url: ^2.0.0
Requires (Dev)
- illuminate/testing: ^10.0|^11.0
- mockery/mockery: ^1.4
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.5
- dev-main
- v4.x-dev
- 4.5.0
- 4.4.0
- 4.3.0
- 4.2.1
- 4.2.0
- 4.1.1
- 4.1.0
- 4.0.1
- 4.0.0
- 3.9.0
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- v2.x-dev
- 2.2.0
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- v1.x-dev
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-analysis-5ZBOrl
- dev-analysis-Rv9JpK
- dev-analysis-KZVleA
- dev-analysis-lKODNw
- dev-analysis-64ElyM
- dev-analysis-2Qe1wZ
- dev-analysis-rdn619
- dev-analysis-m4lGAW
- dev-analysis-gOBoM4
- dev-analysis-ZlEvLb
- dev-analysis-d0PGkZ
- dev-analysis-4xvQ5e
- dev-analysis-NAnaOe
- dev-analysis-VreLJg
- dev-analysis-1b5m93
- dev-analysis-lKODbV
- dev-analysis-0g3VLL
- dev-analysis-wjm64o
- dev-analysis-M1ZrKl
- dev-analysis-Zl6NEP
- dev-analysis-EA431m
- dev-analysis-d0J7Pg
- dev-analysis-L3EAao
- dev-analysis-9mQLpP
- dev-analysis-J2BwYb
- dev-analysis-nNEmB0
- dev-analysis-VrPVeB
- dev-analysis-OMpjaW
- dev-analysis-64bReW
- dev-analysis-J2BwQo
- dev-analysis-KZ7bOV
- dev-analysis-Yj1neA
- dev-analysis-64bRe9
- dev-analysis-BMJpW6
- dev-analysis-0g3VJx
- dev-analysis-yvwOx2
- dev-analysis-rdkAxV
- dev-analysis-m47WxE
- dev-analysis-WNwaLG
- dev-analysis-3wmn4p
- dev-analysis-kad3xR
- dev-analysis-Zl6NdD
- dev-analysis-vQW1xy
- dev-analysis-5ZwJ5Y
- dev-analysis-L3EAEG
- dev-analysis-NAGyGy
- dev-analysis-Yj1n1A
- dev-analysis-nNEmEg
- dev-analysis-OMpjpJ
- dev-analysis-1bMaML
- dev-analysis-D29g95
- dev-analysis-2QWKWl
- dev-analysis-rdkAkV
- dev-analysis-bQndnY
- dev-analysis-Pxk1k9
- dev-analysis-3wmnmp
- dev-analysis-d0J7Jj
- dev-analysis-gO4G41
- dev-analysis-Zl6N6D
- dev-analysis-7a191b
- dev-analysis-4xPNWn
- dev-analysis-Rv3Qgp
- dev-analysis-nNEmAg
- dev-analysis-lKvMAW
- dev-analysis-OMpjGJ
- dev-analysis-64bRP9
- dev-analysis-NAGyZ1
- dev-analysis-nNEmA5
- dev-analysis-VrPVmw
- dev-analysis-0g3Vkn
- dev-analysis-QMg6km
- dev-analysis-D29gRl
- dev-analysis-orZPAK
- dev-analysis-ADNGny
- dev-analysis-wjm6DW
- dev-analysis-M1ZrE4
- dev-analysis-gO4Gpd
- dev-analysis-Zl6NJN
- dev-analysis-vQW1ax
- dev-analysis-5ZwJjj
- dev-analysis-4xPNjG
- dev-analysis-Rv3QO7
- dev-analysis-KZ7bjQ
- dev-analysis-lKvMWk
- dev-analysis-NAGyj1
- dev-analysis-QMg6Qm
- dev-analysis-BMJpjg
- dev-analysis-0g3Vjn
- dev-analysis-rdkAOG
- dev-analysis-WNwaKN
- dev-analysis-gO4Gld
- dev-analysis-4xPNrG
- dev-analysis-Zl6NZN
- dev-analysis-NAGyN1
- dev-analysis-VrPVdw
- dev-analysis-NAGyNg
- dev-analysis-VrPVdO
- dev-analysis-D29g1y
- dev-analysis-orZPbg
- dev-analysis-m47Wb7
- dev-analysis-gO4Gbb
- dev-analysis-7a19gV
- dev-analysis-Rv3QGM
- dev-analysis-nNEmby
- dev-analysis-1bMa7w
- dev-analysis-0g3VvE
- dev-analysis-yvwOPG
- dev-analysis-WNwaeP
- dev-analysis-GD5W6V
- dev-analysis-vQW1PO
- dev-analysis-L3EAVw
- dev-analysis-ajKe3o
- dev-analysis-64bR9n
- dev-analysis-ajKeaZ
- dev-analysis-OMpjel
- dev-analysis-BMJplW
- dev-analysis-2QWK5r
- dev-analysis-Pxk1dA
- dev-analysis-3wmne1
- dev-analysis-vQW1od
- dev-analysis-L3EA4P
- dev-analysis-J2BwRD
- dev-analysis-ajKeYZ
- dev-analysis-BMJp6W
- dev-analysis-orZPvb
- dev-analysis-WNwaZ5
- dev-analysis-peGw7V
- dev-analysis-7a19e2
- dev-analysis-Rv3QeY
- dev-analysis-KZ7bND
- dev-analysis-QMg6O6
- dev-analysis-VrPVK3
- dev-analysis-QMg6OO
- dev-analysis-D29g5J
- dev-analysis-ADNG9B
- dev-analysis-M1ZrBM
- dev-analysis-peGwKR
- dev-analysis-e7REar
- dev-analysis-4xPNKN
- dev-analysis-64bRNN
- dev-analysis-1bMaY1
- dev-analysis-5Zw0kv
- dev-analysis-peG90a
This package is auto-updated.
Last update: 2024-11-20 18:01:01 UTC
README
Laravel-uptime-monitor is a powerful, easy to configure uptime monitor. It will notify you when your site is 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. Under the hood, the package leverages Laravel native notifications, so it's easy to use Slack, Telegram or your preferred notification provider.
You'll find extensive documentation on [https://spatie.be/docs/laravel-uptime-monitor]. It includes detailed info on how to install and use the package.
If you're not familiar with Laravel, but still want to use our uptime monitor, take a look at the uptime-monitor-app repo which contains a stand alone version of this package.
Reading the config file of this package is a good way to quickly get a feel of what laravel-uptime-monitor
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' => ['your@email.com'], ], '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, /* * If you want to change the default Guzzle client behaviour, you can do so by * passing custom options that will be used when making requests. */ 'guzzle_options' => [ // 'allow_redirects' => false, ], /* * 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' => [], /* * Allow status codes other than 200 to be considered as successful uptime checks. */ 'additional_status_codes' => [], ], '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, ];
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.
API
Currently this package does not offer an API, if you need that take a look at this package.
Documentation
You'll find the documentation on https://docs.spatie.be/laravel-uptime-monitor. It includes detailed info on how to install and use the package.
Find yourself stuck using the 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.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
To run the tests, issue this command:
vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.