BetterUptime Monitoring and Heartbeats
brilliant-packages/betteruptime-laravel is a Laravel package for betteruptime monitoring and heartbeats.
It currently has 3 GitHub stars and 7.937 downloads on Packagist (latest version 1.1.2).
Install it with composer require brilliant-packages/betteruptime-laravel.
Discover more Laravel packages by brilliant-packages
or browse all Laravel packages to compare alternatives.
Last updated
This packages provides a route for BetterUptime to monitor and excludes it from Telescope monitoring.
It also enables BetterUptime heartbeat monitoring.

You can install the package via composer:
composer require brilliant-packages/betteruptime-laravel
You can publish the config file with:
php artisan vendor:publish --provider="BrilliantPackages\BetterUptimeLaravel\BetterUptimeLaravelServiceProvider" --tag="betteruptime-laravel-config"
This is the contents of the published config file:
return [
'monitor' => [
'enabled' => env('BETTER_UPTIME_MONITOR_ENABLED', true),
'path' => env('BETTER_UPTIME_MONITOR_PATH', 'better-uptime'),
],
'heartbeat' => [
'enabled' => env('BETTER_UPTIME_HEARTBEAT_ENABLED', true),
'url' => env('BETTER_UPTIME_HEARTBEAT_URL'),
'minutes' => env('BETTER_UPTIME_HEARTBEAT_FREQUENCY', 5),
'retry' => [
'count' => env('BETTER_UPTIME_HEARTBEAT_RETRY_COUNT', 5),
'delay' => env('BETTER_UPTIME_HEARTBEAT_RETRY_DELAY', 3000),
],
],
];
Create a BetterUptime monitor using https://{yourDomain}/better-uptime as the URL (you can change the path using the BETTER_UPTIME_MONITOR_PATH environment variable).
You can either set BetterUptime to alert you when it “Becomes unavailable” or “Doesn’t contain keyword”; if you choose the keyword method, use your app’s name (APP_ENV environment variable) or “BetterUptime” as the keyword.
To disable the route, set BETTER_UPTIME_MONITOR_ENABLED=false.
Create a BetterUptime heartbeat monitor with your desired name, frequency, and grace period.
Determine the frequency in minutes (e.g., 1 hour = 60, 1 day = 1440, etc.) and set these environment variables:
BETTER_UPTIME_HEARTBEAT_URL=https://betteruptime.com/api/v1/heartbeat/abc123
BETTER_UPTIME_HEARTBEAT_FREQUENCY=5
To disable heartbeat monitoring, remove the BETTER_UPTIME_HEARTBEAT_URL or set BETTER_UPTIME_HEARTBEAT_ENABLED=false.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.