LogoLogo
BlogDiscordGitHubDoltgres
  • Introduction
    • What is Doltgres?
    • Installation
    • Getting Started
  • Concepts
    • Git
      • Commits
      • Log
      • Diff
      • Branch
      • Merge
      • Conflicts
      • Remotes
      • Working Set
    • SQL
      • Databases
      • Schema
      • Tables
      • Primary Keys
      • Types
      • Indexes
      • Views
      • Constraints
      • Triggers
      • Functions
      • Procedures
      • Users/Grants
      • Transactions
      • System Variables
    • RDBMS
      • Server
      • Backups
      • Replication
  • Guides
    • Cheat Sheet
    • Replication from Postgres
  • 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
      • Functions
      • System Tables
      • System Variables
    • SQL Language Support
      • Supported Functions and Operators
      • Supported Types
      • Supported SQL Commands
      • System Catalog Schema
    • Supported Clients
      • Programmatic
    • Benchmarks
      • Correctness
      • Latency
Powered by GitBook
On this page
  1. Reference
  2. Running the Server

Metrics

PreviousGarbage CollectionNextReplication

Last updated 3 months ago

Doltgres'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 Doltgres 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 Doltgres SQL server metrics, and metrics prefixed with go_ are Golang runtime metrics.

Important Doltgres SQL Server Metrics

  • dss_concurrent_connections – Number of clients concurrently connected to this Doltgres SQL server.

  • dss_concurrent_queries – Number of queries concurrently being run on this instance of Doltgres SQL server.

  • dss_query_duration_bucket – Histogram buckets of Doltgres SQL server query latencies.

  • dss_is_replica – Indicates if this Doltgres 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 Doltgres 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 Doltgres 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 Doltgres SQL server.

Prometheus
YAML configuration
Datadog
scrape metrics from the Prometheus HTTP endpoint