Back to Cockroach

Full

docs/generated/http/full.md

26.1.3361.1 KB
Original Source

Certificates

GET /_status/certificates/{node_id}

Certificates retrieves a copy of the TLS certificates.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
certificatesCertificateDetailsrepeatedreserved

<a name="cockroach.server.serverpb.CertificatesResponse-cockroach.server.serverpb.CertificateDetails"></a>

CertificateDetails

FieldTypeLabelDescriptionSupport status
typeCertificateDetails.CertificateTypereserved
error_messagestring"error_message" and "data" are mutually exclusive.reserved
fieldsCertificateDetails.Fieldsrepeatedreserved

<a name="cockroach.server.serverpb.CertificatesResponse-cockroach.server.serverpb.CertificateDetails.Fields"></a>

CertificateDetails.Fields

FieldTypeLabelDescriptionSupport status
issuerstringreserved
subjectstringreserved
valid_fromint64reserved
valid_untilint64reserved
addressesstringrepeatedreserved
signature_algorithmstringreserved
public_keystringreserved
key_usagestringrepeatedreserved
extended_key_usagestringrepeatedreserved

Details

GET /_status/details/{node_id}

Details retrieves details about the nodes in the cluster.

Support status: reserved

Request Parameters

DetailsRequest requests a nodes details. Note: this does not check readiness. Use the Health RPC for that purpose.

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
node_idint32reserved
addresscockroach.util.UnresolvedAddrreserved
build_infocockroach.build.Inforeserved
system_infoSystemInforeserved
sql_addresscockroach.util.UnresolvedAddrreserved

<a name="cockroach.server.serverpb.DetailsResponse-cockroach.server.serverpb.SystemInfo"></a>

SystemInfo

SystemInfo contains information about the host system.

FieldTypeLabelDescriptionSupport status
system_infostringsystem_info is the output from uname -areserved
kernel_infostringkernel_info is the output from uname -r.reserved

Regions

RegionsRequest retrieves all available regions.

Support status: reserved

Request Parameters

RegionsRequest requests all available regions.

Response Parameters

RegionsResponse describes the available regions.

FieldTypeLabelDescriptionSupport status
regionsRegionsResponse.RegionsEntryrepeatedreserved

<a name="cockroach.server.serverpb.RegionsResponse-cockroach.server.serverpb.RegionsResponse.RegionsEntry"></a>

RegionsResponse.RegionsEntry

FieldTypeLabelDescriptionSupport status
keystring
valueRegionsResponse.Region

<a name="cockroach.server.serverpb.RegionsResponse-cockroach.server.serverpb.RegionsResponse.Region"></a>

RegionsResponse.Region

FieldTypeLabelDescriptionSupport status
zonesstringrepeatedreserved

NodesList

NodesList returns all available nodes with their addresses.

Support status: reserved

Request Parameters

NodesListRequest requests list of all nodes. The nodes are KV nodes when the cluster is a single tenant cluster or the host cluster in case of multi-tenant clusters. The nodes are SQL instances in case of multi-tenant clusters.

FieldTypeLabelDescriptionSupport status
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

NodesListResponse contains a list of all nodes with their addresses. The nodes are KV nodes when the cluster is a single tenant cluster or the host cluster in case of multi-tenant clusters. The nodes are SQL instances in case of multi-tenant clusters.

FieldTypeLabelDescriptionSupport status
nodesNodeDetailsrepeatednodes contains a list of NodeDetails. Each individual node within the list is a SQL node in case of a tenant server and KV nodes in case of a KV server.reserved

<a name="cockroach.server.serverpb.NodesListResponse-cockroach.server.serverpb.NodeDetails"></a>

NodeDetails

FieldTypeLabelDescriptionSupport status
node_idint32node_id is a unique identifier for the node. This corresponds to SQL instance ID for a tenant server and KV node id for for a KV server.reserved
addresscockroach.util.UnresolvedAddraddress is the RPC address for a KV node. This will be set to null for a tenant server node.reserved
sql_addresscockroach.util.UnresolvedAddrsql_address is the SQL address for a node.reserved

Nodes

GET /_status/nodes

Nodes returns status info for all commissioned nodes. Decommissioned nodes are not included, except in rare cases where the node doing the decommissioning crashed before completing the operation. In these cases, the decommission operation can be rerun to clean up the status entry.

Don't introduce additional usages of this RPC. See #50707 for more details. The underlying response type is something we're looking to get rid of.

Support status: alpha

Request Parameters

NodesRequest requests a copy of the node information as known to gossip and the KV layer.

FieldTypeLabelDescriptionSupport status
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

NodesResponse describe the nodes in the cluster.

FieldTypeLabelDescriptionSupport status
nodescockroach.server.status.statuspb.NodeStatusrepeatednodes carries the status payloads for all nodes in the cluster.alpha
liveness_by_node_idNodesResponse.LivenessByNodeIdEntryrepeatedliveness_by_node_id maps each node ID to a liveness status.reserved

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.NodeStatus"></a>

NodeStatus

NodeStatus records the most recent values of metrics for a node.

FieldTypeLabelDescriptionSupport status
desccockroach.roachpb.NodeDescriptordesc is the node descriptor.reserved
build_infocockroach.build.Infobuild_info describes the cockroach executable file.alpha
started_atint64started_at is the unix timestamp at which the node process was last started.alpha
updated_atint64updated_at is the unix timestamp at which the node status record was last updated.alpha
metricsNodeStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved
store_statusesStoreStatusrepeatedstore_statuses provides the store status payloads for all the stores on that node.reserved
argsstringrepeatedargs is the list of command-line arguments used to last start the node.reserved
envstringrepeatedenv is the list of environment variables that influenced the node's configuration.reserved
latenciesNodeStatus.LatenciesEntryrepeatedlatencies is a map of nodeIDs to nanoseconds which is the latency between this node and the other node.

NOTE: this is deprecated and is only set if the min supported cluster version is >= VersionRPCNetworkStats. | reserved | | activity | NodeStatus.ActivityEntry | repeated | activity is a map of nodeIDs to network statistics from this node to other nodes. | reserved | | total_system_memory | int64 | | total_system_memory is the total RAM available to the system (or, if detected, the memory available to the cgroup this process is in) in bytes. | alpha | | num_cpus | int32 | | num_cpus is the number of logical CPUs as reported by the operating system on the host where the cockroach process is running. This reflects the physical CPU count and does not account for container/cgroup limits. See num_vcpus for container-aware CPU allocation. | alpha | | num_vcpus | double | | num_vcpus is the number of vCPUs allocated to the process by the container orchestrator (e.g., Kubernetes, Docker) based on cgroup CPU quota/period. This represents the platform CPU allocation and is independent of GOMAXPROCS runtime tuning. Falls back to num_cpus if no container limits are configured. Supports fractional values (e.g., 1.5 for Kubernetes CPU limits like "1500m"). | alpha |

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.NodeStatus.MetricsEntry"></a>

NodeStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.StoreStatus"></a>

StoreStatus

StoreStatus records the most recent values of metrics for a store.

FieldTypeLabelDescriptionSupport status
desccockroach.roachpb.StoreDescriptordesc is the store descriptor.reserved
metricsStoreStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.StoreStatus.MetricsEntry"></a>

StoreStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.NodeStatus.LatenciesEntry"></a>

NodeStatus.LatenciesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueint64

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.NodeStatus.ActivityEntry"></a>

NodeStatus.ActivityEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNodeStatus.NetworkActivity

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.status.statuspb.NodeStatus.NetworkActivity"></a>

NodeStatus.NetworkActivity

FieldTypeLabelDescriptionSupport status
latencyint64in nanosecondsreserved

<a name="cockroach.server.serverpb.NodesResponse-cockroach.server.serverpb.NodesResponse.LivenessByNodeIdEntry"></a>

NodesResponse.LivenessByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.kv.kvserver.liveness.livenesspb.NodeLivenessStatus

Node

GET /_status/nodes/{node_id}

Node retrieves details about a single node.

Support status: alpha

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

NodeStatus records the most recent values of metrics for a node.

FieldTypeLabelDescriptionSupport status
desccockroach.roachpb.NodeDescriptordesc is the node descriptor.reserved
build_infocockroach.build.Infobuild_info describes the cockroach executable file.alpha
started_atint64started_at is the unix timestamp at which the node process was last started.alpha
updated_atint64updated_at is the unix timestamp at which the node status record was last updated.alpha
metricsNodeStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved
store_statusesStoreStatusrepeatedstore_statuses provides the store status payloads for all the stores on that node.reserved
argsstringrepeatedargs is the list of command-line arguments used to last start the node.reserved
envstringrepeatedenv is the list of environment variables that influenced the node's configuration.reserved
latenciesNodeStatus.LatenciesEntryrepeatedlatencies is a map of nodeIDs to nanoseconds which is the latency between this node and the other node.

NOTE: this is deprecated and is only set if the min supported cluster version is >= VersionRPCNetworkStats. | reserved | | activity | NodeStatus.ActivityEntry | repeated | activity is a map of nodeIDs to network statistics from this node to other nodes. | reserved | | total_system_memory | int64 | | total_system_memory is the total RAM available to the system (or, if detected, the memory available to the cgroup this process is in) in bytes. | alpha | | num_cpus | int32 | | num_cpus is the number of logical CPUs as reported by the operating system on the host where the cockroach process is running. This reflects the physical CPU count and does not account for container/cgroup limits. See num_vcpus for container-aware CPU allocation. | alpha | | num_vcpus | double | | num_vcpus is the number of vCPUs allocated to the process by the container orchestrator (e.g., Kubernetes, Docker) based on cgroup CPU quota/period. This represents the platform CPU allocation and is independent of GOMAXPROCS runtime tuning. Falls back to num_cpus if no container limits are configured. Supports fractional values (e.g., 1.5 for Kubernetes CPU limits like "1500m"). | alpha |

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.NodeStatus.MetricsEntry"></a>

NodeStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.StoreStatus"></a>

StoreStatus

StoreStatus records the most recent values of metrics for a store.

FieldTypeLabelDescriptionSupport status
desccockroach.roachpb.StoreDescriptordesc is the store descriptor.reserved
metricsStoreStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.StoreStatus.MetricsEntry"></a>

StoreStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.NodeStatus.LatenciesEntry"></a>

NodeStatus.LatenciesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueint64

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.NodeStatus.ActivityEntry"></a>

NodeStatus.ActivityEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNodeStatus.NetworkActivity

<a name="cockroach.server.status.statuspb.NodeStatus-cockroach.server.status.statuspb.NodeStatus.NetworkActivity"></a>

NodeStatus.NetworkActivity

FieldTypeLabelDescriptionSupport status
latencyint64in nanosecondsreserved

NodesUI

GET /_status/nodes_ui

Support status: reserved

Request Parameters

NodesRequest requests a copy of the node information as known to gossip and the KV layer.

FieldTypeLabelDescriptionSupport status
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

NodesResponse describe the nodes in the cluster.

FieldTypeLabelDescriptionSupport status
nodesNodeResponserepeatednodes carries the status payloads for all nodes in the cluster.alpha
liveness_by_node_idNodesResponseExternal.LivenessByNodeIdEntryrepeatedliveness_by_node_id maps each node ID to a liveness status.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeResponse"></a>

NodeResponse

NodeStatus records the most recent values of metrics for a node.

FieldTypeLabelDescriptionSupport status
descNodeDescriptordesc is the node descriptor.reserved
build_infocockroach.build.Infobuild_info describes the cockroach executable file.alpha
started_atint64started_at is the unix timestamp at which the node process was last started.alpha
updated_atint64updated_at is the unix timestamp at which the node status record was last updated.alpha
metricsNodeResponse.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved
store_statusesStoreStatusrepeatedstore_statuses provides the store status payloads for all the stores on that node.reserved
argsstringrepeatedargs is the list of command-line arguments used to last start the node. args should only be visible by the Admin role.reserved
envstringrepeatedenv is the list of environment variables that influenced the node's configuration. env should only be visible by the Admin role.reserved
latenciesNodeResponse.LatenciesEntryrepeatedlatencies is a map of nodeIDs to nanoseconds which is the latency between this node and the other node.

NOTE: this is deprecated and is only set if the min supported cluster version is >= VersionRPCNetworkStats. | reserved | | activity | NodeResponse.ActivityEntry | repeated | activity is a map of nodeIDs to network statistics from this node to other nodes. | reserved | | total_system_memory | int64 | | total_system_memory is the total RAM available to the system (or, if detected, the memory available to the cgroup this process is in) in bytes. | alpha | | num_cpus | int32 | | num_cpus is the number of logical CPUs as reported by the operating system on the host where the cockroach process is running. Note that this does not report the number of CPUs actually used by cockroach; this parameter is controlled separately. | alpha | | num_vcpus | double | | num_vcpus is the number of provisioned vCPUs as reported by cgroups or the operating system. | reserved |

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeDescriptor"></a>

NodeDescriptor

NodeDescriptor holds details on node physical/network topology.

FieldTypeLabelDescriptionSupport status
node_idint32reserved
addresscockroach.util.UnresolvedAddraddress should only be visible by the Admin role.reserved
attrscockroach.roachpb.Attributesattrs should only be visible by the Admin role.reserved
localityLocalityreserved
ServerVersionVersionreserved
build_tagstringreserved
started_atint64reserved
locality_addresscockroach.roachpb.LocalityAddressrepeatedlocality_address should only be visible by the Admin role.reserved
cluster_namestringreserved
sql_addresscockroach.util.UnresolvedAddrThe SQL address. If empty, indicates that the base address field is also used to accept SQL connections. sql_address should only be visible by the Admin role.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.Version"></a>

Version

FieldTypeLabelDescriptionSupport status
major_valint32The names "major" and "minor" are reserved in C in some platforms (e.g. FreeBSD).reserved
minor_valint32reserved
patchint32Note that patch is a placeholder and will always be zero.reserved
internalint32The internal version is used to introduce migrations during the development cycle. They are subversions that are never the end versions of a release, i.e. users of stable, public release will only use binaries with the internal version set to 0.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeResponse.MetricsEntry"></a>

NodeResponse.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.StoreStatus"></a>

StoreStatus

StoreStatus records the most recent values of metrics for a store.

FieldTypeLabelDescriptionSupport status
descStoreDescriptordesc is the store descriptor.reserved
metricsStoreStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.StoreDescriptor"></a>

StoreDescriptor

StoreDescriptor holds store information including store attributes, node descriptor and store capacity.

FieldTypeLabelDescriptionSupport status
store_idint32reserved
attrscockroach.roachpb.Attributesreserved
nodeNodeDescriptorreserved
capacitycockroach.roachpb.StoreCapacityreserved
propertiescockroach.roachpb.StorePropertiesreserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeDescriptor"></a>

NodeDescriptor

NodeDescriptor holds details on node physical/network topology.

FieldTypeLabelDescriptionSupport status
node_idint32reserved
addresscockroach.util.UnresolvedAddraddress should only be visible by the Admin role.reserved
attrscockroach.roachpb.Attributesattrs should only be visible by the Admin role.reserved
localityLocalityreserved
ServerVersionVersionreserved
build_tagstringreserved
started_atint64reserved
locality_addresscockroach.roachpb.LocalityAddressrepeatedlocality_address should only be visible by the Admin role.reserved
cluster_namestringreserved
sql_addresscockroach.util.UnresolvedAddrThe SQL address. If empty, indicates that the base address field is also used to accept SQL connections. sql_address should only be visible by the Admin role.reserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.StoreStatus.MetricsEntry"></a>

StoreStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeResponse.LatenciesEntry"></a>

NodeResponse.LatenciesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueint64

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeResponse.ActivityEntry"></a>

NodeResponse.ActivityEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNodeResponse.NetworkActivity

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodeResponse.NetworkActivity"></a>

NodeResponse.NetworkActivity

FieldTypeLabelDescriptionSupport status
latencyint64in nanosecondsreserved

<a name="cockroach.server.serverpb.NodesResponseExternal-cockroach.server.serverpb.NodesResponseExternal.LivenessByNodeIdEntry"></a>

NodesResponseExternal.LivenessByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.kv.kvserver.liveness.livenesspb.NodeLivenessStatus

NodeUI

GET /_status/nodes_ui/{node_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

NodeStatus records the most recent values of metrics for a node.

FieldTypeLabelDescriptionSupport status
descNodeDescriptordesc is the node descriptor.reserved
build_infocockroach.build.Infobuild_info describes the cockroach executable file.alpha
started_atint64started_at is the unix timestamp at which the node process was last started.alpha
updated_atint64updated_at is the unix timestamp at which the node status record was last updated.alpha
metricsNodeResponse.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved
store_statusesStoreStatusrepeatedstore_statuses provides the store status payloads for all the stores on that node.reserved
argsstringrepeatedargs is the list of command-line arguments used to last start the node. args should only be visible by the Admin role.reserved
envstringrepeatedenv is the list of environment variables that influenced the node's configuration. env should only be visible by the Admin role.reserved
latenciesNodeResponse.LatenciesEntryrepeatedlatencies is a map of nodeIDs to nanoseconds which is the latency between this node and the other node.

NOTE: this is deprecated and is only set if the min supported cluster version is >= VersionRPCNetworkStats. | reserved | | activity | NodeResponse.ActivityEntry | repeated | activity is a map of nodeIDs to network statistics from this node to other nodes. | reserved | | total_system_memory | int64 | | total_system_memory is the total RAM available to the system (or, if detected, the memory available to the cgroup this process is in) in bytes. | alpha | | num_cpus | int32 | | num_cpus is the number of logical CPUs as reported by the operating system on the host where the cockroach process is running. Note that this does not report the number of CPUs actually used by cockroach; this parameter is controlled separately. | alpha | | num_vcpus | double | | num_vcpus is the number of provisioned vCPUs as reported by cgroups or the operating system. | reserved |

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeDescriptor"></a>

NodeDescriptor

NodeDescriptor holds details on node physical/network topology.

FieldTypeLabelDescriptionSupport status
node_idint32reserved
addresscockroach.util.UnresolvedAddraddress should only be visible by the Admin role.reserved
attrscockroach.roachpb.Attributesattrs should only be visible by the Admin role.reserved
localityLocalityreserved
ServerVersionVersionreserved
build_tagstringreserved
started_atint64reserved
locality_addresscockroach.roachpb.LocalityAddressrepeatedlocality_address should only be visible by the Admin role.reserved
cluster_namestringreserved
sql_addresscockroach.util.UnresolvedAddrThe SQL address. If empty, indicates that the base address field is also used to accept SQL connections. sql_address should only be visible by the Admin role.reserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.Version"></a>

Version

FieldTypeLabelDescriptionSupport status
major_valint32The names "major" and "minor" are reserved in C in some platforms (e.g. FreeBSD).reserved
minor_valint32reserved
patchint32Note that patch is a placeholder and will always be zero.reserved
internalint32The internal version is used to introduce migrations during the development cycle. They are subversions that are never the end versions of a release, i.e. users of stable, public release will only use binaries with the internal version set to 0.reserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeResponse.MetricsEntry"></a>

NodeResponse.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.StoreStatus"></a>

StoreStatus

StoreStatus records the most recent values of metrics for a store.

FieldTypeLabelDescriptionSupport status
descStoreDescriptordesc is the store descriptor.reserved
metricsStoreStatus.MetricsEntryrepeatedmetrics contains the last sampled values for the node metrics.reserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.StoreDescriptor"></a>

StoreDescriptor

StoreDescriptor holds store information including store attributes, node descriptor and store capacity.

FieldTypeLabelDescriptionSupport status
store_idint32reserved
attrscockroach.roachpb.Attributesreserved
nodeNodeDescriptorreserved
capacitycockroach.roachpb.StoreCapacityreserved
propertiescockroach.roachpb.StorePropertiesreserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeDescriptor"></a>

NodeDescriptor

NodeDescriptor holds details on node physical/network topology.

FieldTypeLabelDescriptionSupport status
node_idint32reserved
addresscockroach.util.UnresolvedAddraddress should only be visible by the Admin role.reserved
attrscockroach.roachpb.Attributesattrs should only be visible by the Admin role.reserved
localityLocalityreserved
ServerVersionVersionreserved
build_tagstringreserved
started_atint64reserved
locality_addresscockroach.roachpb.LocalityAddressrepeatedlocality_address should only be visible by the Admin role.reserved
cluster_namestringreserved
sql_addresscockroach.util.UnresolvedAddrThe SQL address. If empty, indicates that the base address field is also used to accept SQL connections. sql_address should only be visible by the Admin role.reserved

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.StoreStatus.MetricsEntry"></a>

StoreStatus.MetricsEntry

FieldTypeLabelDescriptionSupport status
keystring
valuedouble

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeResponse.LatenciesEntry"></a>

NodeResponse.LatenciesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueint64

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeResponse.ActivityEntry"></a>

NodeResponse.ActivityEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNodeResponse.NetworkActivity

<a name="cockroach.server.serverpb.NodeResponse-cockroach.server.serverpb.NodeResponse.NetworkActivity"></a>

NodeResponse.NetworkActivity

FieldTypeLabelDescriptionSupport status
latencyint64in nanosecondsreserved

RaftDebug

GET /_status/raft

RaftDebug requests internal details about Raft.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
range_idsint64repeatedreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
rangesRaftDebugResponse.RangesEntryrepeatedreserved
errorsRaftRangeErrorrepeatedreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftDebugResponse.RangesEntry"></a>

RaftDebugResponse.RangesEntry

FieldTypeLabelDescriptionSupport status
keyint64
valueRaftRangeStatus

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftRangeStatus"></a>

RaftRangeStatus

FieldTypeLabelDescriptionSupport status
range_idint64reserved
errorsRaftRangeErrorrepeatedreserved
nodesRaftRangeNoderepeatedreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftRangeError"></a>

RaftRangeError

FieldTypeLabelDescriptionSupport status
messagestringreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftRangeNode"></a>

RaftRangeNode

FieldTypeLabelDescriptionSupport status
node_idint32reserved
rangeRangeInforeserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RangeInfo"></a>

RangeInfo

FieldTypeLabelDescriptionSupport status
spanPrettySpanreserved
raft_stateRaftStatereserved
rac_statusRACStatusreserved
statecockroach.kv.kvserver.storagepb.RangeInforeserved
source_node_idint32reserved
source_store_idint32reserved
error_messagestringreserved
lease_historycockroach.roachpb.Leaserepeatedreserved
problemsRangeProblemsreserved
statsRangeStatisticsreserved
lease_statuscockroach.kv.kvserver.storagepb.LeaseStatusreserved
quiescentboolreserved
tickingboolreserved
read_latchesint64reserved
write_latchesint64reserved
locksint64reserved
locks_with_wait_queuesint64reserved
lock_wait_queue_waitersint64reserved
top_k_locks_by_wait_queue_waitersRangeInfo.LockInforepeatedreserved
localityLocalityreserved
is_leaseholderboolreserved
lease_validboolNext tag: 26reserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.PrettySpan"></a>

PrettySpan

FieldTypeLabelDescriptionSupport status
start_keystringreserved
end_keystringreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftState"></a>

RaftState

RaftState gives internal details about a Raft group's state. Closely mirrors the upstream definitions in github.com/etcd-io/raft.

FieldTypeLabelDescriptionSupport status
replica_iduint64reserved
hard_stateraftpb.HardStatereserved
leaduint64Lead is part of Raft's HardState. However, it used to be part of SoftState, so we keep it here as a separate field for compatibility.reserved
statestringState is part of Raft's SoftState. It's not an enum because this is primarily for ui consumption and there are issues associated with them.reserved
applieduint64reserved
progressRaftState.ProgressEntryrepeatedreserved
lead_transfereeuint64reserved
lead_support_untilcockroach.util.hlc.Timestampreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftState.ProgressEntry"></a>

RaftState.ProgressEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRaftState.Progress

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftState.Progress"></a>

RaftState.Progress

FieldTypeLabelDescriptionSupport status
matchuint64reserved
nextuint64reserved
statestringreserved
pausedboolreserved
pending_snapshotuint64reserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RACStatus"></a>

RACStatus

RACStatus contains the status of the Replication Admission Control component of a range.

FieldTypeLabelDescriptionSupport status
next_raft_indexuint64reserved
force_flush_indexuint64reserved
streamsRACStatus.StreamsEntryrepeatedreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RACStatus.StreamsEntry"></a>

RACStatus.StreamsEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRACStatus.Stream

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RACStatus.Stream"></a>

RACStatus.Stream

FieldTypeLabelDescriptionSupport status
index_to_senduint64reserved
next_raft_index_initialuint64reserved
force_flush_stop_indexuint64reserved
eval_tokens_heldint64repeatedreserved
send_tokens_heldint64repeatedreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RangeProblems"></a>

RangeProblems

RangeProblems describes issues reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
unavailableboolreserved
leader_not_lease_holderboolreserved
no_raft_leaderboolreserved
underreplicatedboolreserved
overreplicatedboolreserved
no_leaseboolreserved
quiescent_equals_tickingboolQuiescent ranges do not tick by definition, but we track this in two different ways and suspect that they're getting out of sync. If the replica's quiescent flag doesn't agree with the store's list of replicas that are ticking, warn about it.reserved
raft_log_too_largeboolWhen the raft log is too large, it can be a symptom of other issues.reserved
circuit_breaker_errorboolreserved
paused_followersboolreserved
range_too_largeboolreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RangeStatistics"></a>

RangeStatistics

RangeStatistics describes statistics reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
queries_per_seconddoubleQueries per second (batch requests) served by this range per second, averaged over the last 30 minute period.reserved
writes_per_seconddoubleWrites per second served is the number of keys written to this range per second, averaged over the last 30 minute period.reserved
requests_per_seconddoubleRequests per second is the number of requests served by this range per second, averaged over the last 30 minute period.reserved
reads_per_seconddoubleReads per second served is the number of keys read from this range per second, averaged over the last 30 minute period.reserved
write_bytes_per_seconddoubleWrites (bytes) per second is the number of bytes written to this range per second, averaged over the last 30 minute period.reserved
read_bytes_per_seconddoubleReads (bytes) per second is the number of bytes read from this range per second, averaged over the last 30 minute period.reserved
cpu_time_per_seconddoubleCPU time (ns) per second is the cpu usage of this range per second, averaged over the last 30 minute period.reserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RangeInfo.LockInfo"></a>

RangeInfo.LockInfo

FieldTypeLabelDescriptionSupport status
pretty_keystringreserved
keybytesreserved
heldboolreserved
waitersint64reserved
waiting_readersint64reserved
waiting_writersint64reserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

<a name="cockroach.server.serverpb.RaftDebugResponse-cockroach.server.serverpb.RaftRangeError"></a>

RaftRangeError

FieldTypeLabelDescriptionSupport status
messagestringreserved

Ranges

GET /_status/ranges/{node_id}

Ranges requests internal details about ranges on a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
range_idsint64repeatedreserved
limitint32The pagination limit to use, if set. NB: Pagination is based on ascending RangeID.reserved
offsetint32The pagination offset to use, if set. NB: Pagination is based on ascending RangeID.reserved
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
rangesRangeInforepeatedreserved
nextint32The next pagination offset to use, if any results remain. A value of 0 indicates no more results. NB: Pagination is based on ascending RangeID.reserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RangeInfo"></a>

RangeInfo

FieldTypeLabelDescriptionSupport status
spanPrettySpanreserved
raft_stateRaftStatereserved
rac_statusRACStatusreserved
statecockroach.kv.kvserver.storagepb.RangeInforeserved
source_node_idint32reserved
source_store_idint32reserved
error_messagestringreserved
lease_historycockroach.roachpb.Leaserepeatedreserved
problemsRangeProblemsreserved
statsRangeStatisticsreserved
lease_statuscockroach.kv.kvserver.storagepb.LeaseStatusreserved
quiescentboolreserved
tickingboolreserved
read_latchesint64reserved
write_latchesint64reserved
locksint64reserved
locks_with_wait_queuesint64reserved
lock_wait_queue_waitersint64reserved
top_k_locks_by_wait_queue_waitersRangeInfo.LockInforepeatedreserved
localityLocalityreserved
is_leaseholderboolreserved
lease_validboolNext tag: 26reserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.PrettySpan"></a>

PrettySpan

FieldTypeLabelDescriptionSupport status
start_keystringreserved
end_keystringreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RaftState"></a>

RaftState

RaftState gives internal details about a Raft group's state. Closely mirrors the upstream definitions in github.com/etcd-io/raft.

FieldTypeLabelDescriptionSupport status
replica_iduint64reserved
hard_stateraftpb.HardStatereserved
leaduint64Lead is part of Raft's HardState. However, it used to be part of SoftState, so we keep it here as a separate field for compatibility.reserved
statestringState is part of Raft's SoftState. It's not an enum because this is primarily for ui consumption and there are issues associated with them.reserved
applieduint64reserved
progressRaftState.ProgressEntryrepeatedreserved
lead_transfereeuint64reserved
lead_support_untilcockroach.util.hlc.Timestampreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RaftState.ProgressEntry"></a>

RaftState.ProgressEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRaftState.Progress

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RaftState.Progress"></a>

RaftState.Progress

FieldTypeLabelDescriptionSupport status
matchuint64reserved
nextuint64reserved
statestringreserved
pausedboolreserved
pending_snapshotuint64reserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RACStatus"></a>

RACStatus

RACStatus contains the status of the Replication Admission Control component of a range.

FieldTypeLabelDescriptionSupport status
next_raft_indexuint64reserved
force_flush_indexuint64reserved
streamsRACStatus.StreamsEntryrepeatedreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RACStatus.StreamsEntry"></a>

RACStatus.StreamsEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRACStatus.Stream

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RACStatus.Stream"></a>

RACStatus.Stream

FieldTypeLabelDescriptionSupport status
index_to_senduint64reserved
next_raft_index_initialuint64reserved
force_flush_stop_indexuint64reserved
eval_tokens_heldint64repeatedreserved
send_tokens_heldint64repeatedreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RangeProblems"></a>

RangeProblems

RangeProblems describes issues reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
unavailableboolreserved
leader_not_lease_holderboolreserved
no_raft_leaderboolreserved
underreplicatedboolreserved
overreplicatedboolreserved
no_leaseboolreserved
quiescent_equals_tickingboolQuiescent ranges do not tick by definition, but we track this in two different ways and suspect that they're getting out of sync. If the replica's quiescent flag doesn't agree with the store's list of replicas that are ticking, warn about it.reserved
raft_log_too_largeboolWhen the raft log is too large, it can be a symptom of other issues.reserved
circuit_breaker_errorboolreserved
paused_followersboolreserved
range_too_largeboolreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RangeStatistics"></a>

RangeStatistics

RangeStatistics describes statistics reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
queries_per_seconddoubleQueries per second (batch requests) served by this range per second, averaged over the last 30 minute period.reserved
writes_per_seconddoubleWrites per second served is the number of keys written to this range per second, averaged over the last 30 minute period.reserved
requests_per_seconddoubleRequests per second is the number of requests served by this range per second, averaged over the last 30 minute period.reserved
reads_per_seconddoubleReads per second served is the number of keys read from this range per second, averaged over the last 30 minute period.reserved
write_bytes_per_seconddoubleWrites (bytes) per second is the number of bytes written to this range per second, averaged over the last 30 minute period.reserved
read_bytes_per_seconddoubleReads (bytes) per second is the number of bytes read from this range per second, averaged over the last 30 minute period.reserved
cpu_time_per_seconddoubleCPU time (ns) per second is the cpu usage of this range per second, averaged over the last 30 minute period.reserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.RangeInfo.LockInfo"></a>

RangeInfo.LockInfo

FieldTypeLabelDescriptionSupport status
pretty_keystringreserved
keybytesreserved
heldboolreserved
waitersint64reserved
waiting_readersint64reserved
waiting_writersint64reserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.RangesResponse-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

TenantServiceStatus

GET /_status/tenant_service_status

TenantServiceStatus returns the current service and data state of the given tenant as known to the server orchestrator, which may differ from the database state.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved
tenant_iduint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
status_by_node_idTenantServiceStatusResponse.StatusByNodeIdEntryrepeatedreserved
errors_by_node_idTenantServiceStatusResponse.ErrorsByNodeIdEntryrepeatedreserved

<a name="cockroach.server.serverpb.TenantServiceStatusResponse-cockroach.server.serverpb.TenantServiceStatusResponse.StatusByNodeIdEntry"></a>

TenantServiceStatusResponse.StatusByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.multitenant.SQLInfo

<a name="cockroach.server.serverpb.TenantServiceStatusResponse-cockroach.server.serverpb.TenantServiceStatusResponse.ErrorsByNodeIdEntry"></a>

TenantServiceStatusResponse.ErrorsByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuestring

TenantRanges

GET /_status/tenant_ranges

TenantRanges requests internal details about all range replicas within the tenant's keyspace at the time the request is processed.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
limitint32The pagination limit. This limit will be applied to each node, meaning that if a range is replicated 3 times, 3*limit elements will be returned. NB: Pagination here is based on ascending RangeID.reserved
offsetint32The pagination offset. NB: Pagination here is based on ascending RangeID.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
ranges_by_localityTenantRangesResponse.RangesByLocalityEntryrepeatedranges_by_locality maps each range replica to its specified availability zone, as defined within the replica's locality metadata (default key az). Replicas without the default available zone key set will fall under the locality-unset key.reserved
nextint32The next offset, if pagination was used. NB: Pagination here is based on ascending RangeID.reserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.TenantRangesResponse.RangesByLocalityEntry"></a>

TenantRangesResponse.RangesByLocalityEntry

FieldTypeLabelDescriptionSupport status
keystring
valueTenantRangesResponse.TenantRangeList

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.TenantRangesResponse.TenantRangeList"></a>

TenantRangesResponse.TenantRangeList

FieldTypeLabelDescriptionSupport status
rangesTenantRangeInforepeatedreserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.TenantRangeInfo"></a>

TenantRangeInfo

TenantRangeInfo provides metadata about a specific range replica, where concepts not considered to be relevant within the tenant abstraction (e.g. NodeIDs) are omitted. Instead, Locality information is used to distinguish replicas.

FieldTypeLabelDescriptionSupport status
range_idint64The ID of the Range.reserved
spanPrettySpanThe pretty-printed key span of the range.reserved
localityLocalityAny locality information associated with this specific replica.reserved
is_leaseholderboolWhether the range's specific replica is a leaseholder.reserved
lease_validboolWhether the range's specific replica holds a valid lease.reserved
range_statsRangeStatisticsStatistics about the range replica, e.g. QPS, WPS.reserved
mvcc_statscockroach.storage.enginepb.MVCCStatsMVCC stats about the range replica, e.g. live_bytes.reserved
read_latchesint64Read count as reported by the range replica's spanlatch.Manager.reserved
write_latchesint64Write count as reported by the range replica's spanlatch.Manager.reserved
locksint64The number of locks as reported by the range replica's lockTable.reserved
locks_with_wait_queuesint64The number of locks with non-empty wait-queues as reported by the range replica's lockTablereserved
lock_wait_queue_waitersint64The aggregate number of waiters in wait-queues across all locks as reported by the range replica's lockTablereserved
top_k_locks_by_wait_queue_waitersTenantRangeInfo.LockInforepeatedThe top-k locks with the most waiters (readers + writers) in their wait-queue, ordered in descending order.reserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.PrettySpan"></a>

PrettySpan

FieldTypeLabelDescriptionSupport status
start_keystringreserved
end_keystringreserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.RangeStatistics"></a>

RangeStatistics

RangeStatistics describes statistics reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
queries_per_seconddoubleQueries per second (batch requests) served by this range per second, averaged over the last 30 minute period.reserved
writes_per_seconddoubleWrites per second served is the number of keys written to this range per second, averaged over the last 30 minute period.reserved
requests_per_seconddoubleRequests per second is the number of requests served by this range per second, averaged over the last 30 minute period.reserved
reads_per_seconddoubleReads per second served is the number of keys read from this range per second, averaged over the last 30 minute period.reserved
write_bytes_per_seconddoubleWrites (bytes) per second is the number of bytes written to this range per second, averaged over the last 30 minute period.reserved
read_bytes_per_seconddoubleReads (bytes) per second is the number of bytes read from this range per second, averaged over the last 30 minute period.reserved
cpu_time_per_seconddoubleCPU time (ns) per second is the cpu usage of this range per second, averaged over the last 30 minute period.reserved

<a name="cockroach.server.serverpb.TenantRangesResponse-cockroach.server.serverpb.TenantRangeInfo.LockInfo"></a>

TenantRangeInfo.LockInfo

LockInfo provides metadata about the state of a single lock in the range replica's lockTable.

FieldTypeLabelDescriptionSupport status
pretty_keystringThe lock's key in pretty format.reserved
keybytesThe lock's key.reserved
heldboolIs the lock actively held by a transaction, or just a reservation?reserved
waitersint64The number of waiters in the lock's wait queue.reserved
waiting_readersint64The number of waiting readers in the lock's wait queue.reserved
waiting_writersint64The number of waiting writers in the lock's wait queue.reserved

Gossip

GET /_status/gossip/{node_id}

Gossip retrieves gossip-level details about a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
redactboolredact, if true, requests redaction of sensitive data away from the API response.reserved

Response Parameters

EngineStats

GET /_status/enginestats/{node_id}

EngineStats retrieves statistics about a storage engine.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
stats_by_store_idEngineStatsResponse.StatsByStoreIdEntryrepeatedmaps store IDs to pretty-printed stats about the store's LSM.reserved

<a name="cockroach.server.serverpb.EngineStatsResponse-cockroach.server.serverpb.EngineStatsResponse.StatsByStoreIdEntry"></a>

EngineStatsResponse.StatsByStoreIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuestring

Allocator

GET /_status/allocator/node/{node_id}

Allocator retrieves statistics about the replica allocator.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved
range_idsint64repeatedreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
dry_runsAllocatorDryRunrepeatedreserved

<a name="cockroach.server.serverpb.AllocatorResponse-cockroach.server.serverpb.AllocatorDryRun"></a>

AllocatorDryRun

FieldTypeLabelDescriptionSupport status
range_idint64reserved
eventsTraceEventrepeatedreserved

<a name="cockroach.server.serverpb.AllocatorResponse-cockroach.server.serverpb.TraceEvent"></a>

TraceEvent

FieldTypeLabelDescriptionSupport status
timegoogle.protobuf.Timestampreserved
messagestringreserved

AllocatorRange

GET /_status/allocator/range/{range_id}

AllocatorRange retrieves statistics about the replica allocator given a specific range.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
range_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
node_idint64The NodeID of the store whose dry run is returned. Only the leaseholder for a given range will do an allocator dry run for it.reserved
dry_runAllocatorDryRunreserved

<a name="cockroach.server.serverpb.AllocatorRangeResponse-cockroach.server.serverpb.AllocatorDryRun"></a>

AllocatorDryRun

FieldTypeLabelDescriptionSupport status
range_idint64reserved
eventsTraceEventrepeatedreserved

<a name="cockroach.server.serverpb.AllocatorRangeResponse-cockroach.server.serverpb.TraceEvent"></a>

TraceEvent

FieldTypeLabelDescriptionSupport status
timegoogle.protobuf.Timestampreserved
messagestringreserved

ListSessions

GET /_status/sessions

ListSessions retrieves the SQL sessions across the entire cluster.

Support status: reserved

Request Parameters

Request object for ListSessions and ListLocalSessions.

FieldTypeLabelDescriptionSupport status
usernamestringUsername of the user making this request. The caller is responsible to normalize the username (= case fold and perform unicode NFC normalization).reserved
exclude_closed_sessionsboolBoolean to exclude closed sessions; if unspecified, defaults to false and closed sessions are included in the response.reserved
include_internalboolBoolean to surface internal sessions in the response. Note that this param currently serves as an override for the cluster setting sql.stats.response.show_internal.enabled until #87200 is addressed, and setting this param to false is equivalent to setting the value to sql.stats.response.show_internal.enabledreserved

Response Parameters

Response object for ListSessions and ListLocalSessions.

FieldTypeLabelDescriptionSupport status
sessionsSessionrepeatedA list of sessions on this node or cluster.reserved
errorsListSessionsErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved
internal_app_name_prefixstringIf set and non-empty, indicates the prefix to application_name used for statements/queries issued internally by CockroachDB.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.Session"></a>

Session

Session represents one SQL session.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node where this session exists.reserved
usernamestringUsername of the user for this session.reserved
client_addressstringConnected client's IP address and port.reserved
application_namestringApplication name specified by the client.reserved
active_queriesActiveQueryrepeatedQueries in progress on this session.reserved
startgoogle.protobuf.TimestampTimestamp of session's start.reserved
last_active_querystringSQL string of the last query executed on this session.reserved
idbytesID of the session (uint128 represented as raw bytes).reserved
alloc_bytesint64Number of currently allocated bytes in the session memory monitor.reserved
max_alloc_bytesint64High water mark of allocated bytes in the session memory monitor.reserved
active_txnTxnInfoInformation about the txn in progress on this session. Nil if the session doesn't currently have a transaction.reserved
last_active_query_no_constantsstringThe SQL statement fingerprint of the last query executed on this session, compatible with StatementStatisticsKey.reserved
statusSession.StatusThe session's status.reserved
endgoogle.protobuf.TimestampTimestamp of session's end.reserved
num_txns_executedint32Count of the number of transactions that have been opened on this session. This count includes transactions that are in progress.reserved
txn_fingerprint_idsuint64repeatedList of transaction fingerprint IDs in this session.reserved
total_active_timegoogle.protobuf.DurationThe session's total active time.reserved
pg_backend_piduint32The numerical ID attached to the session which is used to mimic a Postgres backend PID for compatibility with the query cancellation protocol. Unlike in Postgres, this value does not correspond to a real process ID.reserved
trace_iduint64The ID of the session's active trace. It will be 0 if tracing is off.reserved
goroutine_idint64The ID of the session's goroutine.reserved
authentication_methodstringreserved
default_isolation_levelstringThe session's default transaction isolation level.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.ActiveQuery"></a>

ActiveQuery

ActiveQuery represents a query in flight on some Session.

FieldTypeLabelDescriptionSupport status
idstringID of the query (uint128 presented as a hexadecimal string).reserved
txn_idbytesThe UUID of the transaction this query is running in.reserved
sqlstringSQL query string specified by the user.reserved
startgoogle.protobuf.TimestampStart timestamp of this query.reserved
is_distributedboolTrue if this query is distributed.reserved
phaseActiveQuery.Phasephase stores the current phase of execution for this query.reserved
progressfloatprogress is an estimate of the fraction of this query that has been processed.reserved
sql_no_constantsstringThe SQL statement fingerprint, compatible with StatementStatisticsKey.reserved
sql_summarystringA summarized version of the sql query.reserved
is_full_scanboolTrue if the query contains a full table or index scan. Note that this field is only valid if the query is in the EXECUTING phase.reserved
elapsed_timegoogle.protobuf.DurationTime elapsed since this query started execution.reserved
plan_giststringThe compressed plan that can be converted back into the statement's logical plan. Empty if the statement is in the PREPARING state.reserved
placeholdersstringrepeatedThe placeholders if any.reserved
databasestringThe database the statement was executed on.reserved
isolation_levelstringThe isolation level the query was run in.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.TxnInfo"></a>

TxnInfo

TxnInfo represents an in flight user transaction on some Session.

FieldTypeLabelDescriptionSupport status
idbytesreserved
startgoogle.protobuf.TimestampThe start timestamp of the transaction.reserved
txn_descriptionstringtxn_description is a text description of the underlying kv.Txn, intended for troubleshooting purposes.reserved
num_statements_executedint32num_statements_executed is the number of statements that were executed so far on this transaction.reserved
num_retriesint32num_retries is the number of times that this transaction was retried.reserved
num_auto_retriesint32num_retries is the number of times that this transaction was automatically retried by the SQL executor.reserved
deadlinegoogle.protobuf.TimestampThe deadline by which the transaction must be committed.reserved
implicitboolimplicit is true if this transaction was an implicit SQL transaction.reserved
alloc_bytesint64Number of currently allocated bytes in the txn memory monitor.reserved
max_alloc_bytesint64High water mark of allocated bytes in the txn memory monitor.reserved
read_onlyboolreserved
is_historicalboolreserved
prioritystringreserved
quality_of_servicestringreserved
last_auto_retry_reasonstringError message describing the cause for the txn's last automatic retry.reserved
elapsed_timegoogle.protobuf.DurationTime elapsed since this transaction started execution.reserved
isolation_levelstringThe isolation level of the transaction.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.ListSessionsError"></a>

ListSessionsError

An error wrapper object for ListSessionsResponse.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurredreserved
messagestringError message.reserved

ListLocalSessions

GET /_status/local_sessions

ListLocalSessions retrieves the SQL sessions on this node.

Support status: reserved

Request Parameters

Request object for ListSessions and ListLocalSessions.

FieldTypeLabelDescriptionSupport status
usernamestringUsername of the user making this request. The caller is responsible to normalize the username (= case fold and perform unicode NFC normalization).reserved
exclude_closed_sessionsboolBoolean to exclude closed sessions; if unspecified, defaults to false and closed sessions are included in the response.reserved
include_internalboolBoolean to surface internal sessions in the response. Note that this param currently serves as an override for the cluster setting sql.stats.response.show_internal.enabled until #87200 is addressed, and setting this param to false is equivalent to setting the value to sql.stats.response.show_internal.enabledreserved

Response Parameters

Response object for ListSessions and ListLocalSessions.

FieldTypeLabelDescriptionSupport status
sessionsSessionrepeatedA list of sessions on this node or cluster.reserved
errorsListSessionsErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved
internal_app_name_prefixstringIf set and non-empty, indicates the prefix to application_name used for statements/queries issued internally by CockroachDB.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.Session"></a>

Session

Session represents one SQL session.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node where this session exists.reserved
usernamestringUsername of the user for this session.reserved
client_addressstringConnected client's IP address and port.reserved
application_namestringApplication name specified by the client.reserved
active_queriesActiveQueryrepeatedQueries in progress on this session.reserved
startgoogle.protobuf.TimestampTimestamp of session's start.reserved
last_active_querystringSQL string of the last query executed on this session.reserved
idbytesID of the session (uint128 represented as raw bytes).reserved
alloc_bytesint64Number of currently allocated bytes in the session memory monitor.reserved
max_alloc_bytesint64High water mark of allocated bytes in the session memory monitor.reserved
active_txnTxnInfoInformation about the txn in progress on this session. Nil if the session doesn't currently have a transaction.reserved
last_active_query_no_constantsstringThe SQL statement fingerprint of the last query executed on this session, compatible with StatementStatisticsKey.reserved
statusSession.StatusThe session's status.reserved
endgoogle.protobuf.TimestampTimestamp of session's end.reserved
num_txns_executedint32Count of the number of transactions that have been opened on this session. This count includes transactions that are in progress.reserved
txn_fingerprint_idsuint64repeatedList of transaction fingerprint IDs in this session.reserved
total_active_timegoogle.protobuf.DurationThe session's total active time.reserved
pg_backend_piduint32The numerical ID attached to the session which is used to mimic a Postgres backend PID for compatibility with the query cancellation protocol. Unlike in Postgres, this value does not correspond to a real process ID.reserved
trace_iduint64The ID of the session's active trace. It will be 0 if tracing is off.reserved
goroutine_idint64The ID of the session's goroutine.reserved
authentication_methodstringreserved
default_isolation_levelstringThe session's default transaction isolation level.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.ActiveQuery"></a>

ActiveQuery

ActiveQuery represents a query in flight on some Session.

FieldTypeLabelDescriptionSupport status
idstringID of the query (uint128 presented as a hexadecimal string).reserved
txn_idbytesThe UUID of the transaction this query is running in.reserved
sqlstringSQL query string specified by the user.reserved
startgoogle.protobuf.TimestampStart timestamp of this query.reserved
is_distributedboolTrue if this query is distributed.reserved
phaseActiveQuery.Phasephase stores the current phase of execution for this query.reserved
progressfloatprogress is an estimate of the fraction of this query that has been processed.reserved
sql_no_constantsstringThe SQL statement fingerprint, compatible with StatementStatisticsKey.reserved
sql_summarystringA summarized version of the sql query.reserved
is_full_scanboolTrue if the query contains a full table or index scan. Note that this field is only valid if the query is in the EXECUTING phase.reserved
elapsed_timegoogle.protobuf.DurationTime elapsed since this query started execution.reserved
plan_giststringThe compressed plan that can be converted back into the statement's logical plan. Empty if the statement is in the PREPARING state.reserved
placeholdersstringrepeatedThe placeholders if any.reserved
databasestringThe database the statement was executed on.reserved
isolation_levelstringThe isolation level the query was run in.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.TxnInfo"></a>

TxnInfo

TxnInfo represents an in flight user transaction on some Session.

FieldTypeLabelDescriptionSupport status
idbytesreserved
startgoogle.protobuf.TimestampThe start timestamp of the transaction.reserved
txn_descriptionstringtxn_description is a text description of the underlying kv.Txn, intended for troubleshooting purposes.reserved
num_statements_executedint32num_statements_executed is the number of statements that were executed so far on this transaction.reserved
num_retriesint32num_retries is the number of times that this transaction was retried.reserved
num_auto_retriesint32num_retries is the number of times that this transaction was automatically retried by the SQL executor.reserved
deadlinegoogle.protobuf.TimestampThe deadline by which the transaction must be committed.reserved
implicitboolimplicit is true if this transaction was an implicit SQL transaction.reserved
alloc_bytesint64Number of currently allocated bytes in the txn memory monitor.reserved
max_alloc_bytesint64High water mark of allocated bytes in the txn memory monitor.reserved
read_onlyboolreserved
is_historicalboolreserved
prioritystringreserved
quality_of_servicestringreserved
last_auto_retry_reasonstringError message describing the cause for the txn's last automatic retry.reserved
elapsed_timegoogle.protobuf.DurationTime elapsed since this transaction started execution.reserved
isolation_levelstringThe isolation level of the transaction.reserved

<a name="cockroach.server.serverpb.ListSessionsResponse-cockroach.server.serverpb.ListSessionsError"></a>

ListSessionsError

An error wrapper object for ListSessionsResponse.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurredreserved
messagestringError message.reserved

CancelQuery

POST /_status/cancel_query/{node_id}

CancelQuery cancels a SQL query given its ID.

Support status: reserved

Request Parameters

Request object for issuing a query cancel request.

FieldTypeLabelDescriptionSupport status
node_idstringID of gateway node for the query to be canceled.

TODO(itsbilal): use [(gogoproto.customname) = "NodeID"] below. Need to figure out how to teach grpc-gateway about custom names.

node_id is a string so that "local" can be used to specify that no forwarding is necessary. | reserved | | query_id | string | | ID of query to be canceled (converted to string). | reserved | | username | string | | Username of the user making this cancellation request. This may be omitted if the user is the same as the one issuing the CancelQueryRequest. The caller is responsible for case-folding and NFC normalization. | reserved |

Response Parameters

Response returned by target query's gateway node.

FieldTypeLabelDescriptionSupport status
canceledboolWhether the cancellation request succeeded and the query was canceled.reserved
errorstringError message (accompanied with canceled = false).reserved

CancelQueryByKey

CancelQueryByKey cancels a SQL query given its pgwire BackendKeyData. It is invoked through the pgwire protocol, so it's not exposed as an HTTP endpoint.

Support status: reserved

Request Parameters

Request object for issuing a pgwire query cancel request.

FieldTypeLabelDescriptionSupport status
sql_instance_idint32The SQLInstanceID of the gateway node for the query to be canceled.reserved
cancel_query_keyuint64The key that was generated during session initialization as part of the pgwire protocol.reserved

Response Parameters

Response returned by target query's gateway node for a pgwire cancel request.

FieldTypeLabelDescriptionSupport status
canceledboolWhether the cancellation request succeeded and the query was canceled.reserved
errorstringError message (accompanied with canceled = false).reserved

ListContentionEvents

GET /_status/contention_events

ListContentionEvents retrieves the contention events across the entire cluster.

For SQL keys the following orderings are maintained:

  • on the highest level, all IndexContentionEvents objects are ordered according to their importance (as defined by the number of contention events within each object).
  • on the middle level, all SingleKeyContention objects are ordered by their keys lexicographically.
  • on the lowest level, all SingleTxnContention objects are ordered by the number of times that transaction was observed to contend with other transactions.

For non-SQL keys the following orderings are maintained:

  • on the top level, all SingleNonSQLKeyContention objects are ordered by their keys lexicographically.
  • on the bottom level, all SingleTxnContention objects are ordered by the number of times that transaction was observed to contend with other transactions.

Support status: reserved

Request Parameters

Request object for ListContentionEvents and ListLocalContentionEvents.

Response Parameters

Response object for ListContentionEvents and ListLocalContentionEvents.

FieldTypeLabelDescriptionSupport status
eventscockroach.sql.contentionpb.SerializedRegistryAll available contention information on this node or cluster.reserved
errorsListActivityErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved

<a name="cockroach.server.serverpb.ListContentionEventsResponse-cockroach.server.serverpb.ListActivityError"></a>

ListActivityError

An error wrapper object for ListContentionEventsResponse and ListDistSQLFlowsResponse. Similar to the Statements endpoint, when implemented on a tenant, the node_id field refers to the instanceIDs that identify individual tenant pods.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurred.reserved
messagestringError message.reserved

ListLocalContentionEvents

GET /_status/local_contention_events

ListLocalContentionEvents retrieves the contention events on this node.

For SQL keys the following orderings are maintained:

  • on the highest level, all IndexContentionEvents objects are ordered according to their importance (as defined by the number of contention events within each object).
  • on the middle level, all SingleKeyContention objects are ordered by their keys lexicographically.
  • on the lowest level, all SingleTxnContention objects are ordered by the number of times that transaction was observed to contend with other transactions.

For non-SQL keys the following orderings are maintained:

  • on the top level, all SingleNonSQLKeyContention objects are ordered by their keys lexicographically.
  • on the bottom level, all SingleTxnContention objects are ordered by the number of times that transaction was observed to contend with other transactions.

Support status: reserved

Request Parameters

Request object for ListContentionEvents and ListLocalContentionEvents.

Response Parameters

Response object for ListContentionEvents and ListLocalContentionEvents.

FieldTypeLabelDescriptionSupport status
eventscockroach.sql.contentionpb.SerializedRegistryAll available contention information on this node or cluster.reserved
errorsListActivityErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved

<a name="cockroach.server.serverpb.ListContentionEventsResponse-cockroach.server.serverpb.ListActivityError"></a>

ListActivityError

An error wrapper object for ListContentionEventsResponse and ListDistSQLFlowsResponse. Similar to the Statements endpoint, when implemented on a tenant, the node_id field refers to the instanceIDs that identify individual tenant pods.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurred.reserved
messagestringError message.reserved

ListDistSQLFlows

GET /_status/distsql_flows

ListDistSQLFlows retrieves all of the remote flows of the DistSQL execution that are currently running or queued on any node in the cluster. The local flows (those that are running on the same node as the query originated on) are not included.

Flows are ordered lexicographically by the flow ID.

Support status: reserved

Request Parameters

Request object for ListDistSQLFlows and ListLocalDistSQLFlows.

Response Parameters

Response object for ListDistSQLFlows and ListLocalDistSQLFlows.

FieldTypeLabelDescriptionSupport status
flowsDistSQLRemoteFlowsrepeatedFlows are ordered by FlowID lexicographically and do not contain duplicates.reserved
errorsListActivityErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.DistSQLRemoteFlows"></a>

DistSQLRemoteFlows

DistSQLRemoteFlows describes all DistSQL remote flows that are part of the same physical plan. The gateway node that initiated the execution of the plan isn't included.

FieldTypeLabelDescriptionSupport status
flow_idbytesFlowID is the unique identifier of the physical plan shared by all remote flows.reserved
infosDistSQLRemoteFlows.InforepeatedInfos contains the information about all remote flows that are part of this DistSQL physical plan and that haven't finished yet.

The slice doesn't contain duplicate NodeIDs and is sorted by NodeID in ASC order. | reserved |

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.DistSQLRemoteFlows.Info"></a>

DistSQLRemoteFlows.Info

Info contains an information about a single DistSQL remote flow.

FieldTypeLabelDescriptionSupport status
node_idint32NodeID is the node on which this remote flow is either running or queued.reserved
timestampgoogle.protobuf.TimestampTimestamp must be in the UTC timezone.reserved
stmtstringStmt is the SQL statement for which this flow is executing.reserved

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.ListActivityError"></a>

ListActivityError

An error wrapper object for ListContentionEventsResponse and ListDistSQLFlowsResponse. Similar to the Statements endpoint, when implemented on a tenant, the node_id field refers to the instanceIDs that identify individual tenant pods.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurred.reserved
messagestringError message.reserved

ListLocalDistSQLFlows

GET /_status/local_distsql_flows

ListLocalDistSQLFlows retrieves all of the remote flows of the DistSQL execution that are currently running or queued on this node in the cluster. Queries that originated on this node are not be included.

Flows are ordered lexicographically by the flow ID.

Support status: reserved

Request Parameters

Request object for ListDistSQLFlows and ListLocalDistSQLFlows.

Response Parameters

Response object for ListDistSQLFlows and ListLocalDistSQLFlows.

FieldTypeLabelDescriptionSupport status
flowsDistSQLRemoteFlowsrepeatedFlows are ordered by FlowID lexicographically and do not contain duplicates.reserved
errorsListActivityErrorrepeatedAny errors that occurred during fan-out calls to other nodes.reserved

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.DistSQLRemoteFlows"></a>

DistSQLRemoteFlows

DistSQLRemoteFlows describes all DistSQL remote flows that are part of the same physical plan. The gateway node that initiated the execution of the plan isn't included.

FieldTypeLabelDescriptionSupport status
flow_idbytesFlowID is the unique identifier of the physical plan shared by all remote flows.reserved
infosDistSQLRemoteFlows.InforepeatedInfos contains the information about all remote flows that are part of this DistSQL physical plan and that haven't finished yet.

The slice doesn't contain duplicate NodeIDs and is sorted by NodeID in ASC order. | reserved |

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.DistSQLRemoteFlows.Info"></a>

DistSQLRemoteFlows.Info

Info contains an information about a single DistSQL remote flow.

FieldTypeLabelDescriptionSupport status
node_idint32NodeID is the node on which this remote flow is either running or queued.reserved
timestampgoogle.protobuf.TimestampTimestamp must be in the UTC timezone.reserved
stmtstringStmt is the SQL statement for which this flow is executing.reserved

<a name="cockroach.server.serverpb.ListDistSQLFlowsResponse-cockroach.server.serverpb.ListActivityError"></a>

ListActivityError

An error wrapper object for ListContentionEventsResponse and ListDistSQLFlowsResponse. Similar to the Statements endpoint, when implemented on a tenant, the node_id field refers to the instanceIDs that identify individual tenant pods.

FieldTypeLabelDescriptionSupport status
node_idint32ID of node that was being contacted when this error occurred.reserved
messagestringError message.reserved

CancelSession

POST /_status/cancel_session/{node_id}

CancelSessions forcefully terminates a SQL session given its ID.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringTODO(abhimadan): use [(gogoproto.customname) = "NodeID"] below. Need to figure out how to teach grpc-gateway about custom names.

node_id is a string so that "local" can be used to specify that no forwarding is necessary. | reserved | | session_id | bytes | | | reserved | | username | string | | Username of the user making this cancellation request. This may be omitted if the user is the same as the one issuing the CancelSessionRequest. The caller is responsible for case-folding and NFC normalization. | reserved |

Response Parameters

FieldTypeLabelDescriptionSupport status
canceledboolreserved
errorstringreserved

SpanStats

POST /_status/span

SpanStats accepts a key span and node ID, and returns a set of stats summed from all ranges on the stores on that node which contain keys in that span. This is designed to compute stats specific to a SQL table: it will be called with the highest/lowest key for a SQL table, and return information about the resources on a node used by that table.

Support status: reserved

Request Parameters

Response Parameters

CriticalNodes

POST /_status/critical_nodes

CriticalNodes retrieves nodes that are considered critical. A critical node is one whose unexpected termination could result in data loss. A node is considered critical if any of its replicas are unavailable or under-replicated. The response includes a list of node descriptors that are considered critical, and the corresponding SpanConfigConformanceReport that includes details of non-conforming ranges contributing to the criticality.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
critical_nodescockroach.roachpb.NodeDescriptorrepeatedreserved
reportcockroach.roachpb.SpanConfigConformanceReportreserved

Stacks

GET /_status/stacks/{node_id}

Stacks retrieves the stack traces of all goroutines on a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary. node_id translates to a KV node ID on a storage server and SQL instance ID on a SQL only server.reserved
typeStacksTypereserved

Response Parameters

FieldTypeLabelDescriptionSupport status
databytesreserved

Profile

GET /_status/profile/{node_id}

Profile retrieves a CPU profile on a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" or "all" can be used to specify that no forwarding is necessary. node_id translates to a KV node ID on a storage server and SQL instance ID on a SQL only server.reserved
typeProfileRequest.TypeThe type of profile to retrieve.reserved
secondsint32applies only to Type=CPU, defaults to 30reserved
labelsboolLabels can be specified for Type=CPU or Type=GOROUTINE.
  • If true for CPU profiles, we request a CPU profile with pprof labels.

  • If true for GOROUTINE profiles, we request an aggregated goroutine profile with debug=1. | reserved | | label_filter | string | | LabelFilter only applies to Type=GOROUTINE. Only goroutines with a pprof label matching the filter will be returned. | reserved | | sender_server_version | cockroach.roachpb.Version | | SenderServerVersion is the server version of the node sending the Profile request. If this field is set then the node processing the request will only collect the profile if its server version is equal to the sender's server version.

Currently, this is only used when collecting profiles that will be merged using pprof.Merge as all the samples must be from the same binary version. | reserved |

Response Parameters

FieldTypeLabelDescriptionSupport status
databytesreserved

Metrics

GET /_status/metrics/{node_id}

Metrics retrieves the node metrics for a given node.

Note: this is a “reserved” API and should not be relied upon to build external tools. No guarantee is made about its availability and stability in external uses.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
databytesreserved

GetFiles

GET /_status/files/{node_id}

GetFiles retrieves heap or goroutine dump files from a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary. node_id translates to a KV node ID on a storage server and SQL instance ID on a SQL only server.reserved
list_onlyboolIf list_only is true then the contents of the files will not be populated in the response. Only filenames and sizes will be returned.reserved
typeFileTypereserved
patternsstringrepeatedEach pattern given is matched with Files of the above type in the node using filepath.Glob(). The patterns only match to filenames and so path separators cannot be used. Example: * will match all files of requested type.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
filesFilerepeatedreserved

<a name="cockroach.server.serverpb.GetFilesResponse-cockroach.server.serverpb.File"></a>

File

FieldTypeLabelDescriptionSupport status
namestringreserved
file_sizeint64reserved
contentsbytesContents may not be populated if only a list of Files are requested.reserved

LogFilesList

GET /_status/logfiles/{node_id}

LogFilesList retrieves a list of log files on a given node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
filescockroach.util.log.FileInforepeatedfiles is the list of log files under this node's configured logging directories. Note that the response does not contain detail about which directory contains which file. The location of each file is known to the server based on its name and the logging configuration.reserved

LogFile

GET /_status/logfiles/{node_id}/{file}

LogFile retrieves a given log file.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
filestringfile is the name of the log file to retrieve. Note that it must not be prefixed by a directory name. The full path to the file is computed by the server based on the base name and the logging configuration.reserved
redactboolredact, if true, requests redaction of sensitive data away from the retrieved log entries. Only admin users can send a request with redact = false.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
entriescockroach.util.log.Entryrepeatedreserved
parse_errorsstringrepeatedparse_errors contains list of errors that occurred during retrieving individual log entries that don't prevent to return at least partial response.reserved

Logs

GET /_status/logs/{node_id}

Logs retrieves individual log entries.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved
levelstringreserved
start_timestringreserved
end_timestringreserved
maxstringreserved
patternstringreserved
redactboolredact, if true, requests redaction of sensitive data away from the retrieved log entries. Only admin users can send a request with redact = false.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
entriescockroach.util.log.Entryrepeatedreserved
parse_errorsstringrepeatedparse_errors contains list of errors that occurred during retrieving individual log entries that don't prevent to return at least partial response.reserved

ProblemRanges

GET /_status/problemranges

ProblemRanges retrieves the list of “problem ranges”.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringIf left empty, problem ranges for all nodes/stores will be returned.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
node_idint32NodeID is the node that submitted all the requests.reserved
problems_by_node_idProblemRangesResponse.ProblemsByNodeIdEntryrepeatedreserved

<a name="cockroach.server.serverpb.ProblemRangesResponse-cockroach.server.serverpb.ProblemRangesResponse.ProblemsByNodeIdEntry"></a>

ProblemRangesResponse.ProblemsByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueProblemRangesResponse.NodeProblems

<a name="cockroach.server.serverpb.ProblemRangesResponse-cockroach.server.serverpb.ProblemRangesResponse.NodeProblems"></a>

ProblemRangesResponse.NodeProblems

FieldTypeLabelDescriptionSupport status
error_messagestringreserved
unavailable_range_idsint64repeatedreserved
raft_leader_not_lease_holder_range_idsint64repeatedreserved
no_raft_leader_range_idsint64repeatedreserved
no_lease_range_idsint64repeatedreserved
underreplicated_range_idsint64repeatedreserved
overreplicated_range_idsint64repeatedreserved
quiescent_equals_ticking_range_idsint64repeatedreserved
raft_log_too_large_range_idsint64repeatedreserved
circuit_breaker_error_range_idsint64repeatedreserved
paused_replica_idsint64repeatedreserved
too_large_range_idsint64repeatedreserved

DownloadSpan

GET /_status/downloadspans

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved
spanscockroach.roachpb.Spanrepeatedreserved
via_backing_file_downloadboolreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
errorsDownloadSpanResponse.ErrorsEntryrepeatedreserved

<a name="cockroach.server.serverpb.DownloadSpanResponse-cockroach.server.serverpb.DownloadSpanResponse.ErrorsEntry"></a>

DownloadSpanResponse.ErrorsEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.errorspb.EncodedError

HotRangesV2

POST /_status/v2/hotranges

Support status: reserved

Request Parameters

HotRangesRequest queries one or more cluster nodes for a list of ranges currently considered “hot” by the node(s).

FieldTypeLabelDescriptionSupport status
node_idstringNodeID indicates which node to query for a hot range report. It is possible to populate any node ID; if the node receiving the request is not the target node, it will forward the request to the target node.

If left empty, the request is forwarded to every node in the cluster. | alpha | | page_size | int32 | | | reserved | | page_token | string | | | reserved | | tenant_id | string | | | reserved | | nodes | string | repeated | | reserved | | per_node_limit | int32 | | per_node_limit indicates the maximum number of hot ranges to return for each node. If left empty, the default is 128. | reserved | | stats_only | bool | | stats_only indicates whether to return only the stats for the hot ranges, without pulling descriptor information. | reserved |

Response Parameters

HotRangesResponseV2 is a response payload returned by HotRangesV2 service.

FieldTypeLabelDescriptionSupport status
rangesHotRangesResponseV2.HotRangerepeatedRanges contain list of hot ranges info that has highest number of QPS.reserved
errors_by_node_idHotRangesResponseV2.ErrorsByNodeIdEntryrepeatederrors contains any errors that occurred during fan-out calls to other nodes.reserved
next_page_tokenstringNextPageToken represents next pagination token to request next slice of data.reserved

<a name="cockroach.server.serverpb.HotRangesResponseV2-cockroach.server.serverpb.HotRangesResponseV2.HotRange"></a>

HotRangesResponseV2.HotRange

HotRange message describes a single hot range, ie its QPS, node ID it belongs to, etc.

FieldTypeLabelDescriptionSupport status
range_idint32range_id indicates Range ID that's identified as hot range.reserved
node_idint32node_id indicates the node that contains the current hot range.reserved
qpsdoubleqps (queries per second) shows the amount of queries that interact with current range.reserved
replica_node_idsint32repeatedreplica_node_ids specifies the list of node ids that contain replicas with current hot range.reserved
leaseholder_node_idint32leaseholder_node_id indicates the Node ID that is the current leaseholder for the given range.reserved
schema_namestringschema_name provides the name of schema (if exists) for table in current range.reserved
store_idint32store_id indicates the Store ID where range is stored.reserved
writes_per_seconddoublewrites_per_second is the recent number of keys written per second on this range.reserved
reads_per_seconddoublereads_per_second is the recent number of keys read per second on this range.reserved
write_bytes_per_seconddoublewrite_bytes_per_second is the recent number of bytes written per second on this range.reserved
read_bytes_per_seconddoubleread_bytes_per_second is the recent number of bytes read per second on this range.reserved
cpu_time_per_seconddoubleCPU time (ns) per second is the recent cpu usage per second on this range.reserved
databasesstringrepeatedDatabases for the range.reserved
tablesstringrepeatedTables for the rangereserved
indexesstringrepeatedIndexes for the rangereserved
desccockroach.roachpb.RangeDescriptorRange Descriptor for the rangereserved

<a name="cockroach.server.serverpb.HotRangesResponseV2-cockroach.server.serverpb.HotRangesResponseV2.ErrorsByNodeIdEntry"></a>

HotRangesResponseV2.ErrorsByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuestring

KeyVisSamples

POST /_status/keyvissamples

Support status: reserved

Request Parameters

Response Parameters

KeyVisSamplesResponse returns a space-efficient representation of key visualizer samples. Spans are deduplicated, and are referenced by uuid.

FieldTypeLabelDescriptionSupport status
pretty_key_for_uuidKeyVisSamplesResponse.PrettyKeyForUuidEntryrepeatedpretty_key_for_uuid is a mapping of hex-encoded UUIDs to pretty keys.reserved
sorted_pretty_keysstringrepeatedreserved
samplesKeyVisSamplesResponse.KeyVisSamplerepeatedreserved

<a name="cockroach.server.serverpb.KeyVisSamplesResponse-cockroach.server.serverpb.KeyVisSamplesResponse.PrettyKeyForUuidEntry"></a>

KeyVisSamplesResponse.PrettyKeyForUuidEntry

FieldTypeLabelDescriptionSupport status
keystring
valuestring

<a name="cockroach.server.serverpb.KeyVisSamplesResponse-cockroach.server.serverpb.KeyVisSamplesResponse.KeyVisSample"></a>

KeyVisSamplesResponse.KeyVisSample

FieldTypeLabelDescriptionSupport status
timestampgoogle.protobuf.Timestampreserved
bucketsKeyVisSamplesResponse.Bucketrepeatedreserved

<a name="cockroach.server.serverpb.KeyVisSamplesResponse-cockroach.server.serverpb.KeyVisSamplesResponse.Bucket"></a>

KeyVisSamplesResponse.Bucket

FieldTypeLabelDescriptionSupport status
start_key_idbytesreserved
end_key_idbytesreserved
requestsuint64reserved

Range

GET /_status/range/{range_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
range_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
node_idint32NodeID is the node that submitted all the requests.reserved
range_idint64reserved
responses_by_node_idRangeResponse.ResponsesByNodeIdEntryrepeatedreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeResponse.ResponsesByNodeIdEntry"></a>

RangeResponse.ResponsesByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueRangeResponse.NodeResponse

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeResponse.NodeResponse"></a>

RangeResponse.NodeResponse

FieldTypeLabelDescriptionSupport status
responseboolreserved
error_messagestringreserved
infosRangeInforepeatedreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeInfo"></a>

RangeInfo

FieldTypeLabelDescriptionSupport status
spanPrettySpanreserved
raft_stateRaftStatereserved
rac_statusRACStatusreserved
statecockroach.kv.kvserver.storagepb.RangeInforeserved
source_node_idint32reserved
source_store_idint32reserved
error_messagestringreserved
lease_historycockroach.roachpb.Leaserepeatedreserved
problemsRangeProblemsreserved
statsRangeStatisticsreserved
lease_statuscockroach.kv.kvserver.storagepb.LeaseStatusreserved
quiescentboolreserved
tickingboolreserved
read_latchesint64reserved
write_latchesint64reserved
locksint64reserved
locks_with_wait_queuesint64reserved
lock_wait_queue_waitersint64reserved
top_k_locks_by_wait_queue_waitersRangeInfo.LockInforepeatedreserved
localityLocalityreserved
is_leaseholderboolreserved
lease_validboolNext tag: 26reserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.PrettySpan"></a>

PrettySpan

FieldTypeLabelDescriptionSupport status
start_keystringreserved
end_keystringreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RaftState"></a>

RaftState

RaftState gives internal details about a Raft group's state. Closely mirrors the upstream definitions in github.com/etcd-io/raft.

FieldTypeLabelDescriptionSupport status
replica_iduint64reserved
hard_stateraftpb.HardStatereserved
leaduint64Lead is part of Raft's HardState. However, it used to be part of SoftState, so we keep it here as a separate field for compatibility.reserved
statestringState is part of Raft's SoftState. It's not an enum because this is primarily for ui consumption and there are issues associated with them.reserved
applieduint64reserved
progressRaftState.ProgressEntryrepeatedreserved
lead_transfereeuint64reserved
lead_support_untilcockroach.util.hlc.Timestampreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RaftState.ProgressEntry"></a>

RaftState.ProgressEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRaftState.Progress

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RaftState.Progress"></a>

RaftState.Progress

FieldTypeLabelDescriptionSupport status
matchuint64reserved
nextuint64reserved
statestringreserved
pausedboolreserved
pending_snapshotuint64reserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RACStatus"></a>

RACStatus

RACStatus contains the status of the Replication Admission Control component of a range.

FieldTypeLabelDescriptionSupport status
next_raft_indexuint64reserved
force_flush_indexuint64reserved
streamsRACStatus.StreamsEntryrepeatedreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RACStatus.StreamsEntry"></a>

RACStatus.StreamsEntry

FieldTypeLabelDescriptionSupport status
keyuint64
valueRACStatus.Stream

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RACStatus.Stream"></a>

RACStatus.Stream

FieldTypeLabelDescriptionSupport status
index_to_senduint64reserved
next_raft_index_initialuint64reserved
force_flush_stop_indexuint64reserved
eval_tokens_heldint64repeatedreserved
send_tokens_heldint64repeatedreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeProblems"></a>

RangeProblems

RangeProblems describes issues reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
unavailableboolreserved
leader_not_lease_holderboolreserved
no_raft_leaderboolreserved
underreplicatedboolreserved
overreplicatedboolreserved
no_leaseboolreserved
quiescent_equals_tickingboolQuiescent ranges do not tick by definition, but we track this in two different ways and suspect that they're getting out of sync. If the replica's quiescent flag doesn't agree with the store's list of replicas that are ticking, warn about it.reserved
raft_log_too_largeboolWhen the raft log is too large, it can be a symptom of other issues.reserved
circuit_breaker_errorboolreserved
paused_followersboolreserved
range_too_largeboolreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeStatistics"></a>

RangeStatistics

RangeStatistics describes statistics reported by a range. For internal use only.

FieldTypeLabelDescriptionSupport status
queries_per_seconddoubleQueries per second (batch requests) served by this range per second, averaged over the last 30 minute period.reserved
writes_per_seconddoubleWrites per second served is the number of keys written to this range per second, averaged over the last 30 minute period.reserved
requests_per_seconddoubleRequests per second is the number of requests served by this range per second, averaged over the last 30 minute period.reserved
reads_per_seconddoubleReads per second served is the number of keys read from this range per second, averaged over the last 30 minute period.reserved
write_bytes_per_seconddoubleWrites (bytes) per second is the number of bytes written to this range per second, averaged over the last 30 minute period.reserved
read_bytes_per_seconddoubleReads (bytes) per second is the number of bytes read from this range per second, averaged over the last 30 minute period.reserved
cpu_time_per_seconddoubleCPU time (ns) per second is the cpu usage of this range per second, averaged over the last 30 minute period.reserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.RangeInfo.LockInfo"></a>

RangeInfo.LockInfo

FieldTypeLabelDescriptionSupport status
pretty_keystringreserved
keybytesreserved
heldboolreserved
waitersint64reserved
waiting_readersint64reserved
waiting_writersint64reserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.Locality"></a>

Locality

Locality is an ordered set of key value Tiers that describe a node's location. The tier keys should be the same across all nodes.

FieldTypeLabelDescriptionSupport status
tiersTierrepeatedreserved

<a name="cockroach.server.serverpb.RangeResponse-cockroach.server.serverpb.Tier"></a>

Tier

Tier represents one level of the locality hierarchy.

FieldTypeLabelDescriptionSupport status
keystringKey is the name of tier and should match all other nodes.reserved
valuestringValue is node specific value corresponding to the key.reserved

Diagnostics

GET /_status/diagnostics/{node_id}

Support status: reserved

Request Parameters

DiagnosticsRequest requests a diagnostics report.

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

Stores

GET /_status/stores/{node_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
storesStoreDetailsrepeatedreserved

<a name="cockroach.server.serverpb.StoresResponse-cockroach.server.serverpb.StoreDetails"></a>

StoreDetails

FieldTypeLabelDescriptionSupport status
store_idint32reserved
node_idint32reserved
encryption_statusbytesencryption_status is a serialized storage/enginepb/stats.go::EncryptionStatus protobuf.reserved
total_filesuint64Basic file stats when encryption is enabled. Total files/bytes.reserved
total_bytesuint64reserved
active_key_filesuint64Files/bytes using the active data key.reserved
active_key_bytesuint64reserved
dirstringdir is the path to the store's data directory on the node.reserved
wal_failover_pathstringwal_failover_path encodes the path to the secondary WAL directory used for failover in the event of high write latency to the primary WAL.reserved

Statements

GET /_status/statements

Support status: reserved

Request Parameters

StatementsRequest is used by both tenant and node-level implementations to serve fan-out requests across multiple nodes or instances. When implemented on a node, the node_id field refers to the cluster nodes by their nodeID. When implemented on a tenant, the node_id field refers to the instanceIDs that identify individual tenant pods.

FieldTypeLabelDescriptionSupport status
node_idstringreserved
combinedboolIf this field is set we will use the combined statements API instead.reserved
startint64These fields are used for the combined statements API.reserved
endint64reserved
fetch_modeStatementsRequest.FetchModereserved

Response Parameters

FieldTypeLabelDescriptionSupport status
statementsStatementsResponse.CollectedStatementStatisticsrepeatedreserved
last_resetgoogle.protobuf.TimestampTimestamp of the last stats reset.reserved
internal_app_name_prefixstringIf set and non-empty, indicates the prefix to application_name used for statements/queries issued internally by CockroachDB.reserved
transactionsStatementsResponse.ExtendedCollectedTransactionStatisticsrepeatedTransactions is transaction-level statistics for the collection of statements in this response.reserved
stmts_total_runtime_secsfloatreserved
txns_total_runtime_secsfloatreserved
oldest_aggregated_ts_returnedgoogle.protobuf.TimestampOldestAggregatedTsReturned is the timestamp of the oldest entry returned, or null if there is no data returned.reserved
stmts_source_tablestringStmtsSourceTable returns the table used to return the statements data.reserved
txns_source_tablestringTxnsSourceTable returns the table used to return the transactions data.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.CollectedStatementStatistics"></a>

StatementsResponse.CollectedStatementStatistics

FieldTypeLabelDescriptionSupport status
keyStatementsResponse.ExtendedStatementStatisticsKeyreserved
iduint64reserved
statscockroach.sql.StatementStatisticsreserved
txn_fingerprint_idsuint64repeatedIn 23.1 we expect the response to only group on fingerprint_id and app_name in the overview page. We now return the aggregated list of unique txn fingerprint ids, leaving the txn_fingerprint_id field in the key empty.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.ExtendedStatementStatisticsKey"></a>

StatementsResponse.ExtendedStatementStatisticsKey

FieldTypeLabelDescriptionSupport status
key_datacockroach.sql.StatementStatisticsKeyreserved
node_idint32reserved
aggregated_tsgoogle.protobuf.Timestampreserved
aggregation_intervalgoogle.protobuf.DurationThe aggregation duration.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.ExtendedCollectedTransactionStatistics"></a>

StatementsResponse.ExtendedCollectedTransactionStatistics

FieldTypeLabelDescriptionSupport status
stats_datacockroach.sql.CollectedTransactionStatisticsreserved
node_idint32reserved

CombinedStatementStats

GET /_status/combinedstmts

Retrieve the combined in-memory and persisted statement stats by date range.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
startint64Unix time range for aggregated statements.reserved
endint64reserved
fetch_modeCombinedStatementsStatsRequest.FetchModeNote that if fetch_mode is set to transactions only, we will also include the statement statistics for the stmts in the transactions response. This is more of a hack-y method to get the complete stats for txns, because in the client we need to fill in some txn stats info from its stmt stats, such as the query string.

We prefer this hackier method right now to reduce surface area for backporting these changes, but in the future we will introduce more endpoints to properly organize these differing requests. TODO (xinhaoz) - Split this API into stmts and txns properly instead of using this param. | reserved | | limit | int64 | | | reserved |

<a name="cockroach.server.serverpb.CombinedStatementsStatsRequest-cockroach.server.serverpb.CombinedStatementsStatsRequest.FetchMode"></a>

CombinedStatementsStatsRequest.FetchMode

FieldTypeLabelDescriptionSupport status
stats_typeCombinedStatementsStatsRequest.StatsTypereserved
sortStatsSortOptionsreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
statementsStatementsResponse.CollectedStatementStatisticsrepeatedreserved
last_resetgoogle.protobuf.TimestampTimestamp of the last stats reset.reserved
internal_app_name_prefixstringIf set and non-empty, indicates the prefix to application_name used for statements/queries issued internally by CockroachDB.reserved
transactionsStatementsResponse.ExtendedCollectedTransactionStatisticsrepeatedTransactions is transaction-level statistics for the collection of statements in this response.reserved
stmts_total_runtime_secsfloatreserved
txns_total_runtime_secsfloatreserved
oldest_aggregated_ts_returnedgoogle.protobuf.TimestampOldestAggregatedTsReturned is the timestamp of the oldest entry returned, or null if there is no data returned.reserved
stmts_source_tablestringStmtsSourceTable returns the table used to return the statements data.reserved
txns_source_tablestringTxnsSourceTable returns the table used to return the transactions data.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.CollectedStatementStatistics"></a>

StatementsResponse.CollectedStatementStatistics

FieldTypeLabelDescriptionSupport status
keyStatementsResponse.ExtendedStatementStatisticsKeyreserved
iduint64reserved
statscockroach.sql.StatementStatisticsreserved
txn_fingerprint_idsuint64repeatedIn 23.1 we expect the response to only group on fingerprint_id and app_name in the overview page. We now return the aggregated list of unique txn fingerprint ids, leaving the txn_fingerprint_id field in the key empty.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.ExtendedStatementStatisticsKey"></a>

StatementsResponse.ExtendedStatementStatisticsKey

FieldTypeLabelDescriptionSupport status
key_datacockroach.sql.StatementStatisticsKeyreserved
node_idint32reserved
aggregated_tsgoogle.protobuf.Timestampreserved
aggregation_intervalgoogle.protobuf.DurationThe aggregation duration.reserved

<a name="cockroach.server.serverpb.StatementsResponse-cockroach.server.serverpb.StatementsResponse.ExtendedCollectedTransactionStatistics"></a>

StatementsResponse.ExtendedCollectedTransactionStatistics

FieldTypeLabelDescriptionSupport status
stats_datacockroach.sql.CollectedTransactionStatisticsreserved
node_idint32reserved

StatementDetails

GET /_status/stmtdetails/{fingerprint_id}

Support status: reserved

Request Parameters

StatementDetailsRequest requests the details of a Statement, based on its keys.

FieldTypeLabelDescriptionSupport status
fingerprint_idstringfingerprint_id is generated by ConstructStatementFingerprintID using: query, failed, implicitTxn and database. So we don't need to add them to the request.reserved
app_namesstringrepeatedreserved
startint64Unix time range for aggregated statements.reserved
endint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
statementStatementDetailsResponse.CollectedStatementSummarystatement returns the total statistics for the statement.reserved
statement_statistics_per_aggregated_tsStatementDetailsResponse.CollectedStatementGroupedByAggregatedTsrepeatedstatement_statistics_per_aggregated_ts returns the same statement from above, but with its statistics separated by the aggregated timestamp.reserved
statement_statistics_per_plan_hashStatementDetailsResponse.CollectedStatementGroupedByPlanHashrepeatedstatement_statistics_per_plan_hash returns the same statement from above, but with its statistics separated by the plan hash.reserved
internal_app_name_prefixstringIf set and non-empty, indicates the prefix to application_name used for statements/queries issued internally by CockroachDB.reserved

<a name="cockroach.server.serverpb.StatementDetailsResponse-cockroach.server.serverpb.StatementDetailsResponse.CollectedStatementSummary"></a>

StatementDetailsResponse.CollectedStatementSummary

FieldTypeLabelDescriptionSupport status
metadatacockroach.sql.AggregatedStatementMetadatareserved
statscockroach.sql.StatementStatisticsreserved
aggregation_intervalgoogle.protobuf.Durationreserved

<a name="cockroach.server.serverpb.StatementDetailsResponse-cockroach.server.serverpb.StatementDetailsResponse.CollectedStatementGroupedByAggregatedTs"></a>

StatementDetailsResponse.CollectedStatementGroupedByAggregatedTs

FieldTypeLabelDescriptionSupport status
metadatacockroach.sql.AggregatedStatementMetadatareserved
statscockroach.sql.StatementStatisticsreserved
aggregation_intervalgoogle.protobuf.Durationreserved
aggregated_tsgoogle.protobuf.Timestampreserved

<a name="cockroach.server.serverpb.StatementDetailsResponse-cockroach.server.serverpb.StatementDetailsResponse.CollectedStatementGroupedByPlanHash"></a>

StatementDetailsResponse.CollectedStatementGroupedByPlanHash

FieldTypeLabelDescriptionSupport status
metadatacockroach.sql.AggregatedStatementMetadatareserved
statscockroach.sql.StatementStatisticsreserved
aggregation_intervalgoogle.protobuf.Durationreserved
explain_planstringreserved
plan_hashuint64reserved
index_recommendationsstringrepeatedreserved

CreateStatementDiagnosticsReport

POST /_status/stmtdiagreports

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
statement_fingerprintstringreserved
min_execution_latencygoogle.protobuf.DurationMinExecutionLatency, when non-zero, indicates the minimum execution latency of a query for which to collect the diagnostics report. In other words, if a query executes faster than this threshold, then the diagnostics report is not collected on it, and we will try to get a bundle the next time we see the query fingerprint.

NB: if MinExecutionLatency is non-zero, then all queries that match the fingerprint will be traced until a slow enough query comes along. This tracing might have some performance overhead. | reserved | | expires_after | google.protobuf.Duration | | ExpiresAfter, when non-zero, sets the expiration interval of this request. | reserved | | sampling_probability | double | | SamplingProbability controls how likely we are to try and collect a diagnostics report for a given execution. The semantics with MinExecutionLatency are worth noting (and perhaps simplifying?): - If SamplingProbability is zero, we're always sampling. This is for compatibility with pre-22.2 versions where this parameter was not available. - If SamplingProbability is non-zero, MinExecutionLatency must be non-zero. We'll sample stmt executions with the given probability until: (a) we capture one that exceeds MinExecutionLatency, or (b) we hit the ExpiresAfter point.

SamplingProbability lets users control at a per-stmt granularity how much collection overhead is acceptable to try an capture an outlier execution for further analysis (are high p99.9s due to latch waits? racing with split transfers?). A high sampling rate can capture a trace sooner, but the added overhead may also cause the trace to be non-representative if the tracing overhead across all requests is causing resource saturation (network, memory) and resulting in slowdown.

TODO(irfansharif): Wire this up to the UI code. When selecting the latency threshold, we should want to force specifying a sampling probability.

TODO(irfansharif): We could do better than a hard-coded default value for probability (100% could be too high-overhead so probably not the right one). Strawman: could consider the recent request rate for the fingerprint (say averaged over the last 10m? 30m?), consider what %-ile the latency target we're looking to capture is under, and suggest a sampling probability that gets you at least one trace in the next T seconds with 95% likelihood? Or provide a hint for how long T is for the currently chosen sampling probability. | reserved | | plan_gist | string | | PlanGist, when set, indicates a particular plan that we want collect diagnostics for. This can be useful when a single fingerprint can result in multiple plans.

There is a caveat to using this filtering: since the plan gist for a running query is only available after the optimizer has done its part, the trace will only include things after the optimizer is done. | reserved | | anti_plan_gist | bool | | AntiPlanGist, when set, indicates that any plan not matching PlanGist will do. | reserved | | redacted | bool | | Redacted, when set, indicates that the redacted bundle is requested. | reserved |

Response Parameters

FieldTypeLabelDescriptionSupport status
reportStatementDiagnosticsReportreserved

<a name="cockroach.server.serverpb.CreateStatementDiagnosticsReportResponse-cockroach.server.serverpb.StatementDiagnosticsReport"></a>

StatementDiagnosticsReport

FieldTypeLabelDescriptionSupport status
idint64reserved
completedboolreserved
statement_fingerprintstringreserved
statement_diagnostics_idint64reserved
requested_atgoogle.protobuf.Timestampreserved
min_execution_latencygoogle.protobuf.Durationreserved
expires_atgoogle.protobuf.TimestampTODO(yuzefovich): should we populate plan_gist, anti_plan_gist, redacted, and username fields?reserved

CancelStatementDiagnosticsReport

POST /_status/stmtdiagreports/cancel

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
request_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
canceledboolcanceled indicates whether the request for the given fingerprint was actually canceled.reserved
errorstringerror is set only if canceled is false.reserved

StatementDiagnosticsRequests

GET /_status/stmtdiagreports

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
reportsStatementDiagnosticsReportrepeatedreserved

<a name="cockroach.server.serverpb.StatementDiagnosticsReportsResponse-cockroach.server.serverpb.StatementDiagnosticsReport"></a>

StatementDiagnosticsReport

FieldTypeLabelDescriptionSupport status
idint64reserved
completedboolreserved
statement_fingerprintstringreserved
statement_diagnostics_idint64reserved
requested_atgoogle.protobuf.Timestampreserved
min_execution_latencygoogle.protobuf.Durationreserved
expires_atgoogle.protobuf.TimestampTODO(yuzefovich): should we populate plan_gist, anti_plan_gist, redacted, and username fields?reserved

StatementDiagnostics

GET /_status/stmtdiag/{statement_diagnostics_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
statement_diagnostics_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
diagnosticsStatementDiagnosticsreserved

<a name="cockroach.server.serverpb.StatementDiagnosticsResponse-cockroach.server.serverpb.StatementDiagnostics"></a>

StatementDiagnostics

FieldTypeLabelDescriptionSupport status
idint64reserved
statement_fingerprintstringreserved
collected_atgoogle.protobuf.Timestampreserved

CreateTransactionDiagnosticsReport

POST /_status/txndiagreports

Support status: reserved

Request Parameters

createTransactionDiagnosticsReportRequest is a message that captures a user's requst to capture a transaction diagnostic bundle.

FieldTypeLabelDescriptionSupport status
transaction_fingerprint_idbytesreserved
statement_fingerprint_idsbytesrepeatedreserved
min_execution_latencygoogle.protobuf.Durationreserved
expires_atgoogle.protobuf.Durationreserved
sampling_probabilitydoublereserved
redactedboolreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
reportTransactionDiagnosticsReportreserved

<a name="cockroach.server.serverpb.CreateTransactionDiagnosticsReportResponse-cockroach.server.serverpb.TransactionDiagnosticsReport"></a>

TransactionDiagnosticsReport

TransactionDiagnosticsReport is a message that represents a diagnostics capture request for a given transaction.

FieldTypeLabelDescriptionSupport status
idint64reserved
completedboolreserved
transaction_fingerprint_idbytesTODO(davidh): should these be strings or int64??? I think bytes is most correct.reserved
statement_fingerprint_idsbytesrepeatedreserved
transaction_fingerprintstringreserved
transaction_diagnostics_idint64reserved
requested_atgoogle.protobuf.Timestampreserved
min_execution_latencygoogle.protobuf.Durationreserved
expires_atgoogle.protobuf.Timestampreserved
sampling_probabilitydoublereserved
redactedboolreserved
usernamestringreserved

CancelTransactionDiagnosticsReport

POST /_status/txndiagreports/cancel

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
request_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
canceledboolcanceled indicates whether the request for the given fingerprint was actually canceled.reserved
errorstringerror is set only if canceled is false.reserved

TransactionDiagnosticsRequests

GET /_status/txndiagreports

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
reportsTransactionDiagnosticsReportrepeatedreserved

<a name="cockroach.server.serverpb.TransactionDiagnosticsReportsResponse-cockroach.server.serverpb.TransactionDiagnosticsReport"></a>

TransactionDiagnosticsReport

TransactionDiagnosticsReport is a message that represents a diagnostics capture request for a given transaction.

FieldTypeLabelDescriptionSupport status
idint64reserved
completedboolreserved
transaction_fingerprint_idbytesTODO(davidh): should these be strings or int64??? I think bytes is most correct.reserved
statement_fingerprint_idsbytesrepeatedreserved
transaction_fingerprintstringreserved
transaction_diagnostics_idint64reserved
requested_atgoogle.protobuf.Timestampreserved
min_execution_latencygoogle.protobuf.Durationreserved
expires_atgoogle.protobuf.Timestampreserved
sampling_probabilitydoublereserved
redactedboolreserved
usernamestringreserved

JobRegistryStatus

GET /_status/job_registry/{node_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
node_idint32reserved
running_jobsJobRegistryStatusResponse.Jobrepeatedreserved

<a name="cockroach.server.serverpb.JobRegistryStatusResponse-cockroach.server.serverpb.JobRegistryStatusResponse.Job"></a>

JobRegistryStatusResponse.Job

FieldTypeLabelDescriptionSupport status
idint64reserved

JobStatus

GET /_status/job/{job_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
job_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
jobcockroach.sql.jobs.jobspb.Jobreserved

ResetSQLStats

POST /_status/resetsqlstats

Support status: reserved

Request Parameters

Request object for issuing a SQL stats reset request.

FieldTypeLabelDescriptionSupport status
node_idstringreserved
reset_persisted_statsboolreset_persisted_stats specifies if the persisted SQL Stats will be reset along with the in-memory SQL stats.reserved

Response Parameters

Response object returned by ResetSQLStats.

DrainSqlStats

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
statementscockroach.sql.CollectedStatementStatisticsrepeatedreserved
transactionscockroach.sql.CollectedTransactionStatisticsrepeatedreserved
fingerprint_countint64reserved

IndexUsageStatistics

GET /_status/indexusagestatistics

Support status: reserved

Request Parameters

Request object for issuing IndexUsageStatistics request.

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is the ID of the node where the stats data shall be retrieved from. If this is left empty, the cluster-wide aggregated result will be returned.reserved

Response Parameters

Response object returned by IndexUsageStatistics.

FieldTypeLabelDescriptionSupport status
statisticscockroach.sql.CollectedIndexUsageStatisticsrepeatedreserved
last_resetgoogle.protobuf.TimestampTimestamp of the last index usage stats reset.reserved

ResetIndexUsageStats

POST /_status/resetindexusagestats

Support status: reserved

Request Parameters

Request object for issuing a index usage stats reset request.

FieldTypeLabelDescriptionSupport status
node_idstringreserved
cluster_reset_start_timegoogle.protobuf.TimestampTimestamp for the start time of the latest reset index usage statistics request on the cluster.reserved

Response Parameters

Response object returned by ResetIndexUsageStatsRequest.

TableIndexStats

GET /_status/databases/{database}/tables/{table}/indexstats

TableIndexStats retrieves index stats for a table.

Support status: reserved

Request Parameters

Request object for issuing TableIndexStatsRequest request.

FieldTypeLabelDescriptionSupport status
databasestringdatabase is the name of the database that contains the table we're interested in.reserved
tablestringtable is the name of the table that we're querying. Table may be schema-qualified (schema.table) and each name component that contains sql unsafe characters such as . or uppercase letters must be surrounded in double quotes like "naughty schema".table.reserved

Response Parameters

Response object returned by TableIndexStatsResponse.

FieldTypeLabelDescriptionSupport status
statisticsTableIndexStatsResponse.ExtendedCollectedIndexUsageStatisticsrepeatedreserved
last_resetgoogle.protobuf.TimestampTimestamp of the latest reset index usage statistics request.reserved
index_recommendationscockroach.sql.IndexRecommendationrepeatedreserved
database_idint32database_id is the ID of the database that contains the table.reserved

<a name="cockroach.server.serverpb.TableIndexStatsResponse-cockroach.server.serverpb.TableIndexStatsResponse.ExtendedCollectedIndexUsageStatistics"></a>

TableIndexStatsResponse.ExtendedCollectedIndexUsageStatistics

FieldTypeLabelDescriptionSupport status
statisticscockroach.sql.CollectedIndexUsageStatisticsreserved
index_namestringindex_name is the name of the index.reserved
index_typestringindex_type is the type of the index i.e. primary, secondary.reserved
create_statementstringcreate_statement is the SQL statement that would re-create the current index if executed.reserved
created_atgoogle.protobuf.Timestampcreated_at is an approximate timestamp at which the index was created. Note that it may not always be populated.reserved
index_idstringindex_id is the ID of the index.reserved
table_idstringtable_id is the ID of the table which the index belongs to.reserved

UserSQLRoles

GET /_status/sqlroles

Support status: reserved

Request Parameters

UserSQLRolesRequest requests a list of roles of the logged in SQL user.

Response Parameters

UserSQLRolesResponse returns a list of roles for the logged SQL user.

FieldTypeLabelDescriptionSupport status
rolesstringrepeatedroles is a list of roles for the SQL user.reserved

TxnIDResolution

TxnIDResolution is used by the contention event store to resolve transaction ID into transaction fingerprint IDs. This RPC does not have a corresponding HTTP endpoint on purpose, since DB Console should never directly query this endpoint.

The API contract is the following:

  • if the server can resolve the transaction IDs in the RPC request, it will be returned in the RPC response.
  • if the server is not able to resolve the transaction IDs, it will instructs the transaction ID cache to drain its write buffer. (Since transaction ID cache's write path is asynchronous, the transaction ID requested by the client might not be available in the cache yet). Client is responsible to perform retries if the requested transaction ID is not returned in the RPC response.

Support status: reserved

Request Parameters

Request object for issuing Transaction ID Resolution.

FieldTypeLabelDescriptionSupport status
coordinator_idstringcoordinator_id is either the NodeID or SQLInstanceID depending on whether the transaction is executed on a system tenant or a regular tenant.reserved
txnIDsbytesrepeatedreserved

Response Parameters

Response object for issuing Transaction ID Resolution.

FieldTypeLabelDescriptionSupport status
resolvedTxnIDscockroach.sql.contentionpb.ResolvedTxnIDrepeatedreserved

TransactionContentionEvents

GET /_status/transactioncontentionevents

TransactionContentionEvents returns a list of un-aggregated contention events sorted by the collection timestamp.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
eventscockroach.sql.contentionpb.ExtendedContentionEventrepeatedreserved

ListExecutionInsights

ListExecutionInsights returns potentially problematic statements cluster-wide, along with actions we suggest the application developer might take to remedy them.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
insightscockroach.sql.insights.Insightrepeatedinsights lists any potentially problematic statements and actions we suggest the application developer might take to remedy them.reserved
errorscockroach.errorspb.EncodedErrorrepeatederrors holds any errors that occurred during fan-out calls to other nodes.reserved

NetworkConnectivity

GET /_status/connectivity

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
connectionsNetworkConnectivityResponse.ConnectionsEntryrepeatedreserved
errors_by_node_idNetworkConnectivityResponse.ErrorsByNodeIdEntryrepeatederrors contains any errors that occurred during fan-out calls to other nodes.reserved

<a name="cockroach.server.serverpb.NetworkConnectivityResponse-cockroach.server.serverpb.NetworkConnectivityResponse.ConnectionsEntry"></a>

NetworkConnectivityResponse.ConnectionsEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNetworkConnectivityResponse.Connectivity

<a name="cockroach.server.serverpb.NetworkConnectivityResponse-cockroach.server.serverpb.NetworkConnectivityResponse.Connectivity"></a>

NetworkConnectivityResponse.Connectivity

FieldTypeLabelDescriptionSupport status
peersNetworkConnectivityResponse.Connectivity.PeersEntryrepeatedreserved

<a name="cockroach.server.serverpb.NetworkConnectivityResponse-cockroach.server.serverpb.NetworkConnectivityResponse.Connectivity.PeersEntry"></a>

NetworkConnectivityResponse.Connectivity.PeersEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueNetworkConnectivityResponse.Peer

<a name="cockroach.server.serverpb.NetworkConnectivityResponse-cockroach.server.serverpb.NetworkConnectivityResponse.Peer"></a>

NetworkConnectivityResponse.Peer

FieldTypeLabelDescriptionSupport status
latencygoogle.protobuf.Durationreserved
statusNetworkConnectivityResponse.ConnectionStatusreserved
addressstringreserved
localitycockroach.roachpb.Localityreserved
errorstringreserved

<a name="cockroach.server.serverpb.NetworkConnectivityResponse-cockroach.server.serverpb.NetworkConnectivityResponse.ErrorsByNodeIdEntry"></a>

NetworkConnectivityResponse.ErrorsByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuestring

RequestJobProfilerExecutionDetails

GET /_status/request_job_profiler_execution_details/{job_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
job_idint64reserved

Response Parameters

GetJobProfilerExecutionDetails

GET /_status/job_profiler_execution_details/{job_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
job_idint64reserved
filenamestringreserved

Response Parameters

FieldTypeLabelDescriptionSupport status
databytesreserved

ListJobProfilerExecutionDetails

GET /_status/list_job_profiler_execution_details/{job_id}

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
job_idint64reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
filesstringrepeatedreserved

UpdateTableMetadataCache

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
localboolIf true, the server will attempt to send a signal to the table metadata job by notifying the channel set on the status server.reserved

Response Parameters

GetThrottlingMetadata

GET /_status/throttling

GetThrottlingMetadata is used by the DB Console to retrieve information regarding current or upcoming throttling the cluster may experience.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idstringreserved

Response Parameters

GetThrottlingMetadataResponse contains all information necessary to show throttling warnings and alerts in DB Console.

FieldTypeLabelDescriptionSupport status
throttledboolthrottled is true if at least one node in the cluster is actively being throttled.reserved
throttleExplanationstringif throttled is true, this will contain a string explaning why, generated from the SQL enforcer.reserved
hasGracePeriodboolhasGracePeriod is true if the cluster has an active grace period before throttling kicks in after license expiry. Enterprise licenses do not have grace periods when they expire.reserved
gracePeriodEndSecondsint64gracePeriodEndSeconds is the unix timestamp when the grace period ends.reserved
hasTelemetryDeadlineboolhasTelemetryDeadline is true if this cluster requires telemetry to be delivered.reserved
telemetryDeadlineSecondsint64telemetryDeadlineSeconds is the unix timestamp when the telemetry deadline must be met. After this the cluster will be throttled.reserved
lastTelemetryReceivedSecondsint64lastTelemetryReceivedSeconds is the unix timestamp when we last delivered telemetry.reserved
nodeIdsWithTelemetryProblemsstringrepeatednodeIdsWithTelemetryProblems collects a list of nodes that are delinquent with telemetry. This is useful for reporting because the cluster could have partial telemetry delivery failure and it's helpful to surface this in DB Console.reserved

Users

GET /_admin/v1/users

URL: /_admin/v1/users

Support status: reserved

Request Parameters

UsersRequest requests a list of users.

Response Parameters

UsersResponse returns a list of users.

FieldTypeLabelDescriptionSupport status
usersUsersResponse.Userrepeatedusernames is a list of users for the CockroachDB cluster.reserved

<a name="cockroach.server.serverpb.UsersResponse-cockroach.server.serverpb.UsersResponse.User"></a>

UsersResponse.User

User is a CockroachDB user.

FieldTypeLabelDescriptionSupport status
usernamestringreserved

Databases

GET /_admin/v1/databases

URL: /_admin/v1/databases

Support status: reserved

Request Parameters

DatabasesRequest requests a list of databases.

Response Parameters

DatabasesResponse contains a list of databases.

FieldTypeLabelDescriptionSupport status
databasesstringrepeatedreserved

DatabaseDetails

GET /_admin/v1/databases/{database}

Example URL: /_admin/v1/databases/system

Support status: reserved

Request Parameters

DatabaseDetailsRequest requests detailed information about the specified database

FieldTypeLabelDescriptionSupport status
databasestringdatabase is the name of the database we are querying.reserved
include_statsboolSetting this flag includes a computationally-expensive stats field in the response.reserved

Response Parameters

DatabaseDetailsResponse contains grant information, table names, zone configuration, and size statistics for a database.

FieldTypeLabelDescriptionSupport status
grantsDatabaseDetailsResponse.Grantrepeatedgrants are the results of SHOW GRANTS for this database.reserved
table_namesstringrepeatedtable_names contains the names of all tables in this database. Note that all responses will be schema-qualified (schema.table) and that every schema or table that contains a "sql unsafe character" such as uppercase letters or dots will be surrounded with double quotes, such as "naughty schema".table.reserved
descriptor_idint64descriptor_id is an identifier used to uniquely identify this database.reserved
zone_configcockroach.config.zonepb.ZoneConfigThe zone configuration in effect for this database.reserved
zone_config_levelZoneConfigurationLevelThe level at which this object's zone configuration is set.reserved
statsDatabaseDetailsResponse.StatsSize information about the database, present only when explicitly requested.reserved

<a name="cockroach.server.serverpb.DatabaseDetailsResponse-cockroach.server.serverpb.DatabaseDetailsResponse.Grant"></a>

DatabaseDetailsResponse.Grant

FieldTypeLabelDescriptionSupport status
userstringuser is the user that this grant applies to.reserved
privilegesstringrepeatedprivileges are the abilities this grant gives to the user.reserved

<a name="cockroach.server.serverpb.DatabaseDetailsResponse-cockroach.server.serverpb.DatabaseDetailsResponse.Stats"></a>

DatabaseDetailsResponse.Stats

FieldTypeLabelDescriptionSupport status
missing_tablesDatabaseDetailsResponse.Stats.MissingTablerepeatedA list of tables that exist in the database, but for which stats could not be loaded due to failures during this request.reserved
range_countint64The number of ranges, as determined from a query of range meta keys, across all tables.reserved
approximate_disk_bytesuint64An approximation of the disk space (in bytes) used for all replicas of all tables across the cluster.reserved
node_idsint32repeatednode_ids is the ordered list of node ids on which data is stored.reserved
num_index_recommendationsint32reserved

<a name="cockroach.server.serverpb.DatabaseDetailsResponse-cockroach.server.serverpb.DatabaseDetailsResponse.Stats.MissingTable"></a>

DatabaseDetailsResponse.Stats.MissingTable

A table which exists in the database, but for which we could not load stats during this request.

FieldTypeLabelDescriptionSupport status
namestringThe name of the table for which we could not load stats.reserved
error_messagestringThe error message that resulted when the request for this table failed.reserved

TableDetails

GET /_admin/v1/databases/{database}/tables/{table}

Example URL: /_admin/v1/databases/system/tables/ui

Support status: reserved

Request Parameters

TableDetailsRequest is a request for detailed information about a table.

FieldTypeLabelDescriptionSupport status
databasestringdatabase is the name of the database that contains the table we're interested in.reserved
tablestringtable is the name of the table that we're querying. Table may be schema-qualified (schema.table) and each name component that contains sql unsafe characters such as . or uppercase letters must be surrounded in double quotes like "naughty schema".table.reserved

Response Parameters

TableDetailsResponse contains grants, column names, and indexes for a table.

FieldTypeLabelDescriptionSupport status
grantsTableDetailsResponse.Grantrepeatedreserved
columnsTableDetailsResponse.Columnrepeatedreserved
indexesTableDetailsResponse.Indexrepeatedreserved
range_countint64range_count is the size of the table in ranges. This provides a rough estimate of the storage requirements for the table. TODO(mrtracy): The TableStats method also returns a range_count field which is more accurate than this one; TableDetails calculates this number using a potentially faster method that is subject to cache staleness. We should consider removing or renaming this field to reflect that difference. See GitHub issue #5435 for more information.reserved
create_table_statementstringcreate_table_statement is the output of "SHOW CREATE" for this table; it is a SQL statement that would re-create the table's current schema if executed.reserved
zone_configcockroach.config.zonepb.ZoneConfigThe zone configuration in effect for this table.reserved
zone_config_levelZoneConfigurationLevelThe level at which this object's zone configuration is set.reserved
descriptor_idint64descriptor_id is an identifier used to uniquely identify this table.reserved
configure_zone_statementstringconfigure_zone_statement is the output of "SHOW ZONE CONFIGURATION FOR TABLE" for this table. It is a SQL statement that would re-configure the table's current zone if executed.reserved
stats_last_created_atgoogle.protobuf.Timestampstats_last_created_at is the time at which statistics were last created.reserved
has_index_recommendationsboolhas_index_recommendations notifies if the there are index recommendations on this table.reserved
data_total_bytesint64data_total_bytes is the size in bytes of live and non-live data on the table.reserved
data_live_bytesint64data_live_bytes is the size in bytes of live (non MVCC) data on the table.reserved
data_live_percentagefloatdata_live_percentage is the percentage of live (non MVCC) data on the table.reserved

<a name="cockroach.server.serverpb.TableDetailsResponse-cockroach.server.serverpb.TableDetailsResponse.Grant"></a>

TableDetailsResponse.Grant

Grant is an entry from SHOW GRANTS.

FieldTypeLabelDescriptionSupport status
userstringuser is the user that this grant applies to.reserved
privilegesstringrepeatedprivileges are the abilities this grant gives to the user.reserved

<a name="cockroach.server.serverpb.TableDetailsResponse-cockroach.server.serverpb.TableDetailsResponse.Column"></a>

TableDetailsResponse.Column

FieldTypeLabelDescriptionSupport status
namestringname is the name of the column.reserved
typestringtype is the SQL type (INT, STRING, etc.) of this column.reserved
nullableboolnullable is whether this column can contain NULL.reserved
default_valuestringdefault_value is the default value of this column.reserved
generation_expressionstringgeneration_expression is the generator expression if the column is computed.reserved
hiddenboolhidden is whether this column is hidden.reserved

<a name="cockroach.server.serverpb.TableDetailsResponse-cockroach.server.serverpb.TableDetailsResponse.Index"></a>

TableDetailsResponse.Index

FieldTypeLabelDescriptionSupport status
namestringname is the name of this index.reserved
uniqueboolunique is whether this a unique index (i.e. CREATE UNIQUE INDEX).reserved
seqint64seq is an internal variable that's passed along.reserved
columnstringcolumn is the column that this index indexes.reserved
directionstringdirection is either "ASC" (ascending) or "DESC" (descending).reserved
storingboolstoring is an internal variable that's passed along.reserved
implicitboolimplicit is an internal variable that's passed along.reserved

TableStats

GET /_admin/v1/databases/{database}/tables/{table}/stats

Example URL: /_admin/v1/databases/system/tables/ui/stats

Support status: reserved

Request Parameters

TableStatsRequest is a request for detailed, computationally expensive information about a table.

FieldTypeLabelDescriptionSupport status
databasestringdatabase is the name of the database that contains the table we're interested in.reserved
tablestringtable is the name of the table that we're querying. Table may be schema-qualified (schema.table) and each name component that contains sql unsafe characters such as . or uppercase letters must be surrounded in double quotes like "naughty schema".table.reserved

Response Parameters

TableStatsResponse contains detailed, computationally expensive information about a table.

FieldTypeLabelDescriptionSupport status
range_countint64range_count is the number of ranges, as determined from a query of range meta keys.reserved
replica_countint64replica_count is the number of replicas of any range of this table, as found by querying nodes which are known to have replicas. When compared with range_count, this can be used to estimate the current replication factor of the table.reserved
node_countint64node_count is the number of nodes which contain data for this table, according to a query of range meta keys.reserved
statscockroach.storage.enginepb.MVCCStatsstats is the summation of MVCCStats for all replicas of this table across the cluster.reserved
approximate_disk_bytesuint64approximate_disk_bytes is an approximation of the disk space (in bytes) used for all replicas of this table across the cluster.reserved
missing_nodesTableStatsResponse.MissingNoderepeatedA list of nodes which should contain data for this table (according to cluster metadata), but could not be contacted during this request.reserved
node_idsint32repeatednode_ids is the ordered list of node ids on which the table data is stored.reserved

<a name="cockroach.server.serverpb.TableStatsResponse-cockroach.server.serverpb.TableStatsResponse.MissingNode"></a>

TableStatsResponse.MissingNode

MissingNode represents information on a node which should contain data for this table, but could not be contacted during this request.

FieldTypeLabelDescriptionSupport status
node_idstringThe ID of the missing node.reserved
error_messagestringThe error message that resulted when the query sent to this node failed.reserved

NonTableStats

GET /_admin/v1/nontablestats

Example URL: /_admin/v1/nontablestats

Support status: reserved

Request Parameters

NonTableStatsRequest requests statistics on cluster data ranges that do not belong to SQL tables.

Response Parameters

NonTableStatsResponse returns statistics on various cluster data ranges that do not belong to SQL tables. The statistics for each range are returned as a TableStatsResponse.

FieldTypeLabelDescriptionSupport status
time_series_statsTableStatsResponseInformation on time series ranges.reserved
internal_use_statsTableStatsResponseInformation for remaining (non-table, non-time-series) ranges.reserved

<a name="cockroach.server.serverpb.NonTableStatsResponse-cockroach.server.serverpb.TableStatsResponse"></a>

TableStatsResponse

TableStatsResponse contains detailed, computationally expensive information about a table.

FieldTypeLabelDescriptionSupport status
range_countint64range_count is the number of ranges, as determined from a query of range meta keys.reserved
replica_countint64replica_count is the number of replicas of any range of this table, as found by querying nodes which are known to have replicas. When compared with range_count, this can be used to estimate the current replication factor of the table.reserved
node_countint64node_count is the number of nodes which contain data for this table, according to a query of range meta keys.reserved
statscockroach.storage.enginepb.MVCCStatsstats is the summation of MVCCStats for all replicas of this table across the cluster.reserved
approximate_disk_bytesuint64approximate_disk_bytes is an approximation of the disk space (in bytes) used for all replicas of this table across the cluster.reserved
missing_nodesTableStatsResponse.MissingNoderepeatedA list of nodes which should contain data for this table (according to cluster metadata), but could not be contacted during this request.reserved
node_idsint32repeatednode_ids is the ordered list of node ids on which the table data is stored.reserved

<a name="cockroach.server.serverpb.NonTableStatsResponse-cockroach.server.serverpb.TableStatsResponse.MissingNode"></a>

TableStatsResponse.MissingNode

MissingNode represents information on a node which should contain data for this table, but could not be contacted during this request.

FieldTypeLabelDescriptionSupport status
node_idstringThe ID of the missing node.reserved
error_messagestringThe error message that resulted when the query sent to this node failed.reserved

<a name="cockroach.server.serverpb.NonTableStatsResponse-cockroach.server.serverpb.TableStatsResponse"></a>

TableStatsResponse

TableStatsResponse contains detailed, computationally expensive information about a table.

FieldTypeLabelDescriptionSupport status
range_countint64range_count is the number of ranges, as determined from a query of range meta keys.reserved
replica_countint64replica_count is the number of replicas of any range of this table, as found by querying nodes which are known to have replicas. When compared with range_count, this can be used to estimate the current replication factor of the table.reserved
node_countint64node_count is the number of nodes which contain data for this table, according to a query of range meta keys.reserved
statscockroach.storage.enginepb.MVCCStatsstats is the summation of MVCCStats for all replicas of this table across the cluster.reserved
approximate_disk_bytesuint64approximate_disk_bytes is an approximation of the disk space (in bytes) used for all replicas of this table across the cluster.reserved
missing_nodesTableStatsResponse.MissingNoderepeatedA list of nodes which should contain data for this table (according to cluster metadata), but could not be contacted during this request.reserved
node_idsint32repeatednode_ids is the ordered list of node ids on which the table data is stored.reserved

Events

GET /_admin/v1/events

Example URLs: Example URLs:

  • /_admin/v1/events
  • /_admin/v1/events?limit=100
  • /_admin/v1/events?type=create_table
  • /_admin/v1/events?type=create_table&limit=100

Support status: reserved

Request Parameters

EventsRequest is a request for event log entries, optionally filtered by the specified event type.

FieldTypeLabelDescriptionSupport status
typestringreserved
limitint32limit is the total number of results that are retrieved by the query. If this is omitted or set to 0, the default maximum number of results are returned. When set to > 0, at most only that number of results are returned. When set to < 0, an unlimited number of results are returned.reserved
unredacted_eventsboolunredacted_events indicates that the values in the events should not be redacted. The default is to redact, so that older versions of cockroach zip do not see un-redacted values by default. For good security, this field is only obeyed by the server after checking that the client of the RPC is an admin user.reserved

Response Parameters

EventsResponse contains a set of event log entries. This is always limited to the latest N entries (N is enforced in the associated endpoint).

FieldTypeLabelDescriptionSupport status
eventsEventsResponse.Eventrepeatedreserved

<a name="cockroach.server.serverpb.EventsResponse-cockroach.server.serverpb.EventsResponse.Event"></a>

EventsResponse.Event

FieldTypeLabelDescriptionSupport status
timestampgoogle.protobuf.Timestamptimestamp is the time at which the event occurred.reserved
event_typestringevent_type is the type of the event (e.g. "create_table", "drop_table".reserved
reporting_idint64reporting_id is the reporting ID for this event.reserved
infostringinfo has more detailed information for the event. The contents vary depending on the event.reserved
unique_idbytesunique_id is a unique identifier for this event.reserved

SetUIData

POST /_admin/v1/uidata

This requires a POST. Because of the libraries we're using, the POST body must be in the following format:

{"key_values": { "key1": "base64_encoded_value1"}, ... { "keyN": "base64_encoded_valueN"}, }

Note that all keys are quoted strings and that all values are base64- encoded.

Together, SetUIData and GetUIData provide access to a "cookie jar" for the admin UI. The structure of the underlying data is meant to be opaque to the server.

Support status: reserved

Request Parameters

SetUIDataRequest stores the given key/value pairs in the system.ui table.

FieldTypeLabelDescriptionSupport status
key_valuesSetUIDataRequest.KeyValuesEntryrepeatedkey_values is a map of keys to bytes values. Each key will be stored with its corresponding value as a separate row in system.ui.reserved

<a name="cockroach.server.serverpb.SetUIDataRequest-cockroach.server.serverpb.SetUIDataRequest.KeyValuesEntry"></a>

SetUIDataRequest.KeyValuesEntry

FieldTypeLabelDescriptionSupport status
keystring
valuebytes

Response Parameters

SetUIDataResponse is currently an empty response.

GetUIData

GET /_admin/v1/uidata

Example URLs:

  • /_admin/v1/uidata?keys=MYKEY
  • /_admin/v1/uidata?keys=MYKEY1&keys=MYKEY2

Yes, it's a little odd that the query parameter is named "keys" instead of "key". I would've preferred that the URL parameter be named "key". However, it's clearer for the protobuf field to be named "keys," which makes the URL parameter "keys" as well.

Support status: reserved

Request Parameters

GETUIDataRequest requests the values for the given keys from the system.ui table.

FieldTypeLabelDescriptionSupport status
keysstringrepeatedreserved

Response Parameters

GetUIDataResponse contains the requested values and the times at which the values were last updated.

FieldTypeLabelDescriptionSupport status
key_valuesGetUIDataResponse.KeyValuesEntryrepeatedkey_values maps keys to their retrieved values. If this doesn't contain a a requested key, that key was not found.reserved

<a name="cockroach.server.serverpb.GetUIDataResponse-cockroach.server.serverpb.GetUIDataResponse.KeyValuesEntry"></a>

GetUIDataResponse.KeyValuesEntry

FieldTypeLabelDescriptionSupport status
keystring
valueGetUIDataResponse.Value

<a name="cockroach.server.serverpb.GetUIDataResponse-cockroach.server.serverpb.GetUIDataResponse.Value"></a>

GetUIDataResponse.Value

FieldTypeLabelDescriptionSupport status
valuebytesvalue is the value of the requested key.reserved
last_updatedgoogle.protobuf.Timestamplast_updated is the time at which the value was last updated.reserved

Cluster

GET /_admin/v1/cluster

Cluster returns metadata for the cluster.

Support status: reserved

Request Parameters

ClusterRequest requests metadata for the cluster.

Response Parameters

ClusterResponse contains metadata for the cluster.

FieldTypeLabelDescriptionSupport status
cluster_idstringThe unique ID used to identify this cluster.reserved
reporting_enabledboolTrue if diagnostics reporting is enabled for the cluster.reserved
enterprise_enabledboolTrue if enterprise features are enabled for the cluster.reserved

Settings

GET /_admin/v1/settings

Settings returns the cluster-wide settings for the cluster.

Support status: reserved

Request Parameters

SettingsRequest inquires what are the current settings in the cluster.

FieldTypeLabelDescriptionSupport status
keysstringrepeatedThe array of setting keys or names to retrieve. An empty keys array means "all".reserved

Response Parameters

SettingsResponse is the response to SettingsRequest.

FieldTypeLabelDescriptionSupport status
key_valuesSettingsResponse.KeyValuesEntryrepeatedreserved

<a name="cockroach.server.serverpb.SettingsResponse-cockroach.server.serverpb.SettingsResponse.KeyValuesEntry"></a>

SettingsResponse.KeyValuesEntry

FieldTypeLabelDescriptionSupport status
keystring
valueSettingsResponse.Value

<a name="cockroach.server.serverpb.SettingsResponse-cockroach.server.serverpb.SettingsResponse.Value"></a>

SettingsResponse.Value

FieldTypeLabelDescriptionSupport status
valuestringThe value of the setting.reserved
typestringThe type of the setting.reserved
descriptionstringAn extended description text.reserved
publicboolWhether the setting is public or reserved.reserved
last_updatedgoogle.protobuf.TimestampWhen the setting was last updated.reserved
namestringThe setting name for display purposes.reserved

Health

GET /health

Health returns liveness for the node target of the request.

Support status: public

Request Parameters

HealthRequest requests a liveness or readiness check.

A liveness check is triggered via ready set to false. In this mode, an empty response is returned immediately, that is, the caller merely learns that the process is running.

A readiness check (ready == true) is suitable for determining whether user traffic should be directed at a given node, for example by a load balancer. In this mode, a successful response is returned only if the node:

  • is not in the process of shutting down or booting up (including waiting for cluster bootstrap);
  • is regarded as healthy by the cluster via the recent broadcast of a liveness beacon. Absent either of these conditions, an error code will result.
FieldTypeLabelDescriptionSupport status
readyboolready specifies whether the client wants to know whether the target node is ready to receive traffic. If a node is unready, an error will be returned.public

Response Parameters

HealthResponse is the response to HealthRequest. It currently does not contain any information.

Liveness

GET /_admin/v1/liveness

Liveness returns the liveness state of all nodes on the cluster.

Support status: reserved

Request Parameters

LivenessRequest requests liveness data for all nodes on the cluster.

Response Parameters

LivenessResponse contains the liveness status of each node on the cluster.

FieldTypeLabelDescriptionSupport status
livenessescockroach.kv.kvserver.liveness.livenesspb.Livenessrepeatedreserved
statusesLivenessResponse.StatusesEntryrepeatedreserved

<a name="cockroach.server.serverpb.LivenessResponse-cockroach.server.serverpb.LivenessResponse.StatusesEntry"></a>

LivenessResponse.StatusesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.kv.kvserver.liveness.livenesspb.NodeLivenessStatus

Jobs

GET /_admin/v1/jobs

Jobs returns the job records for all jobs of the given status and type.

Support status: reserved

Request Parameters

JobsRequest requests system job information of the given status and type.

FieldTypeLabelDescriptionSupport status
limitint32reserved
statusstringreserved
typecockroach.sql.jobs.jobspb.Typereserved

Response Parameters

JobsResponse contains the job record for each matching job.

FieldTypeLabelDescriptionSupport status
jobsJobResponserepeatedreserved
earliest_retained_timegoogle.protobuf.Timestampreserved

<a name="cockroach.server.serverpb.JobsResponse-cockroach.server.serverpb.JobResponse"></a>

JobResponse

JobResponse contains the job record for a job.

FieldTypeLabelDescriptionSupport status
idint64reserved
typestringreserved
descriptionstringreserved
statementstringreserved
usernamestringreserved
descriptor_idsuint32repeatedreserved
statusstringreserved
createdgoogle.protobuf.Timestampreserved
startedgoogle.protobuf.Timestampreserved
finishedgoogle.protobuf.Timestampreserved
modifiedgoogle.protobuf.Timestampreserved
fraction_completedfloatreserved
errorstringreserved
highwater_timestampgoogle.protobuf.Timestamphighwater_timestamp is the highwater timestamp returned as normal timestamp. This is appropriate for display to humans.reserved
highwater_decimalstringhighwater_decimal is the highwater timestamp in the proprietary decimal form used by logical timestamps internally. This is appropriate to pass to a "AS OF SYSTEM TIME" SQL statement.reserved
running_statusstringreserved
last_rungoogle.protobuf.Timestampreserved
next_rungoogle.protobuf.Timestampreserved
num_runsint64reserved
execution_failuresJobResponse.ExecutionFailurerepeatedExecutionFailures is a log of execution failures of the job. It is not guaranteed to contain all execution failures and some execution failures may not contain an error or end.reserved
coordinator_idint64coordinator_id identifies the node coordinating the job. This value will only be present for jobs that are currently running or recently ran.reserved
messagesJobMessagerepeatedreserved

<a name="cockroach.server.serverpb.JobsResponse-cockroach.server.serverpb.JobResponse.ExecutionFailure"></a>

JobResponse.ExecutionFailure

ExecutionFailure corresponds to a failure to execute the job with the attempt starting at start and ending at end.

FieldTypeLabelDescriptionSupport status
statusstringStatus is the status of the job during the execution.reserved
startgoogle.protobuf.TimestampStart is the time at which the execution started.reserved
endgoogle.protobuf.TimestampEnd is the time at which the error occurred.reserved
errorstringError is the error which occurred.reserved

<a name="cockroach.server.serverpb.JobsResponse-cockroach.server.serverpb.JobMessage"></a>

JobMessage

FieldTypeLabelDescriptionSupport status
kindstringreserved
timestampgoogle.protobuf.Timestampreserved
messagestringreserved

Job

GET /_admin/v1/jobs/{job_id}

Job returns the job record for the job of the given job_id.

Support status: reserved

Request Parameters

JobRequest requests system job information for the given job_id.

FieldTypeLabelDescriptionSupport status
job_idint64reserved

Response Parameters

JobResponse contains the job record for a job.

FieldTypeLabelDescriptionSupport status
idint64reserved
typestringreserved
descriptionstringreserved
statementstringreserved
usernamestringreserved
descriptor_idsuint32repeatedreserved
statusstringreserved
createdgoogle.protobuf.Timestampreserved
startedgoogle.protobuf.Timestampreserved
finishedgoogle.protobuf.Timestampreserved
modifiedgoogle.protobuf.Timestampreserved
fraction_completedfloatreserved
errorstringreserved
highwater_timestampgoogle.protobuf.Timestamphighwater_timestamp is the highwater timestamp returned as normal timestamp. This is appropriate for display to humans.reserved
highwater_decimalstringhighwater_decimal is the highwater timestamp in the proprietary decimal form used by logical timestamps internally. This is appropriate to pass to a "AS OF SYSTEM TIME" SQL statement.reserved
running_statusstringreserved
last_rungoogle.protobuf.Timestampreserved
next_rungoogle.protobuf.Timestampreserved
num_runsint64reserved
execution_failuresJobResponse.ExecutionFailurerepeatedExecutionFailures is a log of execution failures of the job. It is not guaranteed to contain all execution failures and some execution failures may not contain an error or end.reserved
coordinator_idint64coordinator_id identifies the node coordinating the job. This value will only be present for jobs that are currently running or recently ran.reserved
messagesJobMessagerepeatedreserved

<a name="cockroach.server.serverpb.JobResponse-cockroach.server.serverpb.JobResponse.ExecutionFailure"></a>

JobResponse.ExecutionFailure

ExecutionFailure corresponds to a failure to execute the job with the attempt starting at start and ending at end.

FieldTypeLabelDescriptionSupport status
statusstringStatus is the status of the job during the execution.reserved
startgoogle.protobuf.TimestampStart is the time at which the execution started.reserved
endgoogle.protobuf.TimestampEnd is the time at which the error occurred.reserved
errorstringError is the error which occurred.reserved

<a name="cockroach.server.serverpb.JobResponse-cockroach.server.serverpb.JobMessage"></a>

JobMessage

FieldTypeLabelDescriptionSupport status
kindstringreserved
timestampgoogle.protobuf.Timestampreserved
messagestringreserved

Locations

GET /_admin/v1/locations

Locations returns the locality location records.

Support status: reserved

Request Parameters

LocationsRequest requests system locality location information.

Response Parameters

JobsResponse contains the job record for each matching job.

FieldTypeLabelDescriptionSupport status
locationsLocationsResponse.Locationrepeatedreserved

<a name="cockroach.server.serverpb.LocationsResponse-cockroach.server.serverpb.LocationsResponse.Location"></a>

LocationsResponse.Location

FieldTypeLabelDescriptionSupport status
locality_keystringreserved
locality_valuestringreserved
latitudedoublereserved
longitudedoublereserved

QueryPlan

GET /_admin/v1/queryplan

QueryPlan returns the query plans for a SQL string.

Support status: reserved

Request Parameters

QueryPlanRequest requests the query plans for a SQL string.

FieldTypeLabelDescriptionSupport status
querystringquery is the SQL query string.reserved

Response Parameters

QueryPlanResponse contains the query plans for a SQL string (currently only the distsql physical query plan).

FieldTypeLabelDescriptionSupport status
distsql_physical_query_planstringreserved

Drain

Drain puts the node into the specified drain mode(s) and optionally instructs the process to terminate. We do not expose this via HTTP unless we have a way to authenticate

  • authorize streaming RPC connections. See #42567.

Support status: reserved

Request Parameters

DrainRequest instructs the receiving node to drain.

FieldTypeLabelDescriptionSupport status
shutdownboolWhen true, terminates the process after the server has started draining. Setting both shutdown and do_drain to false causes the request to only operate as a probe. Setting do_drain to false and shutdown to true causes the server to shut down immediately without first draining.reserved
do_drainboolWhen true, perform the drain phase. See the comment above on shutdown for an explanation of the interaction between the two. do_drain is also implied by a non-nil deprecated_probe_indicator.reserved
node_idstringnode_id is a string so that "local" can be used to specify that no forwarding is necessary. For compatibility with v21.2 nodes, an empty node_id is interpreted as "local". This behavior might be removed in subsequent versions.reserved
verboseboolWhen true, more detailed information is logged during the range lease drain phase.reserved

Response Parameters

DrainResponse is the response to a successful DrainRequest.

FieldTypeLabelDescriptionSupport status
is_drainingboolis_draining is set to true iff the server is currently draining. This is set to true in response to a request where skip_drain is false; but it can also be set to true in response to a probe request (!shutdown && skip_drain) if another drain request has been issued prior or asynchronously.reserved
drain_remaining_indicatoruint64drain_remaining_indicator measures, at the time of starting to process the corresponding drain request, how many actions to fully drain the node were deemed to be necessary. Some, but not all, of these actions may already have been carried out by the time this indicator is received by the client. The client should issue requests until this indicator first reaches zero, which indicates that the node is fully drained.

The API contract is the following:

  • upon a first Drain call with do_drain set, the remaining indicator will have some value >=0. If >0, it indicates that drain is pushing state away from the node. (What this state precisely means is left unspecified for this field. See below for details.)

  • upon a subsequent Drain call with do_drain set, the remaining indicator should have reduced in value. The drain process does best effort at shedding state away from the node; hopefully, all the state is shed away upon the first call and the progress indicator can be zero as early as the second call. However, if there was a lot of state to shed, it is possible for timeout to be encountered upon the first call. In that case, the second call will do some more work and return a non-zero value as well.

  • eventually, in an iterated sequence of DrainRequests with do_drain set, the remaining indicator should reduce to zero. At that point the client can conclude that no state is left to shed, and it should be safe to shut down the node with a DrainRequest with shutdown = true.

Note that this field is left unpopulated (and thus remains at zero) for pre-20.1 nodes. A client can recognize this by observing is_draining to be false after a request with do_drain = true: the is_draining field is also left unpopulated by pre-20.1 nodes. | reserved | | drain_remaining_description | string | | drain_remaining_description is an informal (= not machine-parsable) string that explains the progress of the drain process to human eyes. This is intended for use mainly for troubleshooting.

The field is only populated if do_drain is true in the request. | reserved |

DecommissionPreCheck

DecommissionPreCheck requests that the server execute preliminary checks to evaluate the possibility of successfully decommissioning a given node.

Support status: reserved

Request Parameters

DecommissionPreCheckRequest requests that preliminary checks be run to ensure that the specified node(s) can be decommissioned successfully.

FieldTypeLabelDescriptionSupport status
node_idsint32repeatedreserved
num_replica_reportint32The maximum number of ranges for which to report errors.reserved
strict_readinessboolIf true, all ranges on the checked nodes must only need replacement or removal for decommissioning.reserved
collect_tracesboolIf true, collect traces for each range checked. Requires num_replica_report > 0.reserved

Response Parameters

DecommissionPreCheckResponse returns the number of replicas that encountered errors when running preliminary decommissioning checks, as well as the associated error messages and traces, for each node.

FieldTypeLabelDescriptionSupport status
checked_nodesDecommissionPreCheckResponse.NodeCheckResultrepeatedStatus of the preliminary decommission checks across nodes.reserved

<a name="cockroach.server.serverpb.DecommissionPreCheckResponse-cockroach.server.serverpb.DecommissionPreCheckResponse.NodeCheckResult"></a>

DecommissionPreCheckResponse.NodeCheckResult

The result of checking a single node's readiness for decommission.

FieldTypeLabelDescriptionSupport status
node_idint32reserved
decommission_readinessDecommissionPreCheckResponse.NodeReadinessThe node's decommission readiness status.reserved
replica_countint64The number of total replicas on the node, computed by scanning range descriptors.reserved
checked_rangesDecommissionPreCheckResponse.RangeCheckResultrepeatedThe details and recorded traces from preprocessing each range with a replica on the checked nodes that resulted in error, up to the maximum specified in the request.reserved

<a name="cockroach.server.serverpb.DecommissionPreCheckResponse-cockroach.server.serverpb.DecommissionPreCheckResponse.RangeCheckResult"></a>

DecommissionPreCheckResponse.RangeCheckResult

The result of checking a range's readiness for the decommission.

FieldTypeLabelDescriptionSupport status
range_idint32reserved
actionstringThe action determined by the allocator that is needed for the range.reserved
eventsTraceEventrepeatedAll trace events collected while checking the range.reserved
errorstringThe error message from the allocator's processing, if any.reserved

<a name="cockroach.server.serverpb.DecommissionPreCheckResponse-cockroach.server.serverpb.TraceEvent"></a>

TraceEvent

FieldTypeLabelDescriptionSupport status
timegoogle.protobuf.Timestampreserved
messagestringreserved

Decommission

Decommission puts the node(s) into the specified decommissioning state. If this ever becomes exposed via HTTP, ensure that it performs authorization. See #42567.

Support status: reserved

Request Parameters

DecommissionRequest requests the server to set the membership status on all nodes specified by NodeIDs to the value of TargetMembership.

If no NodeIDs are given, it targets the recipient node.

FieldTypeLabelDescriptionSupport status
node_idsint32repeatedreserved
target_membershipcockroach.kv.kvserver.liveness.livenesspb.MembershipStatusreserved
num_replica_reportint32The number of decommissioning replicas to be reported.reserved

Response Parameters

DecommissionStatusResponse lists decommissioning statuses for a number of NodeIDs.

FieldTypeLabelDescriptionSupport status
statusDecommissionStatusResponse.StatusrepeatedStatus of all affected nodes.reserved

<a name="cockroach.server.serverpb.DecommissionStatusResponse-cockroach.server.serverpb.DecommissionStatusResponse.Status"></a>

DecommissionStatusResponse.Status

FieldTypeLabelDescriptionSupport status
node_idint32reserved
is_liveboolreserved
replica_countint64The number of replicas on the node, computed by scanning meta2 ranges.reserved
membershipcockroach.kv.kvserver.liveness.livenesspb.MembershipStatusThe membership status of the given node.reserved
drainingboolreserved
reported_replicasDecommissionStatusResponse.ReplicarepeatedDecommissioning replicas on the given node to be reported. How many replicas are reported is determined by what was specified in the request.reserved

<a name="cockroach.server.serverpb.DecommissionStatusResponse-cockroach.server.serverpb.DecommissionStatusResponse.Replica"></a>

DecommissionStatusResponse.Replica

FieldTypeLabelDescriptionSupport status
replica_idint32reserved
range_idint32reserved

DecommissionStatus

DecommissionStatus retrieves the decommissioning status of the specified nodes. If this ever becomes exposed via HTTP, ensure that it performs authorization. See #42567.

Support status: reserved

Request Parameters

DecommissionStatusRequest requests the decommissioning status for the specified or, if none are specified, all nodes.

FieldTypeLabelDescriptionSupport status
node_idsint32repeatedreserved
num_replica_reportint32The number of decommissioning replicas to be reported.reserved

Response Parameters

DecommissionStatusResponse lists decommissioning statuses for a number of NodeIDs.

FieldTypeLabelDescriptionSupport status
statusDecommissionStatusResponse.StatusrepeatedStatus of all affected nodes.reserved

<a name="cockroach.server.serverpb.DecommissionStatusResponse-cockroach.server.serverpb.DecommissionStatusResponse.Status"></a>

DecommissionStatusResponse.Status

FieldTypeLabelDescriptionSupport status
node_idint32reserved
is_liveboolreserved
replica_countint64The number of replicas on the node, computed by scanning meta2 ranges.reserved
membershipcockroach.kv.kvserver.liveness.livenesspb.MembershipStatusThe membership status of the given node.reserved
drainingboolreserved
reported_replicasDecommissionStatusResponse.ReplicarepeatedDecommissioning replicas on the given node to be reported. How many replicas are reported is determined by what was specified in the request.reserved

<a name="cockroach.server.serverpb.DecommissionStatusResponse-cockroach.server.serverpb.DecommissionStatusResponse.Replica"></a>

DecommissionStatusResponse.Replica

FieldTypeLabelDescriptionSupport status
replica_idint32reserved
range_idint32reserved

RangeLog

GET /_admin/v1/rangelog/{range_id}

URL: /_admin/v1/rangelog URL: /_admin/v1/rangelog?limit=100 URL: /_admin/v1/rangelog/1 URL: /_admin/v1/rangelog/1?limit=100

Support status: reserved

Request Parameters

RangeLogRequest request the history of a range from the range log.

FieldTypeLabelDescriptionSupport status
range_idint64TODO(tamird): use [(gogoproto.customname) = "RangeID"] below. Need to figure out how to teach grpc-gateway about custom names. If RangeID is 0, returns range log history without filtering by range.reserved
limitint32limit is the total number of results that are retrieved by the query. If this is omitted or set to 0, the default maximum number of results are returned. When set to > 0, at most only that number of results are returned. When set to < 0, an unlimited number of results are returned.reserved

Response Parameters

RangeLogResponse contains a list of entries from the range log table.

FieldTypeLabelDescriptionSupport status
eventsRangeLogResponse.Eventrepeatedreserved

<a name="cockroach.server.serverpb.RangeLogResponse-cockroach.server.serverpb.RangeLogResponse.Event"></a>

RangeLogResponse.Event

FieldTypeLabelDescriptionSupport status
eventcockroach.kv.kvserver.storagepb.RangeLogEventreserved
pretty_infoRangeLogResponse.PrettyInforeserved

<a name="cockroach.server.serverpb.RangeLogResponse-cockroach.server.serverpb.RangeLogResponse.PrettyInfo"></a>

RangeLogResponse.PrettyInfo

To avoid porting the pretty printing of keys and descriptors to javascript, they will be precomputed on the serverside.

FieldTypeLabelDescriptionSupport status
updated_descstringreserved
new_descstringreserved
added_replicastringreserved
removed_replicastringreserved
reasonstringreserved
detailsstringreserved

DataDistribution

GET /_admin/v1/data_distribution

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
database_infoDataDistributionResponse.DatabaseInfoEntryrepeatedBy database name.reserved
zone_configsDataDistributionResponse.ZoneConfigsEntryrepeatedBy zone name.reserved

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.DatabaseInfoEntry"></a>

DataDistributionResponse.DatabaseInfoEntry

FieldTypeLabelDescriptionSupport status
keystring
valueDataDistributionResponse.DatabaseInfo

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.DatabaseInfo"></a>

DataDistributionResponse.DatabaseInfo

FieldTypeLabelDescriptionSupport status
table_infoDataDistributionResponse.DatabaseInfo.TableInfoEntryrepeatedBy table name.reserved

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.DatabaseInfo.TableInfoEntry"></a>

DataDistributionResponse.DatabaseInfo.TableInfoEntry

FieldTypeLabelDescriptionSupport status
keystring
valueDataDistributionResponse.TableInfo

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.TableInfo"></a>

DataDistributionResponse.TableInfo

FieldTypeLabelDescriptionSupport status
replica_count_by_node_idDataDistributionResponse.TableInfo.ReplicaCountByNodeIdEntryrepeatedreserved
dropped_atgoogle.protobuf.Timestampreserved

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.TableInfo.ReplicaCountByNodeIdEntry"></a>

DataDistributionResponse.TableInfo.ReplicaCountByNodeIdEntry

FieldTypeLabelDescriptionSupport status
keyint32
valueint64

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.ZoneConfigsEntry"></a>

DataDistributionResponse.ZoneConfigsEntry

FieldTypeLabelDescriptionSupport status
keystring
valueDataDistributionResponse.ZoneConfig

<a name="cockroach.server.serverpb.DataDistributionResponse-cockroach.server.serverpb.DataDistributionResponse.ZoneConfig"></a>

DataDistributionResponse.ZoneConfig

FieldTypeLabelDescriptionSupport status
targetstringtarget is the object the zone config applies to, e.g. "DATABASE db" or "PARTITION north_america OF TABLE users".reserved
configcockroach.config.zonepb.ZoneConfigreserved
config_sqlstringconfig_sql is the SQL representation of config.reserved

AllMetricMetadata

GET /_admin/v1/metricmetadata

URL: /_admin/v1/metricmetadata

Support status: reserved

Request Parameters

MetricMetadataRequest requests metadata for all metrics.

Response Parameters

MetricMetadataResponse contains the metadata for all metrics.

FieldTypeLabelDescriptionSupport status
metadataMetricMetadataResponse.MetadataEntryrepeatedreserved
recordedNamesMetricMetadataResponse.RecordedNamesEntryrepeatedMaps of metric metadata names to the tsdb recorded metric namesreserved

<a name="cockroach.server.serverpb.MetricMetadataResponse-cockroach.server.serverpb.MetricMetadataResponse.MetadataEntry"></a>

MetricMetadataResponse.MetadataEntry

FieldTypeLabelDescriptionSupport status
keystring
valuecockroach.util.metric.Metadata

<a name="cockroach.server.serverpb.MetricMetadataResponse-cockroach.server.serverpb.MetricMetadataResponse.RecordedNamesEntry"></a>

MetricMetadataResponse.RecordedNamesEntry

FieldTypeLabelDescriptionSupport status
keystring
valuestring

ChartCatalog

GET /_admin/v1/chartcatalog

URL: /_admin/v1/chartcatalog

Support status: reserved

Request Parameters

ChartCatalogRequest requests returns a catalog of Admin UI charts.

Response Parameters

ChartCatalogResponse returns a catalog of Admin UI charts useful for debugging.

FieldTypeLabelDescriptionSupport status
catalogcockroach.ts.catalog.ChartSectionrepeatedreserved

EnqueueRange

POST /_admin/v1/enqueue_range

EnqueueRange runs the specified range through the specified queue on the range's leaseholder store, returning the detailed trace and error information from doing so. Parameters must be provided in the body of the POST request. For example:

{ "queue": "raftlog", "rangeId": 10 }

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
node_idint32The node on which the queue should process the range. If node_id is 0, the request will be forwarded to all other nodes.reserved
queuestringThe name of the replica queue to run the range through. Matched against each queue's name field. See the implementation of baseQueue for details.reserved
range_idint32The ID of the range to run through the queue.reserved
skip_should_queueboolIf set, run the queue's process method without first checking whether the replica should be processed by calling shouldQueue.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
detailsEnqueueRangeResponse.Detailsrepeatedreserved

<a name="cockroach.server.serverpb.EnqueueRangeResponse-cockroach.server.serverpb.EnqueueRangeResponse.Details"></a>

EnqueueRangeResponse.Details

FieldTypeLabelDescriptionSupport status
node_idint32reserved
eventsTraceEventrepeatedAll trace events collected while processing the range in the queue.reserved
errorstringThe error message from the queue's processing, if any.reserved

<a name="cockroach.server.serverpb.EnqueueRangeResponse-cockroach.server.serverpb.TraceEvent"></a>

TraceEvent

FieldTypeLabelDescriptionSupport status
timegoogle.protobuf.Timestampreserved
messagestringreserved

SendKVBatch

SendKVBatch proxies the given BatchRequest into KV, returning the response. It is used by the CLI debug send-kv-batch command.

Support status: reserved

Request Parameters

Response Parameters

ListTracingSnapshots

GET /_admin/v1/trace_snapshots

ListTracingSnapshots retrieves the list of snapshots of the Active Spans Registry that the node currently has in memory. A new snapshot can be captured with TakeTracingSnapshots.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
snapshotsSnapshotInforepeatedreserved

<a name="cockroach.server.serverpb.ListTracingSnapshotsResponse-cockroach.server.serverpb.SnapshotInfo"></a>

SnapshotInfo

FieldTypeLabelDescriptionSupport status
snapshot_idint64SnapshotID identifies a specific snapshot which can be requested via a GetTracingSnapshotRequest. Negative IDs are used for "automatic" snapshots.reserved
captured_atgoogle.protobuf.Timestampreserved

TakeTracingSnapshot

POST /_admin/v1/trace_snapshots

TakeTracingSnapshot captures a new snapshot of the Active Spans Registry. The new snapshot is returned, and also made available through ListTracingSnapshots.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
snapshotSnapshotInforeserved

<a name="cockroach.server.serverpb.TakeTracingSnapshotResponse-cockroach.server.serverpb.SnapshotInfo"></a>

SnapshotInfo

FieldTypeLabelDescriptionSupport status
snapshot_idint64SnapshotID identifies a specific snapshot which can be requested via a GetTracingSnapshotRequest. Negative IDs are used for "automatic" snapshots.reserved
captured_atgoogle.protobuf.Timestampreserved

GetTracingSnapshot

GET /_admin/v1/trace_snapshots/{snapshot_id}

GetTracingSnapshot returns a snapshot of the tracing spans in the active spans registry previously generated through TakeTracingSnapshots.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
snapshot_idint64SnapshotId indicates which snapshot is requested. ID may be negative when requesting an "automatic" snapshot; see ListTracingSnapshotsResponse.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
snapshotTracingSnapshotreserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.TracingSnapshot"></a>

TracingSnapshot

TracingSnapshot represents a snapshot of the active spans registry, including all the spans that were open at the time when the snapshot was taken.

FieldTypeLabelDescriptionSupport status
snapshot_idint64reserved
captured_atgoogle.protobuf.Timestampreserved
spansTracingSpanrepeatedreserved
stacksTracingSnapshot.StacksEntryrepeatedIdeally we'd use int64 to match the goroutine_id type but unfortunately, the way that grpc-gateway parses these objects into Javascript results in odd encodings of Long JS types that are difficult to interact with as map keys. Thus, we settle for string.reserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.TracingSpan"></a>

TracingSpan

TracingSpan represents a span, in a form slightly processed for the use of the tracing UI.

FieldTypeLabelDescriptionSupport status
operationstringreserved
trace_iduint64reserved
span_iduint64reserved
parent_span_iduint64reserved
startgoogle.protobuf.Timestampreserved
goroutine_iduint64reserved
processed_tagsSpanTagrepeatedreserved
currentboolcurrent is set if the span is still alive (i.e. still present in the active spans registry).reserved
current_recording_modecockroach.util.tracing.tracingpb.RecordingModecurrent_recording_mode represents the span's current recording mode. This is not set if current == false.reserved
children_metadataNamedOperationMetadatarepeatedreserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.SpanTag"></a>

SpanTag

SpanTag represents a tag on a tracing span, in a form processed for the use of the tracing UI.

FieldTypeLabelDescriptionSupport status
keystringreserved
valstringreserved
captionstringreserved
linkstringreserved
hiddenboolreserved
highlightboolreserved
inheritboolreserved
inheritedboolreserved
propagate_upboolreserved
copied_from_childboolreserved
childrenChildSpanTagrepeatedMay be empty.reserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.ChildSpanTag"></a>

ChildSpanTag

FieldTypeLabelDescriptionSupport status
keystringreserved
valstringreserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.NamedOperationMetadata"></a>

NamedOperationMetadata

FieldTypeLabelDescriptionSupport status
namestringreserved
metadatacockroach.util.tracing.tracingpb.OperationMetadatareserved

<a name="cockroach.server.serverpb.GetTracingSnapshotResponse-cockroach.server.serverpb.TracingSnapshot.StacksEntry"></a>

TracingSnapshot.StacksEntry

FieldTypeLabelDescriptionSupport status
keystring
valuestring

GetTrace

POST /_admin/v1/traces

GetTrace returns the trace with a specified ID. Depending on the request, the trace is returned either from a snapshot that was previously taken, or directly from the active spans registry.

Support status: reserved

Request Parameters

GetTrace represents the request of the GetTrace RPC.

FieldTypeLabelDescriptionSupport status
snapshot_idint64If a snapshot is specified, the trace information is returned from that snapshot. If a snapshot is not specified, information about currently opened spans is returned from the active spans registry.reserved
trace_iduint64reserved
recording_typecockroach.util.tracing.tracingpb.RecordingModereserved

Response Parameters

GetTrace represents the response to the GetTrace RPC.

FieldTypeLabelDescriptionSupport status
snapshot_idint64snapshot_id identifies the snapshot that the trace was retrieved from. If 0, the trace was not retrieved from a registry, but directly from the active spans registry.reserved
trace_iduint64reserved
still_existsboolstill_exists is set if any spans from this trace are currently present in the active spans registry.

If snapshot_id is 0, still_exists is always set. | reserved | | serialized_recording | string | | serialized_recording represents the serialization of trace recording. We return the recording already serialized as formatted string for easy consumption in the browser. | reserved |

SetTraceRecordingType

POST /_admin/v1/settracerecordingtype

SetTraceRecordingType sets the recording mode of all or some of the spans in a trace.

Support status: reserved

Request Parameters

SetTraceRecordingTypeRequest is the request for SetTraceRecordingType, which sets the recording mode of all or some of the spans in a trace.

FieldTypeLabelDescriptionSupport status
trace_iduint64TraceID identifies the trace to toggle the recording of. It must always be specified.reserved
span_iduint64SpanID, if not zero, controls which spans in the trace get their recording mode set. If zero, all spans in the trace are updated. If not zero, only the respective span and its descendants get updated.reserved
recording_modecockroach.util.tracing.tracingpb.RecordingModereserved

Response Parameters

SetTraceRecordingTypeRequest is the response for SetTraceRecordingType.

RecoveryCollectReplicaInfo

RecoveryCollectReplicaInfo retrieves information about:

  1. range descriptors contained in cluster meta ranges if meta ranges are readable;
  2. replica information from all live nodes that have connection to the target node.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
max_concurrencyint32MaxConcurrency is the maximum parallelism that will be used when fanning out RPCs to nodes in the cluster while servicing this request. A value of 0 disables concurrency. A negative value configures no limit for concurrency.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
range_descriptorcockroach.roachpb.RangeDescriptorreserved
replica_infocockroach.kv.kvserver.loqrecovery.loqrecoverypb.ReplicaInforeserved
node_stream_restartedRecoveryCollectReplicaRestartNodeStreamreserved
metadatacockroach.kv.kvserver.loqrecovery.loqrecoverypb.ClusterMetadatareserved

<a name="cockroach.server.serverpb.RecoveryCollectReplicaInfoResponse-cockroach.server.serverpb.RecoveryCollectReplicaRestartNodeStream"></a>

RecoveryCollectReplicaRestartNodeStream

RecoveryCollectReplicaRestartNodeStream is sent by collector node to client if it experiences a transient failure collecting data from one of the nodes. This message instructs client to drop any data that it collected locally for specified node as streaming for this node would be restarted. This mechanism is needed to avoid restarting the whole collection procedure in large cluster if one of the nodes fails transiently.

FieldTypeLabelDescriptionSupport status
node_idint32reserved

RecoveryCollectLocalReplicaInfo

RecoveryCollectLocalReplicaInfo retrieve information about all local replicas in all stores on the node.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
replica_infocockroach.kv.kvserver.loqrecovery.loqrecoverypb.ReplicaInforeserved

RecoveryStagePlan

RecoveryStagePlan stages recovery plan on target or all nodes in cluster depending on request content and marks nodes deleted in the plan as decommissioned in each node's local node tombstone storage.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
plancockroach.kv.kvserver.loqrecovery.loqrecoverypb.ReplicaUpdatePlanPlan is replica update plan to stage for application on next restart. Plan could be empty in that case existing plan is removed if present.reserved
all_nodesboolIf all nodes is true, then receiver should act as a coordinator and perform a fan-out to stage plan on all nodes of the cluster.reserved
force_planboolForcePlan tells receiver to ignore any plan already staged on the node if it is present and replace it with new plan (including empty one).reserved
force_local_internal_versionboolForceLocalInternalVersion tells server to update internal component of plan version to the one of active cluster version. This option needs to be set if target cluster is stuck in recovery where only part of nodes were successfully migrated.reserved
max_concurrencyint32MaxConcurrency is the maximum parallelism that will be used when fanning out RPCs to nodes in the cluster while servicing this request. A value of 0 disables concurrency. A negative value configures no limit for concurrency.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
errorsstringrepeatedErrors contain error messages happened during plan staging.reserved

RecoveryNodeStatus

RecoveryNodeStatus retrieves loss of quorum recovery status of a single node.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
statuscockroach.kv.kvserver.loqrecovery.loqrecoverypb.NodeRecoveryStatusreserved

RecoveryVerify

RecoveryVerify verifies that recovery plan is applied on all necessary nodes, ranges are available and nodes removed in plan are marked as decommissioned.

Support status: reserved

Request Parameters

FieldTypeLabelDescriptionSupport status
plan_idbytesPlanID is ID of the plan to verify.reserved
decommissioned_node_idsint32repeatedDecommissionedNodeIDs is a set of nodes that should be marked as decommissioned in the cluster when loss of quorum recovery successfully applies.reserved
max_reported_rangesint32MaxReportedRanges is the maximum number of failed ranges to report. If more unhealthy ranges are found, error will be returned alongside range to indicate that ranges were cut short.reserved
max_concurrencyint32MaxConcurrency is the maximum parallelism that will be used when fanning out RPCs to nodes in the cluster while servicing this request. A value of 0 disables concurrency. A negative value configures no limit for concurrency.reserved

Response Parameters

FieldTypeLabelDescriptionSupport status
statusescockroach.kv.kvserver.loqrecovery.loqrecoverypb.NodeRecoveryStatusrepeatedStatuses contain a list of recovery statuses of nodes updated during recovery. It also contains nodes that were expected to be live (not decommissioned by recovery) but failed to return status response.reserved
unavailable_rangesRecoveryVerifyResponse.UnavailableRangesUnavailableRanges contains information about ranges that failed health check.reserved
decommissioned_node_statusesRecoveryVerifyResponse.DecommissionedNodeStatusesEntryrepeatedDecommissionedNodeStatuses contains a map of requested IDs with their corresponding liveness statuses.reserved

<a name="cockroach.server.serverpb.RecoveryVerifyResponse-cockroach.server.serverpb.RecoveryVerifyResponse.UnavailableRanges"></a>

RecoveryVerifyResponse.UnavailableRanges

FieldTypeLabelDescriptionSupport status
rangescockroach.kv.kvserver.loqrecovery.loqrecoverypb.RangeRecoveryStatusrepeatedRanges contains descriptors of ranges that failed health check. If there are too many ranges to report, error would contain relevant message.reserved
errorstringError contains an optional error if ranges validation can't complete.reserved

<a name="cockroach.server.serverpb.RecoveryVerifyResponse-cockroach.server.serverpb.RecoveryVerifyResponse.DecommissionedNodeStatusesEntry"></a>

RecoveryVerifyResponse.DecommissionedNodeStatusesEntry

FieldTypeLabelDescriptionSupport status
keyint32
valuecockroach.kv.kvserver.liveness.livenesspb.MembershipStatus

ListTenants

GET /_admin/v1/tenants

ListTenants returns a list of active tenants in the cluster.

Support status: reserved

Request Parameters

Response Parameters

FieldTypeLabelDescriptionSupport status
tenantsTenantrepeatedreserved

<a name="cockroach.server.serverpb.ListTenantsResponse-cockroach.server.serverpb.Tenant"></a>

Tenant

FieldTypeLabelDescriptionSupport status
tenant_idcockroach.roachpb.TenantIDreserved
tenant_namestringreserved
sql_addrstringreserved
rpc_addrstringreserved

ReadFromTenantInfo

ReadFromTenantInfo returns the tenant from which the requesting tenant should read, if any.

Support status: reserved

Request Parameters

ReadFromTenantInfoRequest requests info, if any, on which tenant the caller should read from.

FieldTypeLabelDescriptionSupport status
tenant_idcockroach.roachpb.TenantIDTenantID should always be the ID of the tenant making the request. This duplicates the ID in the auth context that is added implicitly, and must always match that ID when that ID is present, however that ID is absent in insecure test clusters which is why we also specify it explicitly here.reserved

Response Parameters

ReadFromTenantInfoResponse instructs a tenant as to which tenant, if any, it should configure itself to read from and the timestamp at which it should do so.

FieldTypeLabelDescriptionSupport status
read_fromcockroach.roachpb.TenantIDreserved
read_atcockroach.util.hlc.Timestampreserved