Configure Server Monitoring

Set up real-time server metrics in your Blazor dashboard with BptServerMonitor.

Home / Documentation / Server Monitoring

Overview

The BptServerMonitor component displays live CPU, GPU, memory, disk, and network metrics from one or more servers. It works with a lightweight monitoring service that runs on each target machine and pushes metrics to your Blazor app via SignalR.

Architecture
Monitor Service (.exe on each server) CPU · GPU · RAM · Disk · Net Blazor Server BptServerMonitor component Real-time charts & gauges SignalR — push metrics

Step 1: Install the Monitoring Service

Install the BPT Server Monitor service on each server you want to monitor. The service collects system metrics using platform-native APIs.

Need the installer? Grab it from the Download page.

1

Install the Service

Download and run the MSI installer. The service registers as a Windows service and starts automatically on boot.

2

Configure the Hub Connection

Open the configuration file and set your Blazor host URL:

C:\Program Files\BptServerMonitor\appsettings.json
{ "ServerMonitor": { "HubUrl": "https://your-blazor-host/bpt-servermonitorhub", "ServerId": "my-windows-server", "IntervalMs": 2000 } }
3

Verify It's Running

The service starts automatically after installation. Check Windows Services (services.msc) for BPT Server Monitor to confirm it's running.

Stop the service from an elevated PowerShell or Command Prompt:

net stop BptServerMonitor

Step 2: Configure the Blazor Server Hub

In your Blazor server's Program.cs, map the SignalR hub that receives metrics:

var builder = WebApplication.CreateBuilder(args); // Add BPT services (includes the monitor hub) builder.Services.AddBlazorPowerTools(); var app = builder.Build(); // Map the server monitor hub endpoint app.MapBlazorPowerToolsHubs(); app.Run();
SignalR Configuration The monitor service pushes metric snapshots every few seconds. For multiple servers, make sure your SignalR configuration can handle the throughput. The default settings work well for up to 10 servers at 2-second intervals.

Step 3: Add the Monitor Component

Place BptServerMonitor on your admin dashboard page:

<BptServerMonitor ShowCPUMetrics="true" ShowGPUMetrics="true" ShowMemoryMetrics="true" ShowDiskMetrics="true" ShowNetworkMetrics="true" Servers="@servers" /> @code { private List<BptServerMonitorConfig> servers = new() { new() { FriendlyName = "Web Host", Domain = "localhost" }, new() { FriendlyName = "DB Server", Domain = "192.168.1.10" }, new() { FriendlyName = "GPU Node", Domain = "gpu-node.internal" } }; }

Component Parameters

Parameter Type Description
ServersList<BptServerMonitorConfig>List of servers to monitor
ShowCPUMetricsboolShow CPU usage, load, and temperature
ShowGPUMetricsboolShow GPU utilization and VRAM
ShowMemoryMetricsboolShow RAM usage and swap
ShowDiskMetricsboolShow disk space and I/O
ShowNetworkMetricsboolShow network throughput
RefreshIntervalintUI refresh rate in milliseconds (default: 2000)

Service Configuration Reference

Setting Description Default
HubUrlThe SignalR hub URL on your Blazor server(required)
ServerIdUnique identifier for this serverMachine hostname
IntervalMsHow often to push metrics (milliseconds)2000
EnableGpuCollect GPU metrics (requires NVML on Linux)true
EnableDiskCollect disk I/O metricstrue
EnableNetworkCollect network throughput metricstrue

Firewall & Networking

The monitor service makes outbound HTTPS connections to your Blazor server. Ensure:

  • The monitor service can reach the Blazor server's hostname on the configured port (typically 443)
  • No firewall rule blocks outbound HTTPS from the monitored server
  • If using a reverse proxy (nginx, IIS), ensure WebSocket upgrade headers are forwarded
  • For internal networks, consider using an internal DNS name or IP for the HubUrl
Tip Test connectivity from the monitored server before deploying the service:
curl -I https://your-blazor-host/bpt-servermonitorhub

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.