agilepixel / craft-alls-well
Connects a Craft CMS site to All's Well: reports its versions, plugins, administrators and security checks every hour.
Package info
github.com/agilepixel/craft-alls-well
Type:craft-plugin
pkg:composer/agilepixel/craft-alls-well
Requires
- php: ^8.2
- agilepixel/alls-well-php: ^1.1
- craftcms/cms: ^5.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
All's Well monitors uptime, SSL certificates, cron jobs and servers, and alerts you when something goes wrong.
This plugin connects a Craft CMS site to All's Well as a site. Every hour it reports the versions of Craft, PHP and the database, every installed plugin, enabled or not, and Composer package, the site's administrators and the results of its security checks. All's Well alerts you when the site stops reporting, when a serious check starts failing and when a new administrator appears, and on the Pro and Business plans it checks the packages for known vulnerabilities. See pricing for what each plan includes.
- Requirements
- Install
- Connect
- Cron
- Environments and copies
- What it sends, and what it never sends
- Checks
- The control panel
- Commands
- Configuration reference
- It stays out of the way
- Troubleshooting
- Disabling and removing
- Support
Requirements
- Craft CMS 5, from 5.0. Craft 4 isn't supported: its security support ended on 30 April 2026. Craft 6 will need a later major version of the plugin.
- PHP 8.2 or later.
- A cron job that runs the plugin's report every hour (see Cron).
- An All's Well account. Connecting lets you create a free one.
Install
From the Plugin Store: in the control panel, go to Plugin Store, search for "All's Well" and install it.
Or with Composer, from the project's folder:
composer require agilepixel/craft-alls-well php craft plugin/install alls-well
Installing is recorded in project config like any plugin, so the next deploy installs it in your other environments.
Connect
As an administrator, go to Utilities → All's Well and click Connect to All's Well. You sign in to All's Well, or create a free account, approve the site, and come straight back to Craft, connected. For a site new to your team, All's Well also adds an uptime check on its address and, for an https site, a check of its SSL certificate. They count towards your plan's monitors, and each is left out when your team already watches that host or the plan has no room.
The button needs the control panel to be at the site's own address, or at a parent domain or subdomain of it. Otherwise, or if you'd rather not use it:
- On the same screen, under "Connect with a site token or enrolment key instead", paste the site token from the site's page in All's Well, or your team's enrolment key from its Sites page.
- From the command line, run
php craft alls-well/connect. Run without an argument, it asks for the token or key, which keeps it out of the shell's history. - In the environment, set
ALLS_WELL_TOKENto the site token, orALLS_WELL_KEYto your team's enrolment key (amk_…), and the next report connects the site. Either variable accepts either value. A token set this way always wins over a connection made on the screen.
An enrolment key typed on the screen or at the command line is used once and isn't kept. The connection is kept in the site's database, in the allswell_state table (with your table prefix, if you have one). Its site token is encrypted with Craft's security key (CRAFT_SECURITY_KEY); the rest, such as when the site last reported, isn't secret and isn't encrypted. Nothing goes into project config. Changing the security key means connecting again.
Cron
Craft has no scheduler of its own, so add a cron job that runs the report every hour. Utilities → All's Well shows the line to add, on a minute of the site's own, such as:
17 * * * * php /var/www/example/craft alls-well/report
The screen shows this as a step to take until it has seen the job run. The report prints nothing unless something needs fixing, so cron has nothing to email you.
Run the job as the web server's user, for example with crontab -u www-data -e. Run as root, Craft prints a warning every time, which cron then emails you. Where the job has to run as root, as in some containers, set CRAFT_ALLOW_SUPERUSER=1 for it. Where the host has a scheduler of its own, have it run php craft alls-well/report every hour instead.
Without cron
Until cron is set up, a visit can send a report that is due, after its page has gone to the visitor. This needs a server that can hand the page over first and carry on: PHP-FPM (behind nginx, Apache or Caddy), LiteSpeed or FrankenPHP. The visitor never waits for it, and nothing is queued.
Visits can't report on:
- Apache's own PHP (
mod_php), or PHP's built-in server; - hosts that set
CRAFT_EPHEMERAL, which stop PHP once the page is sent; - a site behind full-page caching, such as Blitz or a CDN that caches HTML, where visits never reach PHP.
On the first two, only cron reports, and the screen and php craft alls-well/status say so. Behind full-page caching the plugin can't tell, so set up cron there too. Where cron runs, visits leave the report to it unless it is more than an hour late. 'webFallback' => false in config/alls-well.php stops visits from reporting at all.
Environments and copies
A Craft site's database is often copied, from production to staging or to a developer's machine. A copy must never report as the live site, so the plugin compares the address and the environment the connection was made in with the ones it runs in. Where either differs, it sends nothing and saves nothing, and the screen says the site may be a copy. The exception is a copy with ALLS_WELL_KEY set: it enrols as a site of its own, which counts towards your plan.
- Name every environment with
CRAFT_ENVIRONMENT, such asproductionorstaging. An environment with no name counts as different from one with a name. A copy at the same address and with the same environment name, or with no name on either, can't be told apart. A name Craft guesses from the host name counts as no name. - Where you pull the production database into another environment, give that environment its own site in All's Well and set its
ALLS_WELL_TOKEN. The plugin then uses that token, and ignores the connection that came with the database. - If the site moved to a new domain, change its address in All's Well, then connect it again from Utilities → All's Well. All's Well may ask you to replace the existing connection. After renaming an environment, connecting again is enough.
An environment named production, prod or live (by ALLS_WELL_ENVIRONMENT, or else Craft's own name), or with no name at all, is treated as production: its checks are stricter, and its control panel also warns when the site may be a copy.
What it sends, and what it never sends
A report carries:
- the site's address, its name (Craft's system name) and its environment's name;
- the versions of Craft, PHP and the database server, and whether the site is multi-site;
- every installed plugin, enabled or not: its handle, name, version and Composer package;
- the name and version of every other Composer package installed for production;
- each check's result: pass, warn, fail or info, its severity, a label, a short value, such as a count, and a line of advice;
- the site's administrators: their ID, login and when their account was created, never an email address. A login that is an email address is masked (
jane@example.comis sent asj***@example.com). A username is sent as it is, since an alert about a new administrator has to name them.'administrators' => falseinconfig/alls-well.phpsends none; All's Well then keeps the list it already has, and stops alerting about new administrators.
It never sends other environment values, passwords or keys, entries or other content, request data, file paths, or anything about users other than administrators. When something fails, the plugin logs the exception's class under Craft's alls-well log category, never its message, since that can carry paths or values.
When you click Connect to All's Well, your browser goes to All's Well with the site's address and name, the control panel address to come back to, and two one-time values that tie the answer to your request. After you approve the site, the plugin sends All's Well the one-time code it came back with, a secret that proves the request started here, and the site's address, name and plugin version, with its current site token if it has one. All's Well answers with the site's token.
Checks
| Key | What it checks |
|---|---|
craft.dev_mode |
Dev mode is off. It fails in production. |
craft.security_key |
Craft's security key is set. It fails when it isn't. |
craft.critical_updates |
No update that its author marked critical is waiting, for Craft or a plugin. It fails when one is, and says so when nothing has looked for updates lately. |
craft.registration |
Public registration doesn't put new users in a group that can open the control panel. It fails when it does. |
craft.admin_changes |
Admin changes are not allowed. It warns in production. |
craft.test_email |
Email goes to its recipients, not to a test address. It warns in production. |
craft.https |
The site's address is https. It warns when it isn't. |
craft.migrations |
No migrations are waiting. It warns when some are. |
craft.project_config |
Project config has been applied. It warns when changes are waiting. |
craft.queue |
No queue jobs have failed. It warns when some have, and says so on a queue that doesn't count them. |
craft.licences |
No plugin licence is invalid, mismatched or astray, as Craft last heard. Craft's own licence isn't checked. It warns. |
addon.schedule |
Reports are sent by cron. It warns when cron hasn't run for three hours, or when no cron job is seen and visits can't report. |
craft.live |
Whether the site is online. |
craft.environment |
The environment's name. |
craft.backup |
When the newest database backup made by Craft was. Backups made elsewhere aren't seen. |
php.dev_packages |
No Composer development packages are installed. It warns in an environment named production, prod or live. |
The checks only look: they don't run migrations, apply project config or ask Craft's servers for updates. craft.critical_updates reads what Craft last found when it looked for updates.
A check already reported that moves into fail at critical or high severity alerts your team: of the plugin's checks, dev mode, the security key, critical updates and registration can. A check seen for the first time is recorded without alerting. It alerts again only once it has been out of fail for 24 hours. Other results show on the site's page in All's Well.
Your own checks
Add checks in config/alls-well.php. Each returns a CheckResult: pass, warn, fail or info, with a label, a severity (critical, high, medium, low or info), an optional value and an optional line of detail.
<?php use AgilePixel\AllsWell\Checks\CheckResult; use craft\helpers\App; return [ 'checks' => [ 'site.stripe' => fn () => App::env('STRIPE_SECRET_KEY') ? CheckResult::pass('Stripe is configured', 'high') : CheckResult::fail('Stripe is configured', 'high'), ], ];
A key is up to 191 characters: a lowercase letter or digit, then lowercase letters, digits, dots, dashes and underscores. It can't start with addon. or server.. A check with a key that breaks these rules is skipped, and an addon.invalid_checks warning says how many were. A key the plugin already uses is ignored. A check that throws, or names an unknown severity, is sent as failed at medium, naming only the exception's class, so it never alerts.
The control panel
Utilities → All's Well shows whether the site is connected, when it last reported, and anything to fix. Administrators can connect, send a report now, turn reporting back on and disconnect there. Other users with access to the utility see the status only. Settings → Plugins → All's Well leads to the same screen.
Administrators also see an alert on every control panel page when the site was deleted in All's Well, when All's Well no longer recognises its token, when reports have stopped, or when a report was refused. In production it also says when the site may be a copy or has moved, and when settings stop it reporting.
Commands
| Command | What it does |
|---|---|
php craft alls-well/report |
Sends the report when one is due; --manual sends it whether or not one is due, unless the plugin is backing off after a failure or paused. Cron runs it every hour. From cron it prints nothing unless something needs fixing; in a terminal, or with -v, it says how it went. A --manual run doesn't count as cron running. |
php craft alls-well/connect |
Connects the site with a site token or your team's enrolment key, which it asks for when it isn't given one, or resumes the connection it has, and sends a report. |
php craft alls-well/status |
Shows the connection, the last result, whether visits can report, when cron last ran and anything to fix. It sends nothing. |
php craft alls-well/disconnect |
Tells All's Well the site is going, and stops reporting until it is connected again. All's Well then marks the site Down and alerts your team. It asks first, so scripts need --force. |
Configuration reference
Settings come from the environment first, then from config/alls-well.php, which returns an array and can hold settings per environment like Craft's other config files.
| Variable | Config key | Default | What it sets |
|---|---|---|---|
ALLS_WELL_TOKEN |
token |
none | The site token from All's Well. |
ALLS_WELL_KEY |
key |
none | Your team's enrolment key (amk_…), which enrols the site: as a new site, or by taking over one at the same address that isn't reporting. A site token wins over it. |
ALLS_WELL_URL |
url |
https://alls-well.io |
The All's Well address. Set it only when the site's Connect steps in All's Well include it. |
ALLS_WELL_SITE_URL |
siteUrl |
the primary site's base URL | The address the site is served from. It must be public. Set it when the base URL depends on the request (@web), which the command line can't know. |
ALLS_WELL_SITE_NAME |
siteName |
Craft's system name | The name the site is reported under. |
ALLS_WELL_ENVIRONMENT |
environment |
Craft's environment (CRAFT_ENVIRONMENT) |
The environment name reported, which also decides whether the site counts as production. Copies are still told apart by Craft's own. |
ALLS_WELL_ENABLED |
enabled |
on | false, 0, off or no turns reporting off without removing the plugin. |
| none | timeout |
15 |
Seconds to wait for All's Well, from 1 to 60. |
| none | administrators |
true |
false sends no administrators. |
| none | webFallback |
true |
false stops visits from sending reports, so only cron does. |
| none | checks |
[] |
Your own checks. |
It stays out of the way
- A visitor never waits. A visit only reports after its page has been handed over, where the server can do that, and never from an Ajax request or in maintenance mode. Nothing is pushed onto Craft's queue.
- Saves never fail because of it. Changes it reports are noted after Craft's own work is done, outside its transactions.
- One report at a time. Cron, visits and the control panel share one claim, so two reports never overlap.
- Calls to All's Well time out after
timeoutseconds, and a visit's after 10 seconds at most. - Nothing in project config, so the same code can be a different site in each environment.
Troubleshooting
Start with php craft alls-well/status. It sends nothing, and lists anything to fix under errors.
paused: movedorpaused: environment("This site was connected at another address" or "in another environment"): the database is probably a copy, so nothing is sent. Give the copy its own site andALLS_WELL_TOKEN. If the site really moved, change its address in All's Well and connect again.- "All's Well does not recognise this site's token": All's Well no longer knows the token, usually because the site was connected again from another install, which gave it a new one. Connect again, or set
ALLS_WELL_TOKENto the site's current token. - "The saved connection can't be read, because the security key changed since it was made": connect the site again.
paused: deleted: the site was deleted in All's Well. Connect again to add it as a new site, or remove the plugin. WithALLS_WELL_TOKEN, set it to a new site's token instead.paused: site_moved: All's Well refused a report because the site has another address there, andlast_errorsays why. If the site moved, change its address in All's Well. If it's a copy, give it a site of its own. Then connect again.- The site is Down in All's Well: it stopped reporting, usually because the cron job stopped or never started. Check
cron last ranandvisits can report. - "This site's address … isn't public": the address is localhost or a private network. Set
ALLS_WELL_SITE_URLto the address the site is served from. last_status: 409with "This site is already connected and reporting": the site tried to enrol with the team key at an address whose site is still reporting, usually after its stored connection was lost. SetALLS_WELL_TOKENto the site's token, or delete the site in All's Well.- An enrolment refused at the site limit: your plan's site allowance is used up, and the message names the plan. Delete a site you no longer need, or upgrade.
Disabling and removing
- Disabling the plugin, in the control panel, with
php craft plugin/disable alls-wellor through project config, tells All's Well, which marks the site Down ("Add-on deactivated") and alerts your team. Enabling it again tells All's Well too. While it is disabled, remove the cron line, or cron emails you every hour that the command is unknown. - To stop reporting for a while, set
ALLS_WELL_ENABLED=false. All's Well isn't told, so after three hours without a report it marks the site Down ("No add-on report received") and alerts your team, as it does for any site that stops. - To remove it, uninstall it first, so it can tell All's Well the site is going, then remove it with Composer. All's Well marks the site Down ("Add-on removed") and alerts your team, and the site stays in All's Well until you delete it there. Uninstalling drops the
allswell_statetable.
php craft plugin/uninstall alls-well composer remove agilepixel/craft-alls-well
A copy of the site says nothing when it is disabled or uninstalled. Then remove the cron line, config/alls-well.php and the ALLS_WELL_* settings.
Update with Composer or the Plugin Store. The site's page in All's Well says when a newer version exists.
Support
- Email hello@alls-well.io.
- This repository is published with each release, so pull requests can't be merged here. Open an issue or email us instead.
- Report security problems by email to the same address, not in an issue.
License
MIT. See LICENSE.md.