collector

package
v0.0.0-...-17aa378 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouseCollector

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

ClickHouseCollector collects clickhouse metrics.

func NewClickHouseCollector

func NewClickHouseCollector(db *sqlx.DB) *ClickHouseCollector

NewClickHouseCollector returns an initialized ClickHouseCollector.

func (*ClickHouseCollector) Collect

func (c *ClickHouseCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches the metrics from clickhouse.

func (*ClickHouseCollector) Describe

func (c *ClickHouseCollector) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics.

type Event

type Event struct {
	Event string  `db:"event"`
	Value float64 `db:"value"`
}

Event from ClickHouse.

type Metric

type Metric struct {
	Metric string  `db:"metric"`
	Value  float64 `db:"value"`
}

Metric from ClickHouse.

Jump to

Keyboard shortcuts

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