Magento 2 Package
Apply Oh Dear health checks to your Magento 2 applications with pre-built and custom checks.
This Composer package integrates Oh Dear's application health monitoring with Magento 2 stores. It provides pre-built health checks and makes it easy to create custom ones.
Installation #
composer require vendic/magento2-oh-dear-checks
Pre-built Health Checks #
The package includes several ready-to-use checks:
- Disk Space: Monitor available storage with configurable thresholds
- CPU Load: Track system load at 1, 5, and 15-minute intervals
- Database Connections: Alert on connection pool exhaustion
- PHP-FPM Processes: Monitor PHP process counts
- Two-Factor Authentication: Verify 2FA status
Configuration #
Customize checks in your env.php:
'oh_dear' => [ 'diskspace' => ['max_percentage' => 86], 'cpu_load' => [ 'max_load_1m' => 2.5, 'max_load_5m' => 2.0, 'max_load_15m' => 1.5, ], ],
Disable any check by adding 'enabled' => false.
Custom Health Checks #
Create your own checks by implementing Vendic\OhDear\Interfaces\CheckInterface and registering them in the configuration. The package includes integration tests as examples.
Endpoint #
Health check results are available at /oh-dear-health-application-check-results (requires the secret header configured in Oh Dear).
For full documentation and source code, see the GitHub repository.