View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
3314 | Composr | core | public | 2017-07-05 14:03 | 2017-07-25 21:41 |
Reporter | Chris Graham | Assigned To | Chris Graham | ||
Priority | normal | Severity | feature | ||
Status | resolved | Resolution | fixed | ||
Summary | 3314: Automatic website tests ("Health Check") | ||||
Description | We want to be able to automatically detect when something goes wrong with a website. This could be: - Software compatibility issue arisen - Upgrade fault - Hardware failure - Hack-attack - Some important admin item forgotten - Some kind of screw up The web is just far too complex and commoditised now for people to be able to intentionally check for everything that could go wrong. We need to get all the checks automated into the system. Extend the current 'check' hook system so that a wider variety of tests for live sites can be run. Each check hook would get a parameter to say whether it was running for an install, a live site, or a test site, or in manual mode. Whether it is a test site or a live site would be controlled via a configuration option. The checks would be initiated from a new "Health Check" item on the 'Tools' menu of the Admin Zone, which would call manual mode. There'd be checkboxes to say what tests to run, very similar to 'Website cleanup tools'. It would be stripped from 'PHP-info' and the Admin Zone dashboard, where it runs currently. Checks would also run in a CRON hook, e-mailing results on a new notification type ("Automatic check failure"). Checks would also be runnable by a health_check.php script in data_custom. This would need http-authentication to run, or an explicit login as an admin. It would need to be documented in the codebook (which lists manually callable scripts). It should allow a parameter to filter which checks to run. Each failed check would quote the codename of the hook that failed, and there'd be a config option to list codenames of hooks to not run. A config option would allow specifying whether to get a daily "all is good" e-mail sent out. Here are checks for problems we have so far in our idea list: (this list is now moved off into code and won't be maintained here as things keep changing: https://raw.githubusercontent.com/ocproducts/composr/master/_tests/tests/unit_tests/_health_check.php) (some of these may not be feasible) Some of the current unit tests would be moved into check hooks (only some, most tests will still be done in the dev cycle [due to needing extra code, or taking a long time to run, or being destructive], and the database/integrity checks ensures the live site matches what is expected): - No major HTTP downloading issues (http.php) - Blocks all render (blocks.php) - No obvious authentication/privilege issues (auth.php) Update codebook_standards.txt so any references to these PHP files now reference them under the Health Check. A new bridge unit test would run all the check hooks. The database_integrity.php unit test can go given there'll be a checks hook for that. Document this Health Check system, including all the checks that run, and how it needs CRON, and how you can plug an external uptime checker tool into the health_check.php script. Maybe this would all be documented next to our advice about something like Uptime Robot. Add running a Health Check to the sup_professional_upgrading and the codebook_standards tutorials. List feature in our features list. | ||||
Additional Information | This was originally a part of 3049 but can be done first as it has great advantages on its own. Forum topic for discussion: https://compo.sr/forum/topicview/browse/general-chat/what-could-go-wrong.htm | ||||
Tags | No tags attached. | ||||
Attach Tags | |||||
Time estimation (hours) | 24 | ||||
Sponsorship open | |||||
related to | 3049 | Not Assigned | Guest | Major upgrade reimagining (including hypervisor, and default theme improvements) |
has duplicate | 1906 | Closed | Chris Graham | "I am disconnected from the URL" alerts |
related to | 3315 | Resolved | Chris Graham | Bundle default robots.txt |
|
This should probably be run as separate from cron_bridge.php if at all possible, unless you force this to be the very first thing that runs each time cron_bridge.php runs. Reason for this is because if it's not the first thing that runs, and something in the cron tasks queue fails before it gets to this, then health check might not run. (Alternative option: 3316 ) |
|
I think putting it first makes sense, good suggestion. I wouldn't want to make any one configure 2 CRON processes. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-07-05 14:03 | Chris Graham | New Issue | |
2017-07-05 14:04 | Chris Graham | Description Updated | |
2017-07-05 14:04 | Chris Graham | Relationship added | related to 3049 |
2017-07-05 20:26 | Chris Graham | Summary | Automatic website tests => Automatic website tests ("Health Check") |
2017-07-05 20:26 | Chris Graham | Description Updated | |
2017-07-05 20:27 | Chris Graham | Relationship added | has duplicate 1906 |
2017-07-05 20:30 | Chris Graham | Relationship added | related to 3315 |
2017-07-05 20:30 | Chris Graham | Description Updated | |
2017-07-05 23:26 | Chris Graham | Description Updated | |
2017-07-06 02:49 | Chris Graham | Description Updated | |
2017-07-06 03:28 | Chris Graham | Description Updated | |
2017-07-06 03:31 | Chris Graham | Description Updated | |
2017-07-06 12:02 | Chris Graham | Description Updated | |
2017-07-07 17:13 | Chris Graham | Description Updated | |
2017-07-08 02:17 | PDStig | Note Added: 0005157 | |
2017-07-08 02:26 | PDStig | Note Edited: 0005157 | |
2017-07-09 15:56 | Chris Graham | Note Added: 0005162 | |
2017-07-11 19:02 | Chris Graham | Time estimation (hours) | 16 => 24 |
2017-07-11 19:02 | Chris Graham | Description Updated | |
2017-07-13 13:28 | Chris Graham | Description Updated | |
2017-07-14 17:01 | Chris Graham | Description Updated | |
2017-07-15 13:56 | Chris Graham | Description Updated | |
2017-07-25 21:41 | Chris Graham | Status | Not Assigned => Resolved |
2017-07-25 21:41 | Chris Graham | Resolution | open => fixed |
2017-07-25 21:41 | Chris Graham | Assigned To | => Chris Graham |