Microsoft.Extensions.Diagnostics.Probes 9.0.0-preview.3.24209.3

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of Microsoft.Extensions.Diagnostics.Probes.
dotnet add package Microsoft.Extensions.Diagnostics.Probes --version 9.0.0-preview.3.24209.3
NuGet\Install-Package Microsoft.Extensions.Diagnostics.Probes -Version 9.0.0-preview.3.24209.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Extensions.Diagnostics.Probes" Version="9.0.0-preview.3.24209.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Extensions.Diagnostics.Probes --version 9.0.0-preview.3.24209.3
#r "nuget: Microsoft.Extensions.Diagnostics.Probes, 9.0.0-preview.3.24209.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Extensions.Diagnostics.Probes as a Cake Addin
#addin nuget:?package=Microsoft.Extensions.Diagnostics.Probes&version=9.0.0-preview.3.24209.3&prerelease

// Install Microsoft.Extensions.Diagnostics.Probes as a Cake Tool
#tool nuget:?package=Microsoft.Extensions.Diagnostics.Probes&version=9.0.0-preview.3.24209.3&prerelease

Microsoft.Extensions.Diagnostics.Probes

Answers Kubernetes liveness, startup, and readiness TCP probes based on the results from the Health Checks service.

Install the package

From the command-line:

dotnet add package Microsoft.Extensions.Diagnostics.Probes

Or directly in the C# project file:

<ItemGroup>
  <PackageReference Include="Microsoft.Extensions.Diagnostics.Probes" Version="[CURRENTVERSION]" />
</ItemGroup>

Usage Example

The health check endpoints can be registered and configured with the following methods:

public static IServiceCollection AddKubernetesProbes(this IServiceCollection services)
public static IServiceCollection AddKubernetesProbes(this IServiceCollection services, IConfigurationSection section)
public static IServiceCollection AddKubernetesProbes(this IServiceCollection services, Action<KubernetesProbesOptions> configure)

Each type of probe handler can have its details configured separately.

services.AddKubernetesProbes(options =>
{
    options.LivenessProbe.TcpPort = 2305;
    options.StartupProbe.TcpPort = 2306;
    options.ReadinessProbe.TcpPort = 2307;
})

The HealthAssessmentPeriod property defines how often the health-checks are assessed. By default 30 seconds.

Each probe can also specify Func<HealthCheckRegistration, bool>? FilterChecks to customize which health checks are run.

Feedback & Contributing

We welcome feedback and contributions in our GitHub repo.

Product 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 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
9.0.0-preview.3.24209.3 67 4/11/2024
9.0.0-preview.2.24157.4 153 3/12/2024
9.0.0-preview.1.24108.1 84 2/13/2024
8.4.0-rtm.24205.3 59 4/9/2024
8.3.0-rtm.24161.6 66 3/12/2024
8.2.0-rtm.24107.6 79 2/13/2024
8.1.0-rtm.24058.3 102 1/9/2024
8.0.0-rtm.23558.11 282 11/14/2023
8.0.0-rc.2.23510.2 110 10/10/2023
8.0.0-rc.1.23453.1 115 9/12/2023
8.0.0-preview.7.23407.5 92 8/8/2023
8.0.0-preview.6.23360.2 74 7/12/2023