Operation, logs and diagnostics
In day-to-day operation three questions matter: Is the service running? What is it saying? And what does it do when something is missing?
Is the service running?
Section titled “Is the service running?”GET /health -> {"ok":true}Read that answer exactly as it is meant: it proves the process is answering — no more. It checks neither the database nor the connections to the plant. For a container supervisor deciding on a restart it is enough; as a statement that all is well it is not.
Whether the plant is healthy you see elsewhere: under Settings › Connections each connection carries its own state.
What is it saying?
Section titled “What is it saying?”The service writes structured lines in JSON to stdout. In a container that means your usual container log collection picks them up. TrakState writes no log files of its own.
Every line carries where it came from: tenant, user, plugin, origin (interface or server), correlation id and — for scripts — the script path.
LOG_LEVEL controls how much is written. With nothing given, info applies. For fault
finding, debug is the right value; it is talkative, so not for permanent use.
The diagnostics panel
Section titled “The diagnostics panel”A diagnostics panel can sit at the bottom edge of the interface. It is hidden until you
switch it on for fault finding, in the browser you are searching in: add ?diagnostics=on to the
address, for example /settings/scripts?diagnostics=on (if the address already has a ?, use
&diagnostics=on). The browser remembers it; ?diagnostics=off hides it again. With it, the ways
into it appear as well: Live in diagnostics in the dock of the scripts page and Show in
diagnostics in a plugin’s menu.
Switched on, it starts collapsed and costs nothing in that state: only on opening it with Show diagnostics is a stream established at all.
Open, it shows the log lines live, filterable by level, plugin and origin. You see your own lines; depending on permission the lines of all users can be shown as well. The server decides that, not the interface.
Two limits worth knowing:
| Limit | Default | Meaning |
|---|---|---|
LOG_HISTORY_LINES_PER_TENANT |
1000 lines | The history lives in memory and is gone after a restart. |
LOG_INGEST_LINES_PER_MINUTE |
100 lines | How much a browser may write into the log per minute. |
The diagnostics panel is therefore a tool for now, not an archive. Anything you want to keep has to come from the container log.
The audit trail
Section titled “The audit trail”Under Settings › Audit you find who changed what and when. That is a different thing from the log: the log is technical and volatile, the audit trail is business-level and lives in the database. Details are in the Audit trail chapter.
What the service refuses, and why that is good
Section titled “What the service refuses, and why that is good”TrakState would rather not start than run silently wrong. If an instance does not come up, the cause is in the first error line. The most common ones:
| The message is about | Cause |
|---|---|
JWT_SECRET |
Shorter than 32 characters in production. |
| The runtime role | It could bypass row level security. That would defeat tenant isolation. |
| A missing password in the connection string | On premises and in hosted operation the database connection must carry one. |
| The operational connection | It is not isolated from the application database. |
Production indicators under profile local-dev |
The development profile was started in a real environment. |
What may be missing without preventing the start
Section titled “What may be missing without preventing the start”The other way round: if something optional is missing, the instance runs, and only the operation that depends on it fails — with a message that names it.
| Missing | Consequence |
|---|---|
| Trust anchor | Packages with a server part cannot be installed. Everything else runs. |
| Install connection | Packages with tables of their own cannot be installed, updated or removed. |
| Package store | No package can be installed at all. |
| Key file for credentials | Affected connections stay down, named in the log. |
| Broker seed value | The instance starts without a connector; you create connections in the interface. |
What to look at regularly
Section titled “What to look at regularly”- Connections — is each one in the expected state?
- The log at error level — especially after a restart.
- Free disk space for the database and the file store.
- That the backup is actually running — TrakState does not watch that for you.