Couchbase.HealthChecks
1.0.0-alpha.2
Prefix Reserved
dotnet add package Couchbase.HealthChecks --version 1.0.0-alpha.2
NuGet\Install-Package Couchbase.HealthChecks -Version 1.0.0-alpha.2
<PackageReference Include="Couchbase.HealthChecks" Version="1.0.0-alpha.2" />
<PackageVersion Include="Couchbase.HealthChecks" Version="1.0.0-alpha.2" />
<PackageReference Include="Couchbase.HealthChecks" />
paket add Couchbase.HealthChecks --version 1.0.0-alpha.2
#r "nuget: Couchbase.HealthChecks, 1.0.0-alpha.2"
#:package Couchbase.HealthChecks@1.0.0-alpha.2
#addin nuget:?package=Couchbase.HealthChecks&version=1.0.0-alpha.2&prerelease
#tool nuget:?package=Couchbase.HealthChecks&version=1.0.0-alpha.2&prerelease
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 anIServiceProviderand returns anIClusterinstance to use for the health check.serviceRequirmentsFactory: A delegate that receives anIServiceProviderand 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 anIServiceProviderand returns the name of the bucket to monitor.healthCheckType: An enum value that defines the type of health check to perform. The default isHealthCheckType.Active, which actively pings services on all nodes for each health check. For a lower overhead option, you can useHealthCheckType.Passive, which simply monitors the state of the existing service connections.name: The health check name. The default is "couchbase".failureStatus: TheHealthStatusthat should be reported when the health check fails. The default isHealthStatus.Unhealthy.tags: A list of tags that can be used to filter sets of health checks.timeout: ASystem.TimeSpanrepresenting 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 | 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 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. |
-
.NETFramework 4.7.2
- Couchbase.Extensions.DependencyInjection (>= 3.8.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.22)
-
.NETStandard 2.1
- Couchbase.Extensions.DependencyInjection (>= 3.8.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.22)
-
net8.0
- Couchbase.Extensions.DependencyInjection (>= 3.8.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.22)
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 |