elgentos / magento2-oh-dear-checks
elgentos/magento2-oh-dear-checks
Magento 2 module for Oh Dear checks integration.
elgentos/magento2-oh-dear-checks
This Magento 2 module extends the Vendic OhDear module with additional application health checks.
Installation
composer require elgentos/magento2-oh-dear-checks
bin/magento module:enable Elgentos_OhDearChecks
bin/magento setup:upgrade
Available Checks
Sansec Shield Security Check
This check verifies that the Sansec Shield security extension is properly installed, enabled, and configured:
- Module Installation: Checks if the
Sansec_Shieldmodule is installed - Module Enablement: Verifies the module is enabled via
sansec_shield/general/enabledconfiguration - License Configuration: Ensures a license key is configured via
sansec_shield/general/license_key
Check Results:
- ✅ OK: Module is installed, enabled, and has a license key configured
- ⚠️ WARNING: Module is installed and enabled but license key is missing
- ❌ FAILED: Module is not installed or not enabled
Indexer Backlog Check
This check monitors the backlog size for all scheduled indexers in your Magento store:
- Backlog Monitoring: Tracks the number of pending items for each scheduled indexer
- Status Tracking: Reports the current status of each indexer
Check Results:
- ✅ OK: All indexers are up to date or have minimal backlog (< 1,000 items)
- ⚠️ WARNING: High backlog detected (1,000 - 9,999 items)
- ❌ FAILED: Critical backlog detected (≥ 10,000 items)
Metadata Includes:
- Backlog size per indexer
- Maximum backlog across all indexers
- Number of indexers with backlog
HTTP Cache Hosts Check
This check verifies that HTTP cache hosts (Varnish) are properly configured for cache clearing:
- Configuration Check: Verifies that
http_cache_hostsis configured inenv.php - Validation: Ensures at least one host is configured with both
hostandportparameters
Check Results:
- ✅ OK: HTTP cache hosts are properly configured
- ❌ FAILED: HTTP cache hosts are not configured or misconfigured
Metadata Includes:
- Configuration status
- Number of configured hosts
- List of configured hosts (without sensitive details)
Example Configuration in env.php:
'http_cache_hosts' => [
[
'host' => '127.0.0.1',
'port' => '6081'
]
]
Configuration
You can disable any check by adding configuration to your env.php:
'ohdear' => [
'Elgentos\\OhDearChecks\\Checks\\SansecShield' => [
'enabled' => false
],
'Elgentos\\OhDearChecks\\Checks\\IndexerBacklog' => [
'enabled' => false,
// Optional: customize which indexers to check
'indexer_ids' => [
'catalog_product_price',
'catalog_category_product',
'catalogsearch_fulltext',
// ... add or remove indexer IDs as needed
],
// Optional: global default thresholds (used when no per-indexer threshold is set)
'warning_threshold' => 1000,
'critical_threshold' => 10000,
// Optional: per-indexer thresholds (override global defaults)
'thresholds' => [
'catalog_product_price' => [
'warning' => 500,
'critical' => 5000
],
'catalogsearch_fulltext' => [
'warning' => 2000,
'critical' => 15000
],
// ... configure thresholds for specific indexers
]
],
'Elgentos\\OhDearChecks\\Checks\\HttpCacheHosts' => [
'enabled' => false
]
]
Indexer Backlog Configuration Options
indexer_ids(array): List of indexer IDs to monitor. If not specified, a default list of 10 common indexers is used.warning_threshold(int): Global warning threshold. Default: 1,000 items. Used when no per-indexer threshold is configured.critical_threshold(int): Global critical threshold. Default: 10,000 items. Used when no per-indexer threshold is configured.thresholds(array): Per-indexer threshold configuration. Each indexer can have its ownwarningandcriticalvalues that override the global defaults.
Priority Order:
- Per-indexer threshold (if configured)
- Global threshold (if configured)
- Default threshold (1,000 for warning, 10,000 for critical)
Contributing
Feel free to submit pull requests with additional security and health checks for Magento 2.
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 0.3.0 | stable | Fail | Magento 2.4.7-2.4.8 Details | 2025-09-30 20:53:20 |
| 0.2.0 | stable | Not tested | Not yet tested Details | 2025-09-30 20:08:15 |
| 0.1.0 | stable | Not tested | Not yet tested Details | 2025-09-23 09:54:25 |
| 0.0.10 | stable | Not tested | Not yet tested Details | 2025-06-30 07:55:12 |
| 0.0.9 | stable | Not tested | Not yet tested Details | 2025-02-13 13:17:16 |
| 0.0.8 | stable | Not tested | Not yet tested Details | 2024-12-10 11:15:45 |
| 0.0.7 | stable | Not tested | Not yet tested Details | 2024-12-09 08:39:36 |
| 0.0.6 | stable | Not tested | Not yet tested Details | 2024-12-08 18:41:48 |
| 0.0.5 | stable | Not tested | Not yet tested Details | 2024-12-06 14:31:33 |
| 0.0.4 | stable | Not tested | Not yet tested Details | 2024-12-06 14:22:25 |
| 0.0.3 | stable | Not tested | Not yet tested Details | 2024-12-06 14:13:17 |
| 0.0.2 | stable | Not tested | Not yet tested Details | 2024-12-06 14:10:35 |
| 0.0.1 | stable | Not tested | Not yet tested Details | 2024-12-06 14:06:55 |
Requires 1
| Package | Constraint |
|---|---|
| vendic/magento2-oh-dear-checks | ^1.8 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from elgentos
View vendorLink existing guest orders to newly created or existing customer based on e-mail address
Allows customers to enter a secondary email address to login with
Hide Mollie payment methods based on category
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.