Periodically schedule a job to send a heartbeat to a monitoring system.
Require this package with composer:
composer require exolnet/laravel-heartbeat
If you don't use package auto-discovery, add the service provider to the providers
array in config/app.php
:
Exolnet\Heartbeat\HeartbeatServiceProvider::class
And the facade to the facades
array in config/app.php
:
'Heartbeat' => Exolnet\Heartbeat\HeartbeatFacade::class
In order to edit the default configuration (where for e.g. you can find schedule
and presets
) for this package you may execute:
php artisan vendor:publish --provider="Exolnet\Heartbeat\HeartbeatServiceProvider"
After that, config/heartbeat.php
will be created. Inside this file you will find all the fields that can be edited in this package.
The default configuration file can be found here : config/heartbeat.php
Laravel Heartbeat should be working right after the service provider is loaded.
By default Laravel Heartbeat is configure to use queue and the scheduler to create heartbeats. It will store it's files on Laravel's public disk. If you want a dedicated disk you should add a disk to app/config/filesystems.php and change the disk
option in the Queue preset
...
'presets' => [
...
'queue' => [
...
'disk' => 'local',
...
],
...
Channel used to store heartbeats in a Laravel Filesystem disk.
Channel used to store heartbeats in a file
Channel used to make a heartbeat by calling a url
To run the phpUnit tests, please use:
composer test
Please see CONTRIBUTING and CODE OF CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
This code is licensed under the MIT license. Please see the license file for more information.