Overview
Vito Business OS uses Spatie Laravel Health to monitor system component status. Health results are cached to a file store so the/health endpoint remains fast even when checks involve external services.
Health Endpoint
The application exposes a/health endpoint configured in config/health.php. Nginx passes this path to PHP-FPM (not the static 200 OK shortcut), so it exercises the full Laravel bootstrap and returns structured JSON.
| Code | Meaning |
|---|---|
200 | All checks passed |
500 | One or more checks failed |
Configured Checks
Checks are registered inconfig/health.php:
| Check | Warn Threshold | Fail Threshold | What It Verifies |
|---|---|---|---|
DatabaseCheck | — | Connection failure | Can connect to the configured database and execute a query |
UsedDiskSpaceCheck | 70% disk used | 90% disk used | Available disk space on the server |
CacheCheck | — | Write/read failure | Can write to and read from the configured cache store |
Result Store
Health results are cached using the file store:/health endpoint returns the last cached result rather than running checks on every request. To force a fresh check, clear the health cache:
OhDear Integration
The health configuration includes an optional OhDear endpoint. Enable it by setting the following environment variables:/health and alert on failures without requiring additional monitoring infrastructure.
Health Notifications
Spatie Health can send notifications when a check transitions to a failing state. Enable notifications in.env:
Architecture Health Dashboard
Beyond infrastructure checks, Vito Business OS ships an Architecture Health page accessible to super admins in the Filament admin panel at/admin/architecture-health.
This page surfaces compliance metrics for the Domain Event architecture (ADR-002 Governance), including:
- Event coverage summary
- Per-event compliance status
- Active architecture violations
app/Filament/Pages/ArchitectureHealth.php and is restricted to super_admin users:
The Architecture Health page tracks internal code quality metrics, not system uptime. It is intended for development and platform governance, not production alerting.
Load Balancer Health Check
For load balancers that need a lightweight liveness probe (no PHP execution), Nginx returns a static200 OK from the /health location block directly:
This Nginx-level
/health response is separate from the Spatie Health /health endpoint. If you need the Spatie Health JSON output for your load balancer, remove or rename the Nginx return 200 block so requests reach PHP-FPM.Monitoring Recommendations
- Uptime monitoring: Use OhDear, Better Uptime, or a similar service to poll
/healthevery 60 seconds and alert on non-200responses. - Disk space: The
UsedDiskSpaceCheckwarns at 70% and fails at 90%. Configure server alerts at 80% as a secondary signal. - Failed jobs: Query
failed_jobsperiodically and alert when the count grows. A backlog of failed jobs usually indicates a downstream service outage. - Worker liveness: Monitor Supervisor with
supervisorctl status conecta:*and alert if any process is inSTOPPEDorFATALstate. - Log monitoring: Tail
storage/logs/security.logforTENANT_OWNERSHIP_VIOLATIONevents, which indicate potential IDOR probing.