HealthCheckr 2.0.0
dotnet add package HealthCheckr --version 2.0.0
NuGet\Install-Package HealthCheckr -Version 2.0.0
<PackageReference Include="HealthCheckr" Version="2.0.0" />
<PackageVersion Include="HealthCheckr" Version="2.0.0" />
<PackageReference Include="HealthCheckr" />
paket add HealthCheckr --version 2.0.0
#r "nuget: HealthCheckr, 2.0.0"
#:package HealthCheckr@2.0.0
#addin nuget:?package=HealthCheckr&version=2.0.0
#tool nuget:?package=HealthCheckr&version=2.0.0
HealthCheckr
A lightweight health check library for .NET and Azure Functions that runs asynchronous checks in parallel, preserves execution order and returns a clean JSON response with status, durations and optional error details.
The library is framework-agnostic and has no dependency on ASP.NET, making it suitable for console apps, background services, Azure Functions and any .NET runtime.
Features
- Async and concurrent execution with cancellation support
- Order-preserving results for consistent logging and dashboards
- Configurable HTTP return codes and optional diagnostics
- Attach arbitrary metadata at the global or per-check level (for example region, version, dependency info)
- Tag-based filtering with include and exclude semantics
- Works well in Azure Functions, serverless, worker services and web APIs
- Minimal dependencies and easy to integrate
- Optional �simple� sequential check returning only HealthStatus without JSON
Installation
Install via NuGet:
dotnet add package HealthCheckr
Or via the NuGet Package Manager:
PM> Install-Package HealthCheckr
Usage
using HealthCheckr;
HealthChecker healthChecker = new()
{
IncludeErrors = true,
Data = new Dictionary<string, object?>
{
["Environment"] = "Production",
["Id"] = 42
}
};
// Add checks
healthChecker.AddCheck("Check 1",
async () =>
{
return await Task.FromResult(new HealthCheckResult { Status = HealthStatus.Healthy });
}
);
healthChecker.AddCheck("Check 2",
async () =>
{
return await Task.FromResult(new HealthCheckResult
{
Status = HealthStatus.Degraded,
Data = new Dictionary<string, object?> { ["Metadata1"] = 123 }
});
},
tags: ["external"]
);
healthChecker.AddCheck("Check 3",
async () =>
{
return await Task.FromResult(new HealthCheckResult { Status = HealthStatus.Unhealthy });
},
tags: ["external", "critical"]
);
// Full JSON health report
var result = await healthChecker.CheckAsync(
includeTags: ["external"]
);
Console.WriteLine(result.ToJson());
// Simple sequential check returning only HealthStatus
var simpleStatus = await healthChecker.CheckSimpleAsync(
includeTags: ["external"],
excludeTags: null
);
Console.WriteLine(simpleStatus);
Tag filtering semantics
HealthCheckr supports include and exclude tag filters to control which checks run.
Rules
Exclude always wins
If a check has any excluded tag it will not run even if it also matches include tags.Include acts as an allow list
When include tags are specified only checks that contain at least one included tag will run.Untagged checks are excluded when filters are present
If a check has no tags it will only run when no include or exclude filters are provided.
Example JSON Output
{
"status": "Unhealthy",
"checks": [
{
"name": "Check 2",
"status": "Degraded",
"durationMs": 2,
"data": {
"Metadata1": 123
},
"tags": [
"external"
]
},
{
"name": "Check 3",
"status": "Unhealthy",
"durationMs": 1,
"tags": [
"external",
"critical"
]
}
],
"totalDurationMs": 11,
"timestamp": "2026-01-22T02:08:25.2082994+00:00",
"data": {
"Environment": "Production",
"Id": 42
}
}
Configuration
IncludeErrors– Include exception details for failing checksIncludeDuration– Include execution duration per checkHealthyHttpStatusCode/DegradedHttpStatusCode/UnhealthyHttpStatusCode– Customize HTTP response codes for the overall status
Contributing
Contributions are welcome. Please open an issue or pull request on GitHub.
License
© Kirill Polishchuk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.