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 ¶
StatGetter provides a method to get pool statistics.
Click to show internal directories.
Click to hide internal directories.