Comment on page
Dolt's SQL server can optionally expose metrics through a Prometheus HTTP endpoint. You can enable the Prometheus HTTP endpoint by defining a
metricssection in your YAML configuration. The following YAML configuration file shows a complete configuration file that enables Prometheus metrics on port 11228:
Once you start a Dolt SQL server with the configuration above, you'll be able to view all the exposed metrics and their descriptions at http://localhost:11228/metrics. The metrics prefixed with
dss_are Dolt SQL server metrics, and metrics prefixed with
go_are Golang runtime metrics.
Important Dolt SQL Server Metrics
dss_concurrent_connections– Number of clients concurrently connected to this Dolt SQL server.
dss_concurrent_queries– Number of queries concurrently being run on this instance of Dolt SQL server.
dss_query_duration_bucket– Histogram buckets of Dolt SQL server query latencies.
dss_is_replica– Indicates if this Dolt SQL server is a replica. (Only exposed when replication is enabled)
dss_replication_lag– The replication lag in ms for this replica. (Only exposed when replication is enabled)
Important Go Runtime Metrics
go_gc_duration_seconds– Histogram buckets containing counts for different pause durations of garbage collection cycles.
go_gc_duration_seconds_count– The total number of seconds Dolt has spent performing garbage collection.
go_memstats_alloc_bytes– Number of bytes allocated and still in use.
After you've inspected the metrics by manually looking the
/metricspage, you can configure a Prometheus server to scrape that data so you can use the Prometheus web UI to explore your metrics. Here's an example Prometheus server configuration file showing how to configure metrics scraping for a Dolt SQL server with metrics exposed on port 11228:
- job_name: "dolt-sql-server"
- targets: ["localhost:11228"]