chprometheus

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package chprometheus provides a Prometheus collector for ClickHouse connection pool statistics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector collects statistics from a redis client. It implements the prometheus.Collector interface.

func NewClickhouseCollector

func NewClickhouseCollector(getter StatGetter, dbName string) *Collector

NewClickhouseCollector returns a new Collector based on the provided StatGetter. The given namespace and subsystem are used to build the fully qualified metric name, i.e. "{namespace}_{subsystem}_{metric}".

func (*Collector) Collect

func (s *Collector) Collect(metrics chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*Collector) Describe

func (s *Collector) Describe(descs chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type StatGetter

type StatGetter interface {
	Stats() driver.Stats
}

StatGetter provides a method to get pool statistics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL