RAM usage, the Problems README, Recovery, Repairs, Rules Report, Security Report, Snap, Speed, Summary and Tests now open with what the feature is, links to read more, step-by-step use, how each number is computed and how it is implemented, and end with the commits that built it. Corrected from the code: the automatic board repair no longer un-binds lists (since #6515); Recovery's rule email section has Review, Resend, Mark as sent and Drop, and a section for legacy rule emails; Delete is under Settings; the Product name is in Settings / Appearance; Speed rows fold per kind of request, not per path; the RAM row detail has WeKan RSS and no load; the snap command falls back to MONGO_URL and prints the Databases section. Thanks to xet7 !
6.2 KiB
Admin Panel / Problems / Tests
What it is
Runtime self-checks that failed: the kind of invariant a WeKan unit test
asserts, checked on the running server without a browser and without
Playwright. Shortly after the server starts it checks that the database
answers, that the files directory is writable, that the JavaScript heap has
room left and that the disk has free space; only a failure is shown here.
Address: /admin/problems/tests. Site administrators only.
Read more
- Smoke testing on Wikipedia - a quick check that the basic functions work, which is what these self-checks are.
- Built-in self-test on Wikipedia - a system that tests itself while it runs.
- Node.js v8 module -
v8.getHeapStatistics(), the heap numbers the heap check reads. - In WeKan: RAM-usage.md, Disk-usage.md, Security-Report.md (the same table).
How to use it
Read the failed checks
- Log in as a site administrator.
- Click your avatar or username at the top right and choose Admin Panel.
- Click the Problems tab.
- In the left menu, under Reports, click Tests.
- Each row is a check that failed: the Source column names the check, the Detail column is its error message. "No new problems." means no check has failed since the stream was last cleared.
Acknowledge or clear the stream
- Open Problems → Summary.
- Tick Admin Panel → Problems → Tests.
- Click Acknowledge or Clear (Summary.md).
Run the checks again
The pane has no button for it. Restart WeKan (the checks run 15 seconds after
start), or call the admin-only Meteor method runSelfChecks, which returns
{ checks, failures }.
Change the free disk space limit
- Set
WEKAN_MIN_FREE_DISK_MBto the smallest free space, in MiB, the files filesystem may have. - Restart WeKan.
How the numbers are calculated
From server/lib/selfChecks.js and models/lib/runtimeHealth.js:
| Number | How it is computed |
|---|---|
| When the checks run | once, 15 000 ms after Meteor.startup. |
| Heap headroom | used_heap_size / heap_size_limit from v8.getHeapStatistics(); fails at 0.9 (90 %) or more. The detail is V8 heap <used> MiB of <limit> MiB (<percent>%), each MiB rounded (bytes / 1 048 576). |
| Free disk space | bavail × bsize from fs.statfsSync() on the files directory; fails below the minimum. The minimum is WEKAN_MIN_FREE_DISK_MB × 1024 × 1024 when that is a number of 0 or more, otherwise 256 MiB. The detail is filesystem has <free> MiB free; minimum <min> MiB. |
| Severity | medium for these unit-style checks (testLog.js maps suite unit to medium, security to high, e2e to low). |
runSelfChecks result |
checks is the number of checks (4); failures is how many threw. |
| Attempts | how many failures were folded into this row; empty when once. |
| Retention | rows older than EVENTLOG_RETENTION_DAYS (default 90) are deleted once a day. |
How it works in WeKan
Where the rows come from
The tests stream of the eventlog collection, written by
server/lib/selfChecks.js through
server/lib/testLog.js. The checks run once,
15 seconds after the server starts. Only a failure is recorded; a passing check
writes nothing.
| Check (Source column) | Fails when |
|---|---|
self-check:database-roundtrip |
a one-document query to the database fails |
self-check:writable-path |
a probe file cannot be written and removed in WRITABLE_PATH/files (or in WRITABLE_PATH itself when it already is the files directory) |
self-check:heap-headroom |
the V8 heap uses 90 % or more of its limit |
self-check:free-disk-space |
the files filesystem has less free space than WEKAN_MIN_FREE_DISK_MB (default 256 MiB) |
A failure is recorded with category test-failure, name TestBleed, action
failed and severity medium; the Detail column is the check's error message.
The admin-only method runSelfChecks runs the checks again on demand; it
refuses anybody who is not isAdmin. The pane itself has no button for it.
The table
The same read-only event table as the Security Report: Date and time, Category, Name, Severity, Action, Source, Username, IPv4, Location, IPv6, Location, Attempts and Detail, newest first, 10 rows a page, with a search box that filters as you type. "No new problems." means no check has failed since the stream was last cleared.
Acknowledge or clear the stream on Summary. Rows older than
EVENTLOG_RETENTION_DAYS (default 90) are deleted daily. The rows are also on
GET /api/admin/problems/tests
(REST API).
Tests
- tests/runtimeHealth.test.cjs - the heap and disk thresholds, including invalid statistics failing closed.
- tests/securityLog.test.cjs - the self-checks are loaded by the server and record through the tests logger.
Related
- RAM-usage.md and Disk-usage.md - the continuous memory and disk monitors.
Commits
- One files directory for every platform, used by the writable-path check
- Add the heap headroom and free disk space self-checks
- One summary row per problem, with who and how often
- Runtime self-checks write the Tests stream, without Playwright
- Store the security, speed and tests streams in the WeKan database
- Add the Problems page with its Tests pane