Project
bx-monitor
Monitoring for any BoxLang server that only ever talks outward. It opens no port and adds no route: it POSTs registration, heartbeats, health checks, request stats and redacted errors to the one collector URL you configure, so a server behind NAT or a tunnel needs nothing opened.
v0.1.0 ·Outbound only
No listener, no route, no inbound connection. Every call is a POST to your collector, and every payload is documented. A stub collector in the repository prints exactly what is sent.
Heartbeats and checks
JVM memory, threads and CPU, datasource and disk checks, checks of your own with monitorRegisterCheck(), and request counts with p50 and p95 per route. A goodbye on shutdown tells "stopped" from "lost".
Errors, redacted
Unhandled errors are captured, fingerprinted and redacted before they leave: passwords, tokens, query strings and URL credentials become [redacted]. Bodies, headers, cookies and session data are never sent.
Never in the way
One background thread does the network. Request threads only write to bounded memory, and nothing the module does can throw into your app. A dead collector adds nothing a request waits on.
bashinstall-bx-module bx-monitor
json"modules": {
"bxMonitor": {
"settings": {
"collectorUrl": "${env.BX_MONITOR_URL}",
"apiKey": "${env.BX_MONITOR_KEY}",
"serverName": "feedhouse-prod",
"datasources": [ "main" ],
"diskPaths": [ "/" ]
}
}
}
Requires BoxLang 1.19.0 or later, and nothing else. Works on MiniServer, CommandBox, servlet containers, Lambda and the CLI, and records BoxExpress requests by their route pattern.