8000 GitHub - louresb/LocalMetrics: PoC dashboard built with Blazor and ASP.NET for real-time local system metrics with AES-encrypted API.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PoC dashboard built with Blazor and ASP.NET for real-time local system metrics with AES-encrypted API.

License

Notifications You must be signed in to change notification settings

louresb/LocalMetrics

Repository files navigation

LocalMetrics

.NET Build Status License

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.

video-output-173CA63B-D9B0-4E59-BAFA-C4D25DF924A8-3-ezgif com-video-to-gif-converter

  • 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

Demo GIF of LocalMetrics


🚀 Quick Start

To get started, first download the latest release and extract the ZIP file.

Download Screen

Windows / macOS

  1. Open the extracted folder.

  2. Run the backend:

    ./LocalMetrics.Api.exe      # Windows
    ./LocalMetrics.Api          # macOS
  3. From the root folder, run the UI:

    docker compose up

    Or if running locally:

    dotnet run --project src/LocalMetrics.UI

Then access: http://localhost


API Endpoints

  • GET /metrics — Prometheus-compatible metrics in plaintext
  • GET /api/SystemMetrics — Returns encrypted system metrics
  • POST /api/SystemMetrics/decrypt — Decrypts and returns readable system metrics

Example:

curl http://localhost:5050/metrics

⚠ Port 5050 is used by default.


⚙️ Configuration

# 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).

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.


License

MIT License © Bruno Loures

About

PoC dashboard built with Blazor and ASP.NET for real-time local system metrics with AES-encrypted API.

Topics

Resources

License

Stars

Watchers

Forks

0