Skip to main content

Databend Query Metrics

A databend-query server records metrics in table system.metrics.

The metric_api_address to listen on that can be scraped by Prometheus and will return a prometheus format of metrics.

Note: Default metric_api_address value is : 127.0.0.1:7070 , Prometheus can access this uri: http://127.0.0.1:7070/metrics

MySQL> DESC system.metrics;
+--------+---------+------+---------+-------+
| Field | Type | Null | Default | Extra |
+--------+---------+------+---------+-------+
| metric | VARCHAR | NO | | |
| kind | VARCHAR | NO | | |
| labels | VARCHAR | NO | | |
| value | VARCHAR | NO | | |
+--------+---------+------+---------+-------+

Metrics has four attributes: metric, kind, labels, value.

metric indicate the name of the metric contained in the databend-query.

kind records the kind of metric. Available kinds:

labels records the label of metric.

value records the value of metric.

Metrics​

info

Databend uses summary metrics to keep track of the total time spent handling various requests. Value quantile contains: [0.0, 0.5, 0.9, 0.99, 0.999].

metrickinddescriptionlabels
cluster_discovered_node_gaugegaugeThe number of nodes discovered in the current cluster.tenant_id, cluster_id, flight_address and local_id(a inner cluster unique id)
interpreter_usedtimesummarySql interpreter used time.
meta_grpc_client_request_duration_mssummaryThe time used for requesting the remote meta service.endpoint, request
meta_grpc_client_request_inflightgaugeThe currently on going request to remote meta service.
meta_grpc_client_request_successcounterThe total amount for successful request to remote meta service.
mysql_process_request_durationsummaryMySQL interactive process request used.
opendal_bytes_totalcounterThe total data size opendal handled in byte.operation, service
opendal_errors_totalcounterThe total error count of opendal operations.operation, service
opendal_failures_totalcounterThe total failure count of opendal operations.operation, service
opendal_requests_duration_secondssummaryThe time used by opendal to request remote storage backend.operation, service
opendal_requests_totalcounterThe total count of opendal operations.operation, service
query_duration_mssummaryThe time used by each single query.tenant, cluster, handler, kind
query_result_bytescounterThe total returned data size of query result in byte.tenant, cluster, handler, kind
query_result_rowscounterThe total returned data rows of query result.tenant, cluster, handler, kind
query_scan_bytescounterThe total scanned data size by query in byte.tenant, cluster, handler, kind
query_scan_io_bytescounterThe total scanned transferred data size by query in byte.tenant, cluster, handler, kind
query_scan_partitionscounterThe total scanned partitions by query.tenant, cluster, handler, kind
query_scan_rowscounterThe total scanned data rows by query.tenant, cluster, handler, kind
query_startcounterThe total count of query started.tenant, cluster, handler, kind
query_successcounterThe total count of query succeeded.tenant, cluster, handler, kind
query_total_partitionscounterThe total partitions for query.tenant, cluster, handler, kind
query_write_bytescounterThe total data size written by query in byte.tenant, cluster, handler, kind
query_write_io_bytescounterThe total data size written and transferred by query in byte.tenant, cluster, handler, kind
query_write_rowscounterThe total data rows written by query.tenant, cluster, handler, kind
session_close_numberscounterThe number of sessions have been disconnected since the server was started.tenant, cluster_name
session_connect_numberscounterThe number of sessions have been connected since the server was started.tenant, cluster_name