Available probes

Built-in probes live in two namespaces:

  • Cinderwatch\Laravel\Health\Probes\* — Laravel-specific
  • Cinderwatch\Health\Probes\* — framework-agnostic (from cinder-php)

Options below are named constructor arguments. Use them as the array value in config/cinder.php, or pass them to app()->make(Probe::class, [...]) / new Probe(...).

Laravel probes

Debug mode — debug-mode

Unhealthy when app.debug does not match the expected value.

DebugModeProbe::class => ['expectEnabled' => false],

Environment — environment

Unhealthy when the app is not running in the expected environment.

EnvironmentProbe::class => ['expected' => 'production'],

Database — database

Opens a connection on the default (or given) database connection.

DatabaseConnectionProbe::class,
DatabaseConnectionProbe::class => ['connection' => 'mysql'],

Cache — cache

Writes a value to the cache store and reads it back.

CacheRoundTripProbe::class,
CacheRoundTripProbe::class => ['store' => 'redis'],

Queue — queue

Checks the queue connection answers a size request.

QueueConnectionProbe::class,
QueueConnectionProbe::class => ['connection' => 'redis', 'queue' => 'default'],

Horizon — horizon

Unhealthy when no Horizon supervisor is running, degraded when supervisors are paused, and not applicable when Horizon is not installed.

HorizonProbe::class,

Scheduler — scheduler

Unhealthy when cinder:health has not recorded a heartbeat recently. Requires the health command to be scheduled every minute.

SchedulerHeartbeatProbe::class => ['maxSilenceMinutes' => 2],

Optimisation — optimisation

Degraded when config, routes or events are not cached.

OptimisationProbe::class,

Shared PHP probes

Disk usage — disk-usage

Degraded above the warning percentage, unhealthy above the failure percentage.

DiskUsageProbe::class => ['path' => '/', 'warnAbovePercent' => 70, 'failAbovePercent' => 90],

URL reachable — url-reachable

Requests a URL. By default any response counts as reachable; set requireSuccessStatus to require a 2xx.

UrlReachableProbe::class => ['url' => 'https://example.com/up', 'timeoutSeconds' => 5, 'requireSuccessStatus' => true],

PHP runtime — php-runtime

Unhealthy when the running PHP version is below the minimum.

PhpRuntimeProbe::class => ['minimumVersion' => '8.3.0'],

Composer advisories — composer-advisories

Checks the packages in composer.lock against Packagist's security advisories.

ComposerAdvisoriesProbe::class,
ComposerAdvisoriesProbe::class => ['lockFile' => base_path('composer.lock')],