Couchbase.HealthChecks 1.0.0-alpha.2

Prefix Reserved
This is a prerelease version of Couchbase.HealthChecks.
dotnet add package Couchbase.HealthChecks --version 1.0.0-alpha.2
                    
NuGet\Install-Package Couchbase.HealthChecks -Version 1.0.0-alpha.2
                    
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="Couchbase.HealthChecks" Version="1.0.0-alpha.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Couchbase.HealthChecks" Version="1.0.0-alpha.2" />
                    
Directory.Packages.props
<PackageReference Include="Couchbase.HealthChecks" />
                    
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 Couchbase.HealthChecks --version 1.0.0-alpha.2
                    
#r "nuget: Couchbase.HealthChecks, 1.0.0-alpha.2"
                    
#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 Couchbase.HealthChecks@1.0.0-alpha.2
                    
#: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=Couchbase.HealthChecks&version=1.0.0-alpha.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Couchbase.HealthChecks&version=1.0.0-alpha.2&prerelease
                    
Install as a Cake Tool

Couchbase Health Check

This health check verifies the ability to communicate with Couchbase. It uses the provided ICluster and monitors diagnostics or actively pings services or buckets.

Defaults

By default, the ICluster is resolved from IClusterProvider from the service provider.

void Configure(IHealthChecksBuilder healthChecksBuilder)
{
    healthChecksBuilder
        .AddCouchbase(options => {
            options.ConnectionString = "couchbase://localhost";
            options.Username = "username";
            options.Password = "password";
        })
        .AddHealthChecks()
        .AddCouchbase(); // Adds the health check using IClusterProvider from DI
}

By default, the health check only validates connectivity to the key/value service. It requires at least one healthy connection to each data node in the cluster.

Customization

You can additionally add the following parameters:

  • clusterFactory: A delegate that receives an IServiceProvider and returns an ICluster instance to use for the health check.
  • serviceRequirmentsFactory: A delegate that receives an IServiceProvider and returns a dictionary of requirements for each service to be monitored that define if the service is healthy or unhealthy.
  • bucketNameFactory: A delegate that receives an IServiceProvider and returns the name of the bucket to monitor.
  • healthCheckType: An enum value that defines the type of health check to perform. The default is HealthCheckType.Active, which actively pings services on all nodes for each health check. For a lower overhead option, you can use HealthCheckType.Passive, which simply monitors the state of the existing service connections.
  • name: The health check name. The default is "couchbase".
  • failureStatus: The HealthStatus that should be reported when the health check fails. The default is HealthStatus.Unhealthy.
  • tags: A list of tags that can be used to filter sets of health checks.
  • timeout: A System.TimeSpan representing the timeout of the check.
void Configure(IHealthChecksBuilder healthChecksBuilder)
{
    healthChecksBuilder
        .AddCouchbase(options => {
            options.ConnectionString = "couchbase://localhost";
            options.Username = "username";
            options.Password = "password";
        })
        .AddHealthChecks()
        .AddCouchbase(
            serviceRequirementsFactory: sp =>
            {
                var requirements = CouchbaseHealthCheck.CreateDefaultServiceRequirements();
                requirements[ServiceType.Query] = [CouchbaseServiceHealthNodeRequirement.OneHealthyNode];
                return requirements;
            },
            bucketNameFactory: sp => "my-bucket");
}

Health checks may be further customized by creating custom ICouchbaseServiceHealthRequirement implementations. It is also possible to inherit from CouchbaseActiveHealthCheck or CouchbasePassiveHealthCheck to create entirely custom health check implementations.

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Couchbase.HealthChecks:

Package Downloads
Couchbase.Aspire.Hosting

Package Description

Couchbase.Aspire.Client

A Couchbase client that integrates with Aspire, including health checks, logging, and telemetry.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.2 0 1/17/2026
1.0.0-alpha.1 31 1/16/2026