Following up on the OpenAPI GUI Addon, this post introduces a companion addon for the operational side: a self-contained MicroProfile Dashboard that gives you live health checks, JVM metrics with sparkline history, and a searchable config viewer — all from a single HTML page, with no external dependencies.
Why Another Addon?
The OpenAPI GUI Addon solved the API documentation problem. But once your APIs are running, you need to know how they're running. WildFly exposes health and metrics on a separate management port (9990), which isn't always accessible from your browser. And MicroProfile Config has no built-in REST endpoint at all.
The MicroProfile Dashboard Addon bridges this gap: drop it into your WAR and get a full operational dashboard at /dashboard — health, metrics, config, all in one place.
What You Get
- Health Checks — server and application checks merged into one view, grouped by dynamic categories
- JVM Metrics — CPU, memory (with heap progress bar), threads, GC stats
- Sparkline History — CSS-based bar charts for CPU load, heap, and threads over the last 30 minutes, polled every 10 seconds
- MicroProfile Config — searchable table of all active properties with sensitive value masking
- Dark/Light Mode — toggle with localStorage persistence
- Project-Stage Gating — same pattern as the OpenAPI addon: disabled in production by default
Quick Start
Add the dependency:
<dependency>
<groupId>org.os890.mp-ext</groupId>
<artifactId>mp-dashboard-addon</artifactId>
<version>1.0.0</version>
</dependency>
That's it. The dashboard auto-discovers via JAX-RS and is available at /<context-root>/dashboard.
Custom Health Check Categories
The dashboard dynamically discovers categories via the @DashboardCategory annotation. WildFly's built-in checks (server state, deployments, boot errors) automatically get the "Server" category. Your application checks get whatever category you assign:
import org.os890.mp.dashboard.DashboardCategory;
@Readiness
@ApplicationScoped
@DashboardCategory("Database")
public class DatabaseHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
return HealthCheckResponse.named("PostgreSQL Connection")
.up()
.withData("pool-size", getPoolSize())
.build();
}
//...
}
The dashboard shows filter tabs — Server (default view), then your categories alphabetically. Each category gets a status badge (ALL UP / ISSUES) so you can spot problems at a glance.
Metrics Without MicroProfile Metrics
WildFly 39 doesn't ship MicroProfile Metrics — it uses its own metrics subsystem with a Prometheus-format endpoint on the management port. The addon fetches and parses this internally, exposing it as a clean JSON API at /dashboard/api/metrics. No management port access needed from the browser.
The JVM metrics section shows:
- CPU & Runtime — processors, CPU load %, system load, uptime
- Memory — heap used/max with visual progress bar, non-heap usage
- Threads & Classes — active, daemon, peak threads; loaded/unloaded classes
- Garbage Collection — collections count and cumulative time per collector
Sparkline History
Below the metric cards, three sparkline charts track CPU load, heap memory, and thread count over the last 30 minutes. The charts are pure CSS bar elements — no JavaScript charting library needed. They poll every 10 seconds and color-code bars based on thresholds (green → yellow → red).
Config Viewer
MicroProfile Config has no built-in REST endpoint. The addon adds one at /dashboard/api/config that lists all active properties sorted alphabetically. The dashboard renders them in a searchable table with a "Showing X of Y" counter. Values containing password, secret, token, or credential in the key name are automatically masked.
Project-Stage Gating
Same approach as the OpenAPI GUI Addon: a @PreMatching JAX-RS filter controls access based on config:
dashboard.enabled=true/false— explicit override, takes precedenceproject.stage=production— disables the dashboard whendashboard.enabledis not set
Or use the Maven profile approach from the OpenAPI addon: place the dependency in a -Pdevelopment profile so the production WAR has zero dashboard code.
Technical Details
The addon is a single JAR with no external dependencies — just Jakarta EE 11 and MicroProfile APIs (all provided by WildFly). It contains:
- DashboardService — serves the HTML page at
/dashboard - HealthResource — merges WildFly management health data with CDI-injected app checks and
@DashboardCategorymetadata - MetricsResource — parses WildFly's Prometheus metrics into JSON
- ConfigResource — lists all MicroProfile Config entries with sensitive value masking
- DashboardAccessFilter —
@PreMatchingfilter for project-stage gating - DashboardCategory — annotation for health check grouping
- index.html — self-contained dashboard with dark/light mode, sparklines, category tabs
Example
The example directory includes a demo WAR with three categorized health checks (Database, Messaging, Storage), custom config properties, and a Dockerfile for WildFly 39 deployment via Podman.
Combining Both Addons
The OpenAPI GUI Addon and the Dashboard Addon work well together. Add both dependencies and you get:
/openapi-ui/— API documentation with multi-app dropdown/dashboard— operational health, metrics, and config
Both share the same project-stage gating pattern and can be controlled independently via their respective config properties.
AI-Assisted Development
Like the OpenAPI GUI Addon and the Dynamic CDI Test Bean Addon, this project was developed with an AI co-pilot in a single session. The dashboard evolved from a basic health-and-config page through several iterations — adding categorized health checks, JVM metrics from the Prometheus endpoint, sparkline history charts, and the project-stage filter. The security hooks ensured safe builds throughout.
Links
- Source code: github.com/os890/mp-dashboard
- OpenAPI GUI Addon: github.com/os890/openapi-gui-addon
- License: Apache License 2.0
Previous posts in this series: OpenAPI GUI Addon | Upgrading 30+ Projects to Java 25 | Hardening Claude Code | Dynamic CDI Test Bean Addon