deegitalbe/laravel-trustup-io-health-checker

Health checker package for trustup apps

v0.3.0 2022-07-14 12:53 UTC

This package is auto-updated.

Last update: 2024-10-14 18:00:09 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Allow to quickly monitor a website.

Installation

You can install the package via composer:

composer require deegitalbe/laravel-trustup-io-health-checker

You have to push the configuration file :

php artisan vendor:publish --tag="health-config"

Inside the generated health.php config file, inside the 'result_stores', just enable the InMemoryHealthResultStore::class and disable other storages :

'result_stores' => [
    /*
    Spatie\Health\ResultStores\EloquentHealthResultStore::class => [
    'model' => Spatie\Health\Models\HealthCheckResultHistoryItem::class,
    'keep_history_for_days' => 5,
    ],

    Spatie\Health\ResultStores\CacheHealthResultStore::class => [
        'store' => 'file',
    ],

    Spatie\Health\ResultStores\JsonFileHealthResultStore::class => [
        'disk' => 's3',
        'path' => 'health.json',
    ],
    */
    
    Spatie\Health\ResultStores\InMemoryHealthResultStore::class,
],

Usage

You can fetch the in real-time result on the route /health-json

Credits

License

The MIT License (MIT). Please see License File for more information.