This plugin requires Craft CMS 5.3.0 or later.
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Add the following code to your
composer.json
:"repositories": { "ohdear-health-check": { "type": "vcs", "url": "https://github.com/flowsa/ohdear.git" } }
-
Then, tell Composer to load the plugin:
ddev composer require flowsa/craft-ohdear-health-check
-
Install the plugin using the following command:
ddev php craft plugin/install ohdear-health-check
The Oh Dear Health Check plugin for Craft CMS integrates with the Oh Dear API to monitor the health of your website. It allows you to check and report on various metrics (e.g., disk space, broken links, performance) to ensure your website is running optimally.
Before using the plugin, ensure that you have registered for Oh Dear and have access to the API. You'll need to configure the plugin to connect with the API by following these steps:
- In the Craft CMS Control Panel, navigate to Settings → Plugins and configure the plugin settings.
- Provide the necessary API credentials (if required) for Oh Dear to check your site.
The plugin provides health check results that you can access through the following route: https://your-site-url/actions/ohdear-health-check/webhook/receive
This endpoint will receive a health check report and provide the results in the following JSON format:
{
"finishedAt": 1742425461,
"checkResults": [
{
"name": "UsedDiskSpace",
"label": "Used disk space",
"notificationMessage": "Your disk is almost full (91%)",
"shortSummary": "91%",
"status": "failed",
"meta": {
"used_disk_space_percentage": 91
}
}
]
}