SetNet.HealthChecks
1.1.0
dotnet add package SetNet.HealthChecks --version 1.1.0
NuGet\Install-Package SetNet.HealthChecks -Version 1.1.0
<PackageReference Include="SetNet.HealthChecks" Version="1.1.0" />
<PackageVersion Include="SetNet.HealthChecks" Version="1.1.0" />
<PackageReference Include="SetNet.HealthChecks" />
paket add SetNet.HealthChecks --version 1.1.0
#r "nuget: SetNet.HealthChecks, 1.1.0"
#:package SetNet.HealthChecks@1.1.0
#addin nuget:?package=SetNet.HealthChecks&version=1.1.0
#tool nuget:?package=SetNet.HealthChecks&version=1.1.0
<p align="center"> <img src="https://raw.githubusercontent.com/Povstalez/SetNet/master/assets/icon.png" alt="SetNet" width="96"> </p>
SetNet.HealthChecks
ASP.NET Core health check for a SetNet server.
Exposes a SetNet server's liveness and its active connection count through the standard IHealthCheck pipeline, so Kubernetes liveness/readiness probes, load balancers, and monitoring can watch the realtime server the same way they watch the rest of your app. Optionally reports Degraded once the connection count crosses a warning threshold, which a load balancer can use to shed new traffic before the node is saturated.
Designed to sit alongside SetNet.Hosting (which registers the server as a singleton you can resolve here).
Install
dotnet add package SetNet
dotnet add package SetNet.HealthChecks
Usage
using SetNet.HealthChecks;
builder.Services.AddHealthChecks()
.AddSetNet(server, name: "setnet", degradedAtConnections: 4500);
// later, map the endpoint:
app.MapHealthChecks("/healthz");
When the server is registered in DI (e.g. via SetNet.Hosting), resolve the same instance:
builder.Services.AddHealthChecks()
.Add(new HealthCheckRegistration(
"setnet",
sp => new SetNetHealthCheck(sp.GetRequiredService<BaseServer>(), degradedAtConnections: 4500),
failureStatus: default,
tags: default));
The check always attaches an activeConnections datum, so /healthz responses (with the detailed writer) carry the live count:
{
"status": "Healthy",
"entries": {
"setnet": {
"status": "Healthy",
"description": "SetNet server healthy (128 active connections).",
"data": { "activeConnections": 128 }
}
}
}
API
| Member | Purpose |
|---|---|
IHealthChecksBuilder.AddSetNet(server, name = "setnet", degradedAtConnections = 0) |
Registers the check |
SetNetHealthCheck(server, degradedAtConnections = 0) |
The IHealthCheck itself, if you register it manually |
Result:
| Condition | Status | Data |
|---|---|---|
| Always (unless degraded) | Healthy |
activeConnections = current count |
degradedAtConnections > 0 and ActiveConnections >= degradedAtConnections |
Degraded |
activeConnections = current count |
Notes
- Threshold is opt-in.
degradedAtConnections = 0(the default) means the check never reports Degraded — it only ever returns Healthy with the connection count. - Liveness, not deep health. The check reports Healthy as long as the server object is alive and reachable; it reflects
BaseServer.ActiveConnections, not per-transport internals. Combine withSetNet.InspectororNetworkMetricsfor richer diagnostics. - The count comes from
BaseServer.ActiveConnections, so it tracks whatever transports (TCP / UDP / Both) the server is running.
Documentation & source
- 🐙 https://github.com/Povstalez/SetNet — full module catalog in docs/MODULES.md
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.11)
- SetNet (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 136 | 7/2/2026 |