Files
wekan/docs/Features/Admin-Panel/Problems
Lauri Ojansivu 6dc2651b48 Admin Panel / Problems / API: who called which endpoint, and how often.
Every other pane under Problems answers what went WRONG. This one answers what
is being DONE: `POST /api/boards` called 34 times by alice last month, 812 times
yesterday by nobody with an account. Without it the only record of REST API use
is whatever the reverse proxy happens to keep, and most instances keep none.

The table is username, endpoint, calls, the window they fall in, and the
addresses - sorted by calls, because a usage report's question is "what is used
most" where a problem report's is "what happened last".

THE NAME IS THE ROUTE PATTERN, NOT THE PATH. `/api/boards/:boardId/lists` is one
endpoint; `/api/boards/abc123/lists` and ten thousand of its siblings are that
one endpoint being used. Naming rows after paths would put a row per board in
the collection - the one-row-per-event cost this whole page exists to remove -
and a request that matched NO route is counted under a single "(no route)" name
rather than under the path it invented, because a 404 sweep is an attacker
walking a wordlist and a row per guess would let them fill the database.

ONE ROW PER ACCOUNT AND ENDPOINT, which makes the account part of a row's
identity - the one deliberate exception to the rule every other stream follows.
For those the question is "what is happening" and the caller would multiply the
rows; here "who called what" IS the report, and the cardinality is bounded by
real accounts times real endpoints. The account is stored by ID, so a rename
does not split its history in two.

NOTHING PER REQUEST. Ordinary API traffic is not rare the way a guard firing is
rare, so calls are counted in memory and folded on a timer - a thousand requests
become one write. A few seconds of counts are lost if the process stops between
flushes, which is acceptable here and nowhere else on this page: this report
decides nothing and nothing is protected by it. The tracked pairs are capped and
the rest counted, not dropped.

Counting hooks the middleware chain, not the routes, so a route cannot be added
without being counted - and it counts on the response's `finish` event, which is
where Express has filled req.route.path and authentication has run.

The pane is the SHARED event-stream report with a different column list, not a
second table page. The API stream is deliberately NOT in EVENT_STREAMS: it is
usage, not a problem, and an instance serving its API would otherwise report
thousands of new problems.

AND THE IPv4/IPv6 SPLIT IS FINISHED WHILE HERE. The summary rows have had ipv4
and ipv6 fields since the summaries were written, and not one of the four
loggers ever filled them - so the columns the design asked for could not have
worked. The fold splits the address now, once, for every stream, and the two
columns are one shared pair used by both reports rather than a copy each. They
fall back to classifying the stored `ip`, so rows written before today display
correctly instead of showing two empty columns for all of history.

Seven i18n keys in 239 language files, in en.i18n.json's order, English as the
placeholder where nothing is translated yet.

Thanks to xet7 !
2026-08-16 17:52:18 +03:00
..

Admin Panel → Problems

Status: Implemented · Owner: xet7

Admin Panel → Problems is where a WeKan admin sees what is wrong or in progress: performance (CPU / RAM / disk), data-safety and recovery, migrations and repairs, broken data, and the causes that can keep users off the login page. Open it at Admin Panel → Problems (you must be an admin — currentUser.isAdmin).

The same information is available without the Admin Panel, from the server command line, via snap run wekan.problems — see Snap.md — so an admin who only has server (snap) access can read it without being given Admin Panel access.

The Status overview (Problems → Summary)

The Summary tab shows a Status overview at the top:

  • In progress — every migration or repair running right now (database text migration, board data-repair, recovery/maintenance, cron migration, attachment migration), gathered from the persisted status collections so it is accurate even across a restart.
  • Problems — detected issues: broken cards, and any failing login-page check.
  • Login page checks — the known causes that make the login page show "Must be logged in" or sit on the logo + "Loading, please wait." spinner (see Login-Problems.md).

Below that is the acknowledge list of the Security / Speed / Tests problem streams.

The menu, in two named groups

Settings — the two panes that came from the removed Features tab, which are settings rather than reports but are what an admin reaches for when something is unsafe or noisy:

  • Security — how rich text is rendered (links as plain text, all code as plain text) and the import / export privacy switches (disable all import / export, avatars, anonymize users). All enforced server-side.
  • Notifications — disable all activities, all notifications, or watching, for deployments that must limit activity tracking (#5820).

Reports — Security Report, Impersonation Report, Performance, Speed, Tests, CPU usage, Broken Cards, Files Report, Rules Report, Boards Report, Cards Report and Recovery. Every one is the same shared table page: a search box, the total, page X / N, prev/next, and one page of rows fetched from the server at a time. Performance sits with the Speed / Tests / CPU usage streams it configures: card loading is automatic per board size, with CARDS_LOADING=all|lazy|auto and CARDS_LOADING_LAZY_THRESHOLD for operators.

Detailed pages in this directory

Page What it covers
Repairs.md Automatic board data-repairs (#6484 lists that vanish, orphaned/missing-swimlane cards): what they fix, when they run (board open, server startup, during migration), and the progress dashboard.
Migrations.md The MongoDB ↔ FerretDB v1 (SQLite) text-data migration, the repair phase it runs, and the shared blue, Product-name-branded progress dashboard.
Login-Problems.md Everything that can make the login page show "Must be logged in" or a stuck "Loading, please wait." spinner, and how to fix each.
Snap.md The snap run wekan.problems commands that print this whole overview (and problem-specific detail like CPU) as text.
CPU-usage.md CPU-usage monitor / governor and the CPU report. A pegged ferretdb process is the usual cause of slow pages.
RAM-usage.md RAM-usage report.
Disk-usage.md Disk-usage report.
Recovery.md SQLite corruption/bloat safety and the automatic Recovery history.

Why this exists

After an upgrade, several sites reported the login page showing "Must be logged in", or — after login — the logo with "Loading, please wait." and a spinner that never finished; pages took five or more minutes, the All Boards counts stayed at 0, and some labels showed raw i18n keys (e.g. allboards.starred). In top the ferretdb process was pegged near 200% CPU for a long time. That is the FerretDB v1 (SQLite) backend saturated under WeKan's poll load — often a migration/repair still running, or simply a heavy instance on SQLite.

Problems → Status and snap run wekan.problems make that visible: an admin can now see at a glance "a migration/repair is in progress; that is why logins are slow", or "nothing is running; the backend itself is saturated — consider MongoDB", both from the browser and from the server command line.

How this pane records what it sees

Design.md is the design behind the panes below: one summary row per problem rather than a row per event, the per-actor tally inside it, the IPv4 and IPv6 columns, and the API report, per-address login tally and blocking that are still being built. Read it if you are changing how Problems records things rather than what it shows.

The panes, in menu order

Every pane of this tab, in the order the menu shows them. The slug is what the address uses: /admin/problems/<slug>.

Menu path URL slug Page
Problems / Summary summary —
Problems / Security security —
Problems / Notifications notifications —
Problems / Security Report security-report —
Problems / Impersonation Report impersonation —
Problems / Performance performance —
Problems / Speed speed —
Problems / Tests tests —
Problems / CPU usage cpu CPU-usage.md
Problems / Broken Cards broken-cards —
Problems / Files Report files —
Problems / Rules Report rules —
Problems / Boards Report boards —
Problems / Cards Report cards —
Problems / Recovery recovery Recovery.md
Problems / Offices office —
Problems / API api API.md
Problems / Database problems database —
Problems / Filesystem integrity integrity —

16 of these 19 panes has no page of its own yet. A dash is a gap to fill, not a pane that does nothing - what the pane shows is described in this README until somebody writes it up.