illuma-law/healthcheck-storage

Focused storage health check for Spatie's Laravel Health package.

Maintainers

Package info

github.com/illuma-law/healthcheck-storage

pkg:composer/illuma-law/healthcheck-storage

Fund package maintenance!

illuma-law

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.2 2026-04-20 18:47 UTC

This package is auto-updated.

Last update: 2026-04-20 18:51:41 UTC


README

Tests Packagist License Latest Stable Version

A focused storage health check for Spatie's Laravel Health package.

This package provides a direct health check to verify that your configured storage disks (local, S3, etc.) are actually writable by the application.

Features

  • Write-Read-Delete Cycle: Performs a complete cycle (write small file, read it back, delete it) to ensure full disk operationality.
  • Multi-Disk Support: Monitor multiple disks at once (defaults to local and public).
  • Performance Tracking: Reports the latency of the storage operations for each disk in the health meta data.

Installation

Require this package with composer:

composer require illuma-law/healthcheck-storage

Usage & Integration

Register the check inside your application's health service provider (e.g. AppServiceProvider or a dedicated HealthServiceProvider), alongside your other Spatie Laravel Health checks:

Basic Registration

use IllumaLaw\HealthCheckStorage\StorageDiskWritabilityCheck;
use Spatie\Health\Facades\Health;

Health::checks([
    StorageDiskWritabilityCheck::new()
        ->disks(['local', 'public', 's3']),
]);

Expected Result States

The check interacts with the Spatie Health dashboard and JSON endpoints using these states:

  • Ok: All probed disks successfully completed the write-read-delete cycle.
  • Skipped: No valid disks were configured or found to probe.
  • Failed: One or more disks failed to write, read back, or delete the probe file.

Testing

Run the test suite:

composer test

License

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