For the complete documentation index, see llms.txt. This page is also available as Markdown.

Operations & Monitoring

Monitor your BoxLang runtime with health checks, performance snapshots, JVM diagnostics, and scheduler oversight.

This guide covers the operational workflows for monitoring your BoxLang runtime using the bx-mcp tools.


πŸ₯ Health Checks

System-Wide Health

The system_get_health tool provides a single round-trip health assessment of all subsystems:

curl -s http://localhost:8080/~bxmcp/boxlang.bxm \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-token" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"system_get_health","arguments":{}},"id":"1"}'

This returns a consolidated report with:

  • Overall status β€” healthy, warning, or critical

  • Score β€” 0-100 numeric score (weakest-link model)

  • Per-subsystem health β€” datasources, caches, watchers, schedulers, executors, web server

  • All issues β€” Merged across subsystems with severity and suggested actions

Subsystem Health Checks

For drill-down analysis, each subsystem has its own health tool:

Domain
Health Tool
What It Checks

Caches

cache_get_health

Hit rates, eviction thrashing, enabled status

Datasources

datasource_get_health

Pool utilization, saturation, thread waiters

Executors

executor_get_health

Saturation, queue depth, shutdown status

Schedulers

scheduler_get_health

Task failures, paused tasks, scheduler state

Watchers

watcher_get_health

Error counts, stopped watchers

Web Server

undertow_get_health

Worker saturation, queue depth, error rates


πŸ“Š Performance Snapshot

The performance_get_snapshot tool captures a holistic view of runtime performance in a single call:

The snapshot includes:

  • Memory β€” Heap and non-heap usage, pool breakdown

  • Garbage Collection β€” Collection counts and cumulative time

  • CPU β€” Available processors, system load, process CPU time

  • Threads β€” Thread counts by state

  • Top Executors β€” Most utilized async executor pools

  • Slow Queries β€” Recent slow SQL samples

  • Slow Requests β€” Recent slow inbound requests

  • Slow HTTP β€” Recent slow outbound HTTP/SOAP calls

  • Buffer Pools β€” Direct and mapped buffer usage

  • Web Server β€” Undertow worker pool and listener metrics (when available)

  • Health Report β€” Built-in structured health assessment with recommendations


πŸ’» JVM Monitoring

Memory Analysis

Thread Analysis

Garbage Collection

Resource Usage


⏰ Scheduler Monitoring

View All Schedulers and Tasks

Check Scheduler Health

Get Task Execution Statistics


πŸ“ˆ Executor Monitoring

View All Async Executors

Check Executor Health


🌐 Web Server Monitoring

Undertow Server Stats

Returns worker pool metrics (core, max, busy, queue depth), IO pool, listener connection/request/error counts, and WebSocket connections.


�️ Route Metrics

The routeMetrics setting enables per-route request metrics β€” count, error rate, and latency histograms (p50/p95/p99) β€” captured by the RouteMetricsCollector interceptor. Routes are identified as METHOD /normalized-path.

Enable Route Metrics

Setting
Default
Description

enabled

true

Enable per-route inbound request metrics

maxRoutes

200

Maximum unique routes tracked; least-recently-seen evicted

normalizePathParams

true

Replace digit-only and UUID segments with {id} (e.g., /users/123 β†’ /users/{id})

Query Route Metrics

Route normalization prevents metric table explosion on REST APIs β€” /users/123/orders/abc-123 becomes /users/{id}/orders/{id}.


οΏ½πŸ“‹ Daily Health Check Script

Here's a BoxLang script that performs a comprehensive daily health check:


πŸ“š Next Steps

Last updated

Was this helpful?