Store long-term stats on the health of your Horizon Queues.
This package takes the Horizon snapshot data and stores it in the database, with easy to access models, so you can track your queue health over time.
Install via composer
composer require striebwj/horizon-statsphp artisan vendor:publish --provider="striebwj\HorizonStats\ServiceProvider"Update the horizon-stats.php config file to change the database names. Default is horizon_stats.
Once migrations are run, add the horizon-stats:store command to your App\Console\Kernel.php with the same time as
your Horizon Snapshot command. Be sure to add it before the snapshot. It should look something like this:
// Horizon Tasks
$schedule->command('horizon-stats:store')->everyFiveMinutes(); // Before the snapshot
$schedule->command('horizon:snapshot')->everyFiveMinutes();
- Add tests
- Allow pushing storing in DB to a queue
- Add pruning?
If you discover any security related issues, please email [email protected] instead of using the issue tracker.