-
Notifications
You must be signed in to change notification settings - Fork 11
Quick start
HSM Wiki Update edited this page Mar 22, 2026
·
2 revisions
This page shows the minimal code to get HSMDataCollector running in a .NET application.
For full API reference see HSM DataCollector.
dotnet add package HSMDataCollectorusing HSMDataCollector.Core;
var collector = new DataCollector(new CollectorOptions
{
ServerAddress = "https://your-hsm-server",
AccessKey = "YOUR_ACCESS_KEY" // from Products → Access Keys in the web UI
});
// Add built-in system sensors (optional)
collector.Windows.AddSystemMonitoringSensors()
.AddProcessMonitoringSensors()
.AddCollectorMonitoringSensors();
await collector.Start();
// Send a custom sensor value
var cpuSensor = collector.CreateDoubleSensor("MyApp/cpu_usage");
cpuSensor.AddValue(42.5);
// On shutdown:
await collector.Stop();using HSMDataCollector.Logging;
var collector = new DataCollector(new CollectorOptions
{
ServerAddress = "https://your-hsm-server",
AccessKey = "YOUR_ACCESS_KEY",
Module = "MyService"
})
.AddNLog(new LoggerOptions { WriteDebug = true });
collector.Windows.AddProcessMonitoringSensors()
.AddSystemMonitoringSensors()
.AddCollectorMonitoringSensors();
await collector.Start();After Start(), open the web UI — your sensors will appear under the product associated with the access key.
Getting Started
🔔 Alerts
📲 Telegram
HSM DataCollector (NuGet)
- Overview & API
- Quick Start
- Logging
- Statuses
- Sensor Settings
- Default sensors
HSM DataCollector (C++)
HSM Web UI
Grafana