LocalMetrics is a lightweight, cross-platform monitoring tool that captures real-time system metrics (CPU, memory, disk) from the machine where it runs and displays them in a Blazor-based dashboard.
- Real-time local system metrics
- AES-encrypted API responses
- Prometheus-compatible
/metrics
export - Runs on Windows, macOS, and Linux
- UI served via Docker or
dotnet run
-
Open the extracted folder.
-
Run the backend:
./LocalMetrics.Api.exe # Windows ./LocalMetrics.Api # macOS
-
From the root folder, run the UI:
docker compose up
Or if running locally:
dotnet run --project src/LocalMetrics.UI
Then access: http://localhost
GET /metrics
— Prometheus-compatible metrics in plaintextGET /api/SystemMetrics
— Returns encrypted system metricsPOST /api/SystemMetrics/decrypt
— Decrypts and returns readable system metrics
Example:
curl http://localhost:5050/metrics
⚠ Port 5050 is used by default.
# The API selects a system metrics collector based on the OS (Windows, Linux or macOS).
# Metrics are cached in memory (default: 5 seconds) to reduce system load.
# API responses are encrypted using AES with a key defined in appsettings.json.
# Optionally, you can override it using the ENCRYPTION_KEY environment variable:
# $env:ENCRYPTION_KEY = "your-aes-key" # PowerShell (Windows)
# export ENCRYPTION_KEY=your-aes-key # macOS / Linux
# The UI fetches encrypted data every 5 seconds and sends it to the API for decryption.
# When using Docker, nginx proxies:
# - "/" → Blazor UI
# - "/api/*" → API running on the host via host.docker.internal
# The UI reads the API base URL from appsettings.json (local or Docker-specific).
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.