CasCap.Common.Extensions.Diagnostics.HealthChecks
5.1.0
Prefix Reserved
dotnet add package CasCap.Common.Extensions.Diagnostics.HealthChecks --version 5.1.0
NuGet\Install-Package CasCap.Common.Extensions.Diagnostics.HealthChecks -Version 5.1.0
<PackageReference Include="CasCap.Common.Extensions.Diagnostics.HealthChecks" Version="5.1.0" />
<PackageVersion Include="CasCap.Common.Extensions.Diagnostics.HealthChecks" Version="5.1.0" />
<PackageReference Include="CasCap.Common.Extensions.Diagnostics.HealthChecks" />
paket add CasCap.Common.Extensions.Diagnostics.HealthChecks --version 5.1.0
#r "nuget: CasCap.Common.Extensions.Diagnostics.HealthChecks, 5.1.0"
#:package CasCap.Common.Extensions.Diagnostics.HealthChecks@5.1.0
#addin nuget:?package=CasCap.Common.Extensions.Diagnostics.HealthChecks&version=5.1.0
#tool nuget:?package=CasCap.Common.Extensions.Diagnostics.HealthChecks&version=5.1.0
CasCap.Common.Extensions.Diagnostics.HealthChecks
Custom ASP.NET Core health check base classes for monitoring HTTP endpoint availability.
Installation
dotnet add package CasCap.Common.Extensions.Diagnostics.HealthChecks
Target frameworks: netstandard2.0, net8.0, net9.0, net10.0
Usage
Implement IHealthCheckConfig
and supply it to a derived check. This ASP.NET Core example
registers an HTTP client and exposes the check through the standard health endpoint:
using System.Collections.Generic;
using System.Net.Http;
using CasCap.Common.Diagnostics.HealthChecks;
using CasCap.Common.Diagnostics.HealthChecks.Abstractions;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<IHealthCheckConfig>(new EndpointConfig());
builder.Services.AddHttpClient<EndpointHealthCheck>();
builder.Services.AddHealthChecks().AddCheck<EndpointHealthCheck>("upstream");
var app = builder.Build();
app.MapHealthChecks("/healthz");
app.Run();
public sealed record EndpointConfig : IHealthCheckConfig
{
public string HealthCheckUri { get; init; } = "https://example.com/health";
public IReadOnlyList<int> HealthCheckExpectedHttpStatusCodes { get; init; } = [200];
}
public sealed class EndpointHealthCheck(
ILogger<EndpointHealthCheck> logger,
HttpClient client,
IHealthCheckConfig config) : HttpEndpointCheckBase(logger, client, config, "Upstream");
Replace the example URI with the caller's endpoint through application configuration. The base
class sends a GET and reports healthy only for an expected status; ConnectionActive tracks the
last result. Configure timeouts on the injected HttpClient.
Each probe logs only at Debug. When the endpoint becomes inaccessible the check logs one
Warning, repeated failures log at Debug with the count, and the next successful probe logs one
Information recovery with the failure count. Log messages name the display name, not the URI.
Configuration Examples
The library does not bind a fixed JSON section. Your application supplies IHealthCheckConfig,
either directly as above or by binding its own options.
| Property | Minimal value | Customized example |
|---|---|---|
HealthCheckUri |
Required endpoint URI | https://example.com/ready |
HealthCheckExpectedHttpStatusCodes |
[200] |
[200, 204] |
On .NET Standard 2.0, implement both properties. On .NET 8+, the interface supplies [200] when the
status list is not overridden.
Kubernetes Probe Tags
KubernetesProbeTypes.GetTags() maps probe flags to ready, live and startup strings for use
with health-check registration and endpoint predicates. Tagging a check does not create Kubernetes
probes or configure HTTP health endpoints.
| 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 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 is compatible. 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. 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.0
- CasCap.Common.Abstractions (>= 5.1.0)
- CasCap.Common.Extensions (>= 5.1.0)
- CasCap.Common.Logging (>= 5.1.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.14)
-
net10.0
- CasCap.Common.Abstractions (>= 5.1.0)
- CasCap.Common.Extensions (>= 5.1.0)
- CasCap.Common.Logging (>= 5.1.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.14)
-
net8.0
- CasCap.Common.Abstractions (>= 5.1.0)
- CasCap.Common.Extensions (>= 5.1.0)
- CasCap.Common.Logging (>= 5.1.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.14)
-
net9.0
- CasCap.Common.Abstractions (>= 5.1.0)
- CasCap.Common.Extensions (>= 5.1.0)
- CasCap.Common.Logging (>= 5.1.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.14)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on CasCap.Common.Extensions.Diagnostics.HealthChecks:
| Package | Downloads |
|---|---|
|
CasCap.Common.Caching
Helper library for local and remote object caching. |
|
|
CasCap.Api.SignalCli
Typed .NET client for the signal-cli REST API with REST polling and JSON-RPC WebSocket transports, health checks, and INotifier integration. |
|
|
CasCap.Api.Knx
.NET client library for KNX building automation — connects via KNXnet/IP tunnelling or routing, monitors group-address telegrams, and fans events out to configurable sinks. |
|
|
CasCap.Api.Buderus
.NET client library for Buderus KM200 heat-pump controller — polls temperature datapoints via the encrypted local HTTPS API and dispatches readings to configurable sinks. |
|
|
CasCap.Api.DoorBird
.NET client library for DoorBird IP video door station — captures doorbell, motion and RFID events via the local LAN API and dispatches them to configurable sinks. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.1.0 | 232 | 11/5/2026 |
| 5.0.0 | 255 | 11/1/2026 |
| 4.17.0 | 485 | 10/24/2026 |
| 4.16.0 | 293 | 10/21/2026 |
| 4.15.0 | 199 | 10/6/2026 |
| 4.14.4 | 273 | 10/4/2026 |
| 4.14.3 | 186 | 9/28/2026 |
| 4.14.2 | 335 | 9/25/2026 |
| 4.14.1 | 394 | 9/23/2026 |
| 4.14.0 | 645 | 9/19/2026 |
| 4.13.0 | 320 | 9/15/2026 |
| 4.12.8 | 350 | 9/10/2026 |
| 4.12.7 | 172 | 9/4/2026 |
| 4.12.6 | 176 | 9/1/2026 |
| 4.12.5 | 258 | 8/20/2026 |
| 4.12.4 | 354 | 8/18/2026 |
| 4.12.3 | 400 | 7/15/2026 |
| 4.12.2 | 405 | 6/26/2026 |
| 4.12.1 | 387 | 6/14/2026 |
| 4.12.0 | 378 | 6/12/2026 |