http://<host:<http-port/_status/varshttp://<host:<http-port/metrics: an enhanced endpoint with additional static labels
In addition to using the exported time-series data to monitor a cluster through an external system, you can write alerting rules to ensure prompt notification of critical events or issues requiring intervention or investigation. Refer to for more details.
_status/vars
To access the _status/vars Prometheus endpoint of a cluster running on localhost:8080:
sql_*_count*.
metrics
This feature is in and subject to change. To share feedback and/or issues, contact Support.
metrics Prometheus endpoint is commonly used and is the default in Prometheus configurations.
To access the metrics Prometheus endpoint of a cluster running on localhost:8080:
sql_count, with static labels for query_type (with values of insert, select, update, and delete) and query_internal (with value of true).
Static labels
One common use of static labels is to allow segmentation of a metric across various facets for later querying and aggregation. For example, rather than emitting separate metrics forINSERT, SELECT, UPDATE, and DELETE statements, the single metric sql_count uses the query_type label to distinguish between these operations. This enables operators to easily aggregate across query types (e.g., summing a metric for all SQL operations) or filter for a specific type using the appropriate value for the query_type label.
The following tables contrast unlabeled metrics from the _status/vars endpoint with their labeled counterparts from the metrics endpoint:
Unlabeled metrics from the \_status/vars endpoint | Labeled metrics from the metrics endpoint |
|---|---|
sql\_insert\_count | sql\_count{query\_type="insert"} |
sql\_select\_count | sql\_count{query\_type="select"} |
sql\_update\_count | sql\_count{query\_type="update"} |
sql\_delete\_count | sql\_count{query\_type="delete"} |
Unlabeled sum query from the \_status/vars endpoint | Labeled sum query from the metrics endpoint |
|---|---|
sum(sql\_insert\_count, sql\_delete\_count, sql\_select\_count) | sum(sql\_count) |
| This query must be updated if new types are added, as each will have a unique metric name. | This query is resilient to new type additions. |
| Related metrics can be found via autocomplete in a third-party tool, but the results may be ambiguous. | All label values can be found through a third-party query engine and used to easily construct a graph with individual lines for each label value. |
security_certificate_expiration is reused, with the certificate type expressed as a label. The metrics endpoint returns output similar to the following:

