Getting Started
Installation
Install the HubMon SDK via NuGet:
bash
dotnet add package HubMon.ClientQuick Start
Add HubMon to your ASP.NET Core application:
csharp
using ServiceMonitor.Client;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHubMon(options =>
{
options.DashboardUrl = "https://api.hubmon.com";
options.ApiKey = "sm_live_your_api_key_here";
options.ServiceName = "my-api";
options.Environment = "production";
options.EnableMetrics = true;
});
var app = builder.Build();
app.Run();That's it! Your service will automatically:
- Register with HubMon on startup
- Send heartbeats every 30 seconds
- Report metrics — CPU, memory, disk, and thread count
Getting Your API Key
- Sign up at HubMon
- Navigate to API Keys in your dashboard
- Click Create New Key
- Copy the key (starts with
sm_live_)
WARNING
The API key is shown only once — save it securely!
Enable Request Tracking
For web applications, you can also track requests per minute and active connections:
csharp
builder.Services.AddHubMon(options =>
{
// ...
options.EnableRequestTracking = true;
});
var app = builder.Build();
app.UseHubMonTracking(); // Add before other middleware
app.Run();Next Steps
- Configuration Reference — All available options
- Metrics — What metrics are collected
- Examples — Full working examples