HealthAsync()

Checks the health of the Milvus server.

public async Task<HealthState> HealthAsync(CancellationToken cancellationToken = default)

Request Syntax

HealthState health = await client.HealthAsync();

RETURN TYPE:

Task

RETURNS:

A HealthState object that describes the health of the Milvus server. See HealthState.

HealthState
    IsHealthy     // -> bool
    Reason        // -> string
    ErrorCode     // -> MilvusErrorCode
    Reasons       // -> IReadOnlyList<string>?
    QuotaStates   // -> IReadOnlyList<QuotaState>?

PARAMETERS:

  • IsHealthy (bool) -

    Whether the server reported itself as healthy.

  • Reason (string) -

    The reason reported by the server when unhealthy.

  • ErrorCode (MilvusErrorCode) -

    The error code reported by the server. For the values of the MilvusErrorCode enumeration, refer to MilvusErrorCode.

  • Reasons (IReadOnlyList?) -

    The detailed reasons reported by the server when unhealthy.

  • QuotaStates (IReadOnlyList?) -

    The quota states reported by the server.

EXCEPTIONS:

  • MilvusException

    Thrown when the RPC fails or the server returns an error. Inspect the exception message for details.

Example

using Milvus.Client.V2;
using Milvus.Client.V2.Types;

using var client = new MilvusClientV2(new ConnectConfig
{
    Uri = "localhost:19530",
    Username = "root",
    Password = "Milvus"
});
await client.ConnectAsync();

HealthState health = await client.HealthAsync();

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?