Diagnostics

class couchbase.diagnostics.ClusterState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

The state of the SDK’s connections, summed over the endpoints of a diagnostics report.

Online when every endpoint is connected, Offline when none is, and Degraded otherwise.

Degraded = 'degraded'
Offline = 'offline'
Online = 'online'
class couchbase.diagnostics.EndpointDiagnosticsReport(record: _EndpointDiagnosticsRecord)

One endpoint of a DiagnosticsResult.

as_dict() → dict[str, str | int]

Get the report as a dict, leaving out the fields that are not set.

Returns:

The report’s fields, by name.

Return type:

dict[str, str | int]

property id: str

The SDK’s identifier for the endpoint’s connection.

property last_activity: timedelta | None

The time since the endpoint last sent or received anything, if known.

Deprecated since version 4.0.0: Use last_activity_us instead.

property last_activity_us: timedelta | None

The time since the endpoint last sent or received anything, if known.

property local: str

The local address of the connection.

property namespace: str | None

The bucket the endpoint is bound to, if it is bound to one.

property remote: str

The address of the node the endpoint connects to.

property service_type: ServiceType

The service the endpoint belongs to.

property state: EndpointState

The state of the endpoint’s connection.

property type: ServiceType

The service the endpoint belongs to.

Deprecated since version 4.0.0: Use service_type instead.

class couchbase.diagnostics.EndpointPingReport(record: _EndpointPingRecord)

One endpoint of a PingResult.

as_dict() → dict[str, str | int]

Get the report as a dict, leaving out the fields that are not set.

Returns:

The report’s fields, by name.

Return type:

dict[str, str | int]

property error: str | None

Why the ping failed, if it did.

property id: str

The SDK’s identifier for the endpoint’s connection.

property latency: timedelta | None

How long the ping took, if it completed.

property local: str

The local address of the connection.

property namespace: str | None

The bucket the endpoint is bound to, if it is bound to one.

property remote: str

The address of the node the endpoint connects to.

property service_type: ServiceType

The service the endpoint belongs to.

property state: PingState

The outcome of the ping.

class couchbase.diagnostics.EndpointState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

The state of one endpoint’s connection, in a diagnostics report.

Connected = 'connected'
Connecting = 'connecting'
Disconnected = 'disconnected'
Disconnecting = 'disconnecting'
class couchbase.diagnostics.PingState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

The outcome of pinging one endpoint.

ERROR = 'error'
OK = 'ok'
TIMEOUT = 'timeout'
class couchbase.diagnostics.ServiceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

A Couchbase Server service, as an endpoint in a diagnostics or ping report names it.

Analytics = 'analytics'
Eventing = 'eventing'
KeyValue = 'key_value'
Management = 'management'
Query = 'query'
Search = 'search'
View = 'view'