Bravellian.Platform.HealthProbe 2026.2.3.1131

dotnet add package Bravellian.Platform.HealthProbe --version 2026.2.3.1131
                    
NuGet\Install-Package Bravellian.Platform.HealthProbe -Version 2026.2.3.1131
                    
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="Bravellian.Platform.HealthProbe" Version="2026.2.3.1131" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bravellian.Platform.HealthProbe" Version="2026.2.3.1131" />
                    
Directory.Packages.props
<PackageReference Include="Bravellian.Platform.HealthProbe" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bravellian.Platform.HealthProbe --version 2026.2.3.1131
                    
#r "nuget: Bravellian.Platform.HealthProbe, 2026.2.3.1131"
                    
#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.
#:package Bravellian.Platform.HealthProbe@2026.2.3.1131
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bravellian.Platform.HealthProbe&version=2026.2.3.1131
                    
Install as a Cake Addin
#tool nuget:?package=Bravellian.Platform.HealthProbe&version=2026.2.3.1131
                    
Install as a Cake Tool

Bravellian.Platform.HealthProbe

HealthProbe adds a small healthcheck CLI to your app so healthcheck requests hit your configured endpoint and exit with a Docker-friendly status code.

Quick start (minimal hosting)

var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddBravellianHealthProbe(options =>
{
    options.BaseUrl = new Uri("https://localhost:5001");
    options.DefaultEndpoint = "ready";
    options.Endpoints["ready"] = "/ready";
    options.Endpoints["deploy"] = "/health/deploy";
    options.ApiKey = builder.Configuration["HealthProbe:ApiKey"];
});

var app = builder.Build();

var exitCode = await HealthProbeApp.TryRunHealthCheckAndExitAsync(
    args,
    app.Services,
    app.Lifetime.ApplicationStopping);

if (exitCode >= 0)
{
    return exitCode;
}

await app.RunAsync();

Configuration keys (optional)

You can configure via IConfiguration (or override via code). These keys are optional:

  • Bravellian:HealthProbe:BaseUrl
  • Bravellian:HealthProbe:DefaultEndpoint
  • Bravellian:HealthProbe:Endpoints:<name> (one or more relative paths)
  • Bravellian:HealthProbe:TimeoutSeconds
  • Bravellian:HealthProbe:ApiKey
  • Bravellian:HealthProbe:ApiKeyHeaderName (defaults to X-Api-Key)

URL + path rules

  • If the configured endpoint value is an absolute URL, it is used as-is.
  • If the endpoint value is a relative path, it is combined with BaseUrl.

If DefaultEndpoint is not set and only one endpoint is configured, that endpoint is used by default.

CLI usage

healthcheck            # uses DefaultEndpoint
healthcheck ready
healthcheck deploy

--url <url>            # override configured URL
--timeout <seconds>    # override timeout in seconds
--header <name>        # override API key header name
--apikey <value>       # override API key value
--insecure             # allow invalid TLS certs (off by default)
--json                 # output JSON instead of a single line

Exit codes:

  • 0 = healthy
  • 1 = unhealthy response
  • 2 = invalid arguments or missing URL
  • 3 = exception / timeout / network error

Deploy-time usage

After deployment, invoke the app binary with healthcheck to probe the configured endpoint:

./MyApp healthcheck ready
./MyApp healthcheck deploy --json
./MyApp healthcheck ready --url https://service.example.com/ready --timeout 2

If you want to avoid passing flags, set configuration at deploy time using environment variables:

Bravellian__HealthProbe__BaseUrl=https://service.example.com
Bravellian__HealthProbe__DefaultEndpoint=ready
Bravellian__HealthProbe__Endpoints__ready=/ready
Bravellian__HealthProbe__Endpoints__deploy=/health/deploy
Bravellian__HealthProbe__TimeoutSeconds=2
Bravellian__HealthProbe__ApiKey=super-secret
Bravellian__HealthProbe__ApiKeyHeaderName=X-Api-Key

Docker HEALTHCHECK example

In containers, point BaseUrl at the app’s local listener (typically http://localhost:<port>). If you do not configure it in code, set it with environment variables in the Dockerfile (or your orchestrator).

ENV Bravellian__HealthProbe__BaseUrl=http://localhost:8080
ENV Bravellian__HealthProbe__DefaultEndpoint=ready
ENV Bravellian__HealthProbe__Endpoints__ready=/ready

HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
  CMD ["./MyApp", "healthcheck", "ready"]

Security note

--insecure disables TLS certificate validation. It is intended for local development only.

Product Compatible and additional computed target framework versions.
.NET 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. 
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
2026.2.3.1131 102 2/3/2026
2026.2.3.387 88 2/3/2026
2026.2.3.215 238 2/3/2026
2026.2.3.196 94 2/3/2026
2026.2.2.1402 94 2/2/2026
2026.2.2.1040 87 2/2/2026
2026.2.1.1354 90 2/1/2026
2026.2.1.1297 98 2/1/2026
2026.2.1.1217 93 2/1/2026
2026.2.1.333 93 2/1/2026
2026.2.1.326 91 2/1/2026
2026.2.1.159 91 2/1/2026
2026.1.31.455 93 1/31/2026
2026.1.30.391 96 1/30/2026
2026.1.29.1054 94 1/29/2026
2026.1.28.1297 104 1/28/2026
2026.1.28.293 101 1/28/2026
2026.1.27.1127 101 1/27/2026
2026.1.27.106 104 1/27/2026
2026.1.26.1292 99 1/26/2026
Loading failed