LogoLogo
DoltHubBlogDiscordGitHubDolt
  • Introduction
    • What Is Dolt?
    • Installation
      • Linux
      • Windows
      • Mac
      • Build from Source
      • Application Server
      • Docker
      • Upgrading
    • Getting Started
      • Version Controlled Database
      • Git For Data
      • Versioned MySQL Replica
    • Use Cases
      • Data Sharing
      • Data and Model Quality Control
      • Manual Data Curation
      • Version Control for your Application
      • Versioned MySQL Replica
      • Audit
      • Configuration Management
      • Offline First
  • Concepts
    • Dolt
      • Git
        • Commits
        • Log
        • Diff
        • Branch
        • Merge
        • Conflicts
        • Remotes
        • Working Set
      • SQL
        • Databases
        • Schema
        • Tables
        • Primary Keys
        • Types
        • Indexes
        • Views
        • Constraints
        • Triggers
        • Procedures
        • Users/Grants
        • Transactions
        • System Variables
      • RDBMS
        • Server
        • Backups
        • Replication
    • DoltHub/DoltLab
      • Permissions
      • Pull Requests
      • Issues
      • Forks
  • SQL Reference
    • Running the Server
      • Configuration
      • Access Management
      • Branch Permissions
      • Backups
      • Garbage Collection
      • Metrics
      • Replication
      • Troubleshooting
    • Version Control Features
      • Using Branches
      • Merges
      • Querying History
      • Using Remotes
      • Procedures
      • Functions
      • System Tables
      • System Variables
      • Saved Queries
    • SQL Language Support
      • Data Description
      • Expressions, Functions, Operators
      • Supported Statements
      • MySQL Information Schema
      • Collations and Character Sets
      • System Variables
      • Miscellaneous
    • Supported Clients
      • Programmatic
      • SQL Editors
    • Benchmarks and Metrics
      • Correctness
      • Latency
      • Import
  • CLI Reference
    • Commands
    • Git Comparison
  • Architecture
    • Overview
    • Storage Engine
      • Commit Graph
      • Prolly Trees
      • Block Store
    • SQL
      • Go MySQL Server
      • Vitess
  • Guides
    • Cheat Sheet
    • Contributing
      • dolt
      • go-mysql-server
    • MySQL to Dolt Replication
    • Importing Data
    • Integrations
  • Other
    • FAQ
    • Roadmap
    • Versioning
  • Products
    • Hosted Dolt
      • Getting Started
      • Notable Features
      • SQL Workbench
      • Cloning a Hosted Database
      • Using DoltHub as a Remote
      • Infrastructure
    • DoltHub
      • Data Sharing
      • API
        • Authentication
        • SQL
        • CSV
        • Database
        • Hooks
      • Continuous Integration
        • Getting Started
        • Workflow Reference
      • Transform File Uploads
      • Workspaces
    • DoltLab
    • Dolt Workbench
    • DoltgreSQL
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. SQL Reference
  2. Running the Server

Metrics

PreviousGarbage CollectionNextReplication

Last updated 3 months ago

Was this helpful?

Dolt's SQL server can optionally expose metrics through a HTTP endpoint. You can enable the Prometheus HTTP endpoint by defining a metrics section in your . The following YAML configuration file shows a complete configuration file that enables Prometheus metrics on port 11228:

log_level: info

listener:
  host: localhost
  port: 11227
  max_connections: 100
  read_timeout_millis: 28800000
  write_timeout_millis: 28800000

metrics:
  labels: {}
  host: localhost
  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.

Scraping with Prometheus

After you've inspected the metrics by manually looking the /metrics page, 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:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "dolt-sql-server"
    static_configs:
    - targets: ["localhost:11228"]

Other monitoring products, such as , can also be configured to exposed by a Dolt SQL server.

Prometheus
YAML configuration
Datadog
scrape metrics from the Prometheus HTTP endpoint