Download the PHP package devskio/statamic-ohdear-addon without Composer
On this page you can find all versions of the php package devskio/statamic-ohdear-addon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devskio/statamic-ohdear-addon
More information about devskio/statamic-ohdear-addon
Files in devskio/statamic-ohdear-addon
Package statamic-ohdear-addon
Short Description Statamic addon that integrates the Oh Dear health-check endpoint into the Statamic control panel.
License MIT
Informations about the package statamic-ohdear-addon
Statamic Oh Dear Health Check
A Statamic addon that exposes an Oh Dear-compatible health-check endpoint and provides a control-panel configuration screen.
It is built as a Statamic-specific layer on top of devskio/laravel-ohdear-health-check, which provides the core HTTP endpoint, shared-secret middleware, and base checks (database, disk space, error log).
Related project: TYPO3 Oh Dear Health Check — the same concept for TYPO3 CMS.
Features
- CP configuration screen – configure all checks and thresholds directly from the Statamic control panel
- Statamic-specific checks
- Statamic version (compares installed vs latest GitHub release)
- Storage folder size (excludes
framework/anddebugbar/caches) - Forgotten public files (warns about unexpected files in
public/)
- Shared-package checks (managed by
devskio/laravel-ohdear-health-check)- Database connectivity
- Disk used space
- PHP error log size
- Oh Dear-compatible JSON response format
- Dashboard widget – a control-panel widget showing the local checks alongside everything Oh Dear itself monitors (uptime, performance, broken links, mixed content, certificate health, DNS, domain expiry, scheduled tasks) when an API token is configured
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.2 |
| Statamic | ^6.0 |
| Laravel | ^12.0 || ^13.0 |
Installation
The devskio/laravel-ohdear-health-check package is installed automatically as a dependency.
Publish config (optional)
Configuration
All settings can be managed in three ways (listed by priority, highest first):
- Statamic Control Panel – open Tools → OhDear Health Check. Changes are written directly to the published config files and take effect immediately — no
.envediting or deployment required. - Environment variables – add any of the keys below to your
.envfile. - Config file – publish
config/statamic-ohdear-health-check.phpand edit it directly (useful for array values likeallowed_files).
⚠️ Values saved through the CP will override both the config file defaults and env variables for the settings it manages. If you want env variables to always take precedence, rely solely on
.envand leave the CP form untouched.
Environment variables
Config file
Publish the config for values that cannot be set via env (e.g. allowed_files, which is an array):
Then edit config/statamic-ohdear-health-check.php:
Control panel
Open Tools → OhDear Health Check in the Statamic CP to configure all options through a UI. Settings saved here are written to the published config files and take effect immediately.
Dashboard widget
Add the widget to config/statamic/cp.php:
Only users with the View OhDear health check widget permission see it — for everyone else it
renders nothing and Statamic drops it from the dashboard. It is a permission of its own, so
configuring the addon does not imply seeing the widget (and vice versa). Grant it per role under Users → Permissions. To skip running the checks entirely
for users who can't see it, gate the widget in cp.php as well:
The widget needs its stylesheet published once:
It shows the four application-health cards (disk space, error log, storage size, forgotten
files) from the local checks. Add OHDEAR_API_TOKEN and OHDEAR_MONITOR_ID — or fill them in
under Tools → OhDear Health Check — and the monitor strip above them is populated from the
Oh Dear API instead of the local checks: uptime, performance, broken links, mixed content,
certificate health, DNS, domain expiry, scheduled tasks and anything else enabled on the
monitor. Results are cached for the widget's cache seconds (default 60), and the widget falls
back to local checks if the API is unreachable.
Permissions
| Permission | Grants |
|---|---|
configure ohdear health check |
Access to Tools → OhDear Health Check |
view ohdear health check widget |
The dashboard widget |
The two are independent: grant the widget to editors without letting them change thresholds, or give an admin the settings screen without putting the widget on their dashboard. Super users have both. Neither is granted by default, so add them to the roles that need them.
Forgotten Files check
The check scans public/ and warns about any entry that is not in the built-in allowlist:
Add project-specific entries via allowed_files in the config (supports fnmatch glob patterns).
Statamic Version check
Fetches the latest Statamic release tag from GitHub (api.github.com) and compares it to the installed version. The result is cached for 6 hours.
Authors
License
The MIT License. See LICENSE for details.
All versions of statamic-ohdear-addon with dependencies
devskio/laravel-ohdear-health-check Version ^1.0
guzzlehttp/guzzle Version ^7.0
statamic/cms Version ^6.0