File status, Filesystem integrity, Impersonation Report, Instrumentation, Large boards, Login problems, Migrations, Offices, Password length and Performance now each say what the feature is, where to read more, how to use it, how its numbers are calculated, how it is implemented, and link the commits that built it. Corrected from the code: the file status scan limits are 100,000 records per collection and 250,000 versions, not 20,000; the snap's FerretDB default is OpLog with polling as the fallback, not polling only; the Password length table has 25 rows a page. Thanks to xet7 !
7.5 KiB
Admin Panel / Problems / Filesystem integrity
What it is
Whether this server stopped cleanly, what crashed it, and whether the
continuous backup failed - plus the read-only file status checks. It is the
place an administrator looks after an unexpected outage: a crash, a quick
restart without a clean stop, an uncaught error or a broken backup stream each
leave a row here. Address: /admin/problems/integrity. Site administrators
only.
Read more
- Heartbeat (computing) - how a periodic "still alive" mark shows a server died.
- Crash (computing) and
Signal (IPC) -
SIGTERMandSIGINT, the clean-stop signals. - File integrity monitoring, SHA-2 and EdDSA (ed25519) - the daily file scan.
- WeKan: File status checks, Security Report, Database problems, Continuous backup, Security remediation design, section 13.
How to use it
Read what happened
- Sign in as a site administrator and open Admin Panel → Problems → Filesystem integrity.
- Read the table, newest first: Date and time, Category, Name, Severity, Action, Source, Username, IPv4, Location, IPv6, Location, Attempts and Detail. 10 rows a page; the search box filters as you type.
- To acknowledge or clear the stream, open Problems → Summary, tick the row for Filesystem integrity and press Acknowledge or Clear.
Check the files
- At the top of the pane press Check files and history, Check file types and extensions or Check missing and untracked files - the same checks as on the Files Report and Recovery panes.
- Cancel check stops one while it runs; Download status summary saves the result when one has finished. They change no file and no record. See File-status.md.
Read the rows without a browser
GET /api/admin/problems/integrity(REST API).
How the numbers are calculated
From server/lib/uptimeWatch.js:
- A heartbeat is written every minute (
HEARTBEAT_MS= 60,000 ms) withcleanShutdown: false;SIGTERMorSIGINTwritescleanShutdown: true. - At the next start, the time down is now minus the last heartbeat. The
threshold is three heartbeats,
DOWNTIME_THRESHOLD_MS= 180,000 ms (3 minutes): a gap longer than two heartbeats is a real gap, not a slow write.- no previous heartbeat: first run, not recorded;
- a clean-shutdown mark: clean stop, not recorded;
- no mark and down for less than 3 minutes: a quick restart,
low; - no mark and down for 3 minutes or more: a crash,
high.
- The minutes in the Detail are the time down divided by 60,000 and rounded.
- Attempts is the row's count: rows that repeat are folded into one
summary row whose count grows (
server/lib/eventLogFold.js). - Rows older than
EVENTLOG_RETENTION_DAYS(default 90;0keeps them) are deleted daily (models/eventLog.js).
The daily file scan (models/lib/fileIntegrity.js) runs once every 24 hours, does not start or continue while CPU is at 60 % or more, pauses 50 ms between files plus 20 ms per megabyte of the file, and stops after 15 minutes to continue the next day.
How it works in WeKan
The rows are the integrity stream of the eventlog collection:
| Name | Severity | Recorded when | Written by |
|---|---|---|---|
DowntimeBleed (category availability) |
high |
the previous run left no clean-shutdown mark and the server was down for more than three minutes: a crash | server/lib/uptimeWatch.js |
DowntimeBleed (category availability) |
low |
no clean-shutdown mark, but back within three minutes: a quick restart | server/lib/uptimeWatch.js |
CrashBleed (category crash) |
critical |
an uncaught exception or an unhandled promise rejection, with its message | server/lib/uptimeWatch.js |
ContinuousBackup (category backup) |
high |
the continuous backup stream failed | server/continuousBackup.js |
The heartbeat is the heartbeat document of the IntegrityKeys collection
(models/fileIntegrity.js), and
classifyPreviousRun in
server/lib/uptimeWatch.js is the whole
decision. A clean stop and a first run are not recorded. A database that is
only momentarily unreachable is not a crash (isTransientDatabaseError in
server/00processErrors.js): it is recorded on
Database problems instead.
The daily scan of stored files (same name, size, modification time, md5,
sha256 and sha512, signed with ed25519;
server/lib/fileIntegrityScan.js)
and the hourly change history audit
(server/lib/historyIntegrityScan.js)
report what they find to the Security Report, as
StorageBleed and HistoryIntegrity, not to this stream. They can be
turned off with WEKAN_INTEGRITY_SCAN=false and
WEKAN_HISTORY_INTEGRITY_SCAN=false; WEKAN_INTEGRITY_PRIVATE_KEY supplies the
signing key instead of one generated and kept in the database.
The table is the same read-only event table as the other streams
(Security Report), rendered by eventStreamReport in
client/components/settings/adminProblems.jade.
Tests: tests/fileIntegrity.test.cjs
(drives classifyPreviousRun),
tests/restartIsNotACrash.test.cjs,
tests/databaseDnsRestart.test.cjs
and tests/integrityBaselineForgottenOnDelete.test.cjs.
Commits
- The History integrity audit streams each board
- The daily file integrity audit runs once per installation
- Lint fix: the heartbeat promise is handled
- A MongoDB pod restarting is a lost connection, not a critical crash
- A clean file-integrity scan is not a security event
- The file integrity scan waits for a quiet CPU
- Continuous backup, whose failures are recorded in this stream
- The read-only file status checks on this pane
- A restart is not a crash
- Filesystem integrity: the file scan and the clean-stop check