collector

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectorBashName = "bash"
	CollectorBashDesc = "Metrics from shell collector in the custom exporter."
)
View Source
const (
	CollectorMysqlName = "mysql"
	CollectorMysqlDesc = "Metrics from mysql collector in the custom exporter."
)
View Source
const (
	CollectorRedisName = "redis"
	CollectorRedisDesc = "Metrics from redis collector in the custom exporter."
)

Variables

This section is empty.

Functions

func NewPrometheusBashCollector

func NewPrometheusBashCollector(config config.MetricsItem) (prometheus.Collector, error)

func NewPrometheusMysqlCollector

func NewPrometheusMysqlCollector(config config.MetricsItem) (prometheus.Collector, error)

func NewPrometheusRedisCollector

func NewPrometheusRedisCollector(config config.MetricsItem) (prometheus.Collector, error)

func PromDesc

func PromDesc(collectorCustom CollectorCustom) string

Types

type CollectorBash

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

func NewCollectorBash

func NewCollectorBash(config config.MetricsItem) *CollectorBash

func (CollectorBash) Config

func (e CollectorBash) Config() config.MetricsItem

func (CollectorBash) Desc

func (e CollectorBash) Desc() string

func (CollectorBash) Name

func (e CollectorBash) Name() string

func (CollectorBash) Run

func (e CollectorBash) Run(ch chan<- prometheus.Metric) error

type CollectorCustom

type CollectorCustom interface {
	Name() string
	Desc() string
	Run(ch chan<- prometheus.Metric) error
	Config() config.MetricsItem
}

type CollectorHelper

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

Exporter collects MySQL metrics. It implements prometheus.Collector.

func NewCollectorHelper

func NewCollectorHelper(collectorCustom CollectorCustom) *CollectorHelper

func (CollectorHelper) Check

func (e CollectorHelper) Check(err error) error

func (*CollectorHelper) Collect

func (e *CollectorHelper) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*CollectorHelper) Describe

func (e *CollectorHelper) Describe(ch chan<- *prometheus.Desc)

type CollectorMysql

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

func NewCollectorMysql

func NewCollectorMysql(config config.MetricsItem) *CollectorMysql

func (CollectorMysql) Config

func (e CollectorMysql) Config() config.MetricsItem

func (*CollectorMysql) DBClient

func (e *CollectorMysql) DBClient() error

func (CollectorMysql) Desc

func (e CollectorMysql) Desc() string

func (CollectorMysql) DsnPart

func (e CollectorMysql) DsnPart() (string, string, error)

func (CollectorMysql) Name

func (e CollectorMysql) Name() string

func (*CollectorMysql) Run

func (e *CollectorMysql) Run(ch chan<- prometheus.Metric) error

func (*CollectorMysql) StoreDBClient

func (e *CollectorMysql) StoreDBClient(client *sql.DB)

type CollectorRedis

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

func NewCollectorRedis

func NewCollectorRedis(config config.MetricsItem) *CollectorRedis

func (CollectorRedis) Config

func (e CollectorRedis) Config() config.MetricsItem

func (CollectorRedis) Desc

func (e CollectorRedis) Desc() string

func (CollectorRedis) DsnPart

func (e CollectorRedis) DsnPart() (map[string]interface{}, error)

func (CollectorRedis) Name

func (e CollectorRedis) Name() string

func (*CollectorRedis) Run

func (e *CollectorRedis) Run(ch chan<- prometheus.Metric) error

Jump to

Keyboard shortcuts

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