Console

On this page

Console

The console is a standalone page for one server. It shows live requests, executor health, scheduled tasks, datasources, caches, logs, errors, query statistics, JVM numbers and threads. It lets you design the bar and change many settings without a restart. It is off by default.

The console overview

Turn it on

{
	"modules": {
		"bxLens": {
			"settings": {
				"console": {
					"enabled": true,
					"password": "bxsecret:AbCdEf123...==",
					"access": "local"
				}
			}
		}
	}
}

Restart the runtime. The console needs console.enabled and a password. If the password is empty or cannot be decrypted, Lens logs an error and an allowed caller sees the "Set a password first" page (HTTP 503) instead of a login. It has three tabs, Encrypted (recommended), Environment variable and Plain text, each with the boxlang.json snippet to paste. Until a password is set, every other route refuses with 503: sign in, API, live stream and registration.

Make the password

There are three ways to set it, from easiest to most careful:

  1. Plain: "password": "my-password". The quickest way to try it. A bad idea on a real server.
  2. Environment variable: "password": "${env.BXLENS_PASSWORD}". Set BXLENS_PASSWORD on the server. Great for containers. Make sure the variable is set, see the guide.
  3. bxsecret: an encrypted value. BoxLang decrypts any config value with that prefix at load time, using the runtime's secret seed (BoxLang 1.17 or newer).
boxlang generatesecret "a long random password"
# bxsecret:AbCdEf123...==

Paste the result into console.password. Use the same seed on every machine that shares the config. The seed, the settings that take a bxsecret: value and what to do when it does not decrypt are in Set passwords: plain, env or bxsecret. A plain text password also works but is a bad idea in a file you commit.

Open it

The console lives at:

/~bxlens/index.bxm

This is a public mapping named ~bxlens, the same pattern as /~bxai in bx-ai. /~bxlens/index.bxm always works. /~bxlens/ with a trailing slash is rewritten to it, but on MiniServer that also needs a pass predicate, see The console URL. Every other route is under it, for example /~bxlens/index.bxm/stream.

Sign in

The console login

There are no user names. The password you type decides the role:

RolePasswordCan do
AdminThe password set in the console, else console.passwordEverything the console offers.
ViewerThe viewer password set in the console, else console.viewerPassword (optional, BoxLang+)Look at every page. Cannot change anything, and cannot download thread dumps, log files, heap dumps or the diagnostic bundle, or read cache values.

The role shows in the header. See Roles for the full list.

An admin can set or reset both passwords in the console, see Settings, Security. A password set in the console wins over boxlang.json.

A wrong password says so and counts the attempt. After console.maxLoginAttempts wrong tries the address is locked out for console.lockoutMinutes.

A wrong password

Sessions live in memory. They end after console.sessionMinutes idle, 12 hours after login at the latest, or at a restart.

When someone reaches the console over plain HTTP from a non-loopback address, every page shows a warning banner. Set console.requireHttps to refuse such requests.

Pages

The menu has four groups. Every page has its own guide.

Inspect

What requests, errors, queries and outgoing calls did.

Modules

The Modules list and the pages of module integrations, such as ORM.

BxLens

The bar designer and the settings of BxLens itself, which hold the Lensy settings on their Assistant tab.

Also: Notifications and Email reports (Settings tabs), Servers (header), Lensy (chat drawer), Register (first sign in).

Multi server observability is BoxLang+, and Free shows one server only. With BoxLang+ a server selector in the header switches the pages that read saved data between this server, another server in the same store folder, and all of them.

Hide a page with tabs.hide, or turn its collector off. Settings is always there.

Most of the console is free. The items marked BoxLang+ need a license or trial, and on Free they show a "BoxLang+" note and the server answers 403. See Licensing.

Inspect

What requests, errors, queries and outgoing calls did.

PageWhat it is for
OverviewThe state of the whole fleet, the fleet as a table or cards with groups, kinds and versions, and the slowest requests, SQL, HTTP calls, MCP servers and agents across all servers. With one server it is the same page with one row.
RequestsEvery request in memory (25 on Free), with detail. See below.
In flightRequests running right now, with a live stack. BoxLang+.
Hot spotsWhere the time of a slow request, or of a URL, went. BoxLang+.
Bytecode profilerEvery expression of your code counted and timed, as a heatmap on the source. BoxLang+.
ErrorsIssues grouped by cause that you resolve, ignore and share, with stack, breadcrumbs and tags. In memory on Free.
ReportsTotals, percentiles, status codes, URLs and a minute by minute series.
QueriesStatistics for SQL statements: the 10 heaviest on Free, every statement with BoxLang+.
HTTPEvery outgoing HTTP call: by host and endpoint, status mix, p50 to p99, what needs attention, and the list of calls (BoxLang+).
Ask LensQuestions about the server, and prompts for a model. With BoxLang+ it is the full page of the Lensy.

Runtime

The live health of this server.

PageWhat it is for
ExecutorsLive health of every executor.
TasksSchedulers and scheduled tasks. Run now, pause, resume and reload need BoxLang+.
DatasourcesConnection pools with live numbers and a connection test.
ApplicationsEvery application the runtime has started, with sessions, tasks, watchers and class loaders. Restart and remove need BoxLang+.
ColdBoxWhat BxLens sees of a ColdBox application: overview, composition, modules with a timeline and a duplicate check, schedulers and tasks, CacheBox caches and executors. Shown once a ColdBox application has been seen.
WatchersEvery file watcher and its owner. Start, stop and restart need BoxLang+.
CachesCache statistics and a capped key list. Reading a value, evict, reap and clear need BoxLang+.
LogsEvery log file and a level filter. Search, more than 200 lines, the live tail and download need BoxLang+.
EnvironmentConfiguration, modules, JVM arguments, variables. The diagnostic bundle needs BoxLang+.
ConfigurationThe effective BoxLang configuration by area, with the source of each value.
SystemThe machine: CPU, memory, disks and volumes.
JVMHeap, garbage collection, Run GC, threads, classes and JIT, and flags. A heap dump and the thread list need BoxLang+.
Web serverThe web server under BoxLang (MiniServer, CommandBox or a servlet container): listeners, workers, requests and what needs a look.

Modules

The Modules list and the pages of module integrations, such as ORM.

PageWhat it is for
ModulesEvery loaded module, nested ones too, with version, state, path and what it provides.
ORMEvent totals, flushes, failures and Hibernate statistics from bx-orm. An opt in integration that needs bx-orm. The page needs BoxLang+, and the ORM SQL in Queries is free.
AIAgent runs, models, tokens, cost, how each agent is composed and how the MCP servers you host are doing. BoxLang+, three counters on Free.
MailMessages sent by bx-mail with a locked preview, servers, the spool and its bounces. BoxLang+, three counters and ten messages on Free.

BxLens

The bar designer and the settings of BxLens itself.

PageWhat it is for
Bar designerChoose and order the tabs of the bar. Saving a layout needs BoxLang+.
SettingsThe effective settings, editable by an admin. The Assistant tab holds the Lensy status, settings, MCP servers and connection test (admin only, BoxLang+ to change anything).
UpgradeWhat Free has, what BoxLang+ adds, and how to get it.
NotificationsSettings tab. Email and chat alerts for 21 alert rules on every server, with who gets what. BoxLang+.
Email reportsSettings tab. A daily, weekly and monthly report of the whole cluster sent to admins. BoxLang+.
ServersThe server selector in the header: this server, another server in the same store folder, or all of them. BoxLang+.
LensyThe chat drawer that looks at your server with the tools of BxLens. BoxLang+ only.
RegisterRegister a server once, for free, to use the console on Free or a trial.

Requests

Requests is a list and a page for each request. The list shows the newest first, 50 to a page (25, 50 or 100), and the server filters, sorts and pages it, so the browser only ever holds one page. Each page loads when you open it. BoxLang+ keeps up to 250 requests (history.maxRequests, default 250), Free keeps the last 25.

The Requests page

The list has these columns: time, method, URL (with the ColdBox event under it), status, time, DB time with the number of queries, server, tags and issues. Columns turns on Query count and, with BoxLang+, the CPU time. Click a header, or use the Sort menu, to sort by time, URL, status, time, DB time, queries, issues or server: the server sorts everything it kept, so "Slowest" is the slowest of all requests and not of the page you see. The chips filter by Errors, Slow (over 100 ms), With issues and ColdBox, and each shows how many requests it holds. The search matches the URL, the ColdBox event and the tags, and the Tag menu filters by one tag. The list is live while it shows the newest requests; sorting, paging or another server pauses it. On a phone each request is a card.

A sorted list with the ColdBox filter

With BoxLang+ the Server menu shows this server, one other server or All servers in one list with a Server column. The rows of another server come from the copy it saved (the newest 50, as old as the last save), so they are read only and their detail stays on that server. Free sees this server only and nothing about the others.

Requests of all servers, sorted by DB time

The page of a request opens when you pick a row. It has a bar that stays at the top with Newer and Older, Ask Lensy and Share, then the status, timings, server, ColdBox event and tags, the time, DB time, templates, HTTP calls, CPU and allocation, the issues, and the slow request sample if there is one. Below are sections that open on a click and load their own data then: Timeline, ColdBox (for ColdBox requests), Queries, Exceptions, HTTP, Messages, Timers, Request, Scopes, BIFs, Runtime and the panels of modules. Expand all opens every section. Click an issue to jump to its section.

The page of a request

The Timeline has the controls of the lens bar: a chip for each kind of span, a search box, zoom in and out, pan, Reset, the range on screen, a row for every span with its depth and its Rollback and interrupted flags, and a drawer for the span you click with the SQL or the HTTP call and Open in editor, Copy SQL and Copy file:line. Queries groups the same statement, marks an N+1 and the queries run by the ORM, and has an ORM only chip.

The sections of a request

The Share menu has Send to people and channels, Report, Copy JSON, Download JSON and Copy as cURL (redacted headers are left out). Report is a clean page of the request to print or save as a PDF with the browser. Ask Lensy (BoxLang+) explains the request in place from its numbers, findings and statements with their values hidden, and the answer panel has Open in Ask Lens to carry on in the chat. Each request has a deep link, /~bxlens/index.bxm#requests/{id}, which the bar's More menu uses. A request that was recycled shows "That request has been recycled".

Share a request

Send to people and channels (BoxLang+, admin) sends one request by mail and to chat channels. Pick people and channels from Settings, Notifications, or type any address. Choose what goes in: the summary and the issues are always there, and you can add the slowest queries, the exceptions and the slowest spans, and a note of up to 500 characters. Each address gets its own mail, so nobody sees who else got it, and a channel gets one message. The mail and the message link to the request in the console (console.publicUrl). Nothing from headers, cookies, scopes, parameters or bodies is ever included, statements have their values hidden and templates are shown without the folders of the server. It needs the SMTP settings of Notifications for mail, is refused when console.readOnly is on, is limited to a few an hour, and is written to the audit log as request.share with the request id and the counts only.

The share sheet

The report of a request

The routes

GET requests?page=&size=&sort=&dir=&filter=&tag=&q=&server= is one page of the list (sort is at, ms, dbMs, cpuMs, queries, status, issues, server or url, filter is all, errors, slow, issues or coldbox, server is this, all or an id and BoxLang+ only). GET requests/{id} is the header of one request and GET requests/{id}/{part} one part of it (timeline, queries, exceptions, http, messages, timers, request, scopes, bifs, runtime, coldbox or panel/{id}). POST requests/{id}/share shares it.

Tags and ColdBox

A request can carry tags: short words that say what kind of request it was. BxLens tags a ColdBox request coldbox by itself, and your code can add more with lensTag. The list has a Tags column and a Tag menu, a ColdBox chip, and the search box matches events as well as URLs. A ColdBox request shows its event under the URL, and one that ColdBox served from its event cache shows cache hit.

The URL of an application that routes by path, such as ColdBox, is shown with its path: /shop/index.bxm/users/42.

The detail of a ColdBox request has a ColdBox block: the event, route, layout and view, the counts, a warning when a view rendered more than once, and a table of the views with how often each rendered, the time and whether it is cached.

The Requests page with the ColdBox tag, the event and the cache result

The console never lists its own requests.

Live data

One Server-Sent Events stream per browser (GET /~bxlens/index.bxm/stream) pushes the data of the open page once a second: requests, executors, tasks, datasources, in-flight requests, queries, system numbers and new log lines. A newer stream from the same session replaces the older one, and a stream ends after five minutes and the browser reconnects by itself. The header shows live 3s or paused. If the stream is unavailable (no EventSource, or console.maxStreams is reached), the page polls every 3 seconds instead. Threads refresh every 5 seconds while open, because a thread dump briefly pauses the JVM.

Security model

The console is built for a hostile network, within reason.

  • Callers outside console.access, access.allowedHosts or access.requireHeader get a plain 404.
  • A Content-Security-Policy that allows only your own server as a source (it still needs unsafe-eval and unsafe-inline, see Security) and no request to any other site. Alpine.js and the Phosphor icons are vendored and fonts are system fonts, so it works air gapped.
  • HttpOnly, SameSite=Strict session cookie (Secure on HTTPS), a CSRF header on every state change, and a custom header on login.
  • Per-address lockout, and two roles: a viewer can look but not change or download.
  • Optional HTTPS requirement, and an audit log of logins and changes.

Read the full list in Security, and use Running Lens in production before you expose it.

What the console is not

It is for ONE server. It keeps the last history.maxRequests requests in memory (25 on Free, see Licensing). Errors, reports and query statistics are in memory too. With BoxLang+ or a trial, errors and reports are also saved to disk so they survive restarts. Apart from that, Lens writes only the saved bar layout, the saved settings changes, the audit log, the Secret Store and the registration key. With BoxLang+ it also reads the other servers of the store folder.

Help icons and the Glossary

Many numbers assume you know the word. A small i next to a label (p50, p95, p99, error rate, hit ratio, event cache, view rendered more than once, module resolution and others) opens a card with what it is and how to read it. It opens on hover, on keyboard focus or on click, and closes with Esc.

A help icon on the Reports page

The bar has the same icons in its ColdBox tab. The text comes from one file, so the bar, the console and the Glossary of these docs always say the same. Nothing is requested from another server: the file is read from your own.

Edit this page Download Markdown Last updated Nov 26, 2026, 8:34:30 AM Report an issue