Documentation
¶
Index ¶
- Constants
- func NewPrometheusBashCollector(config config.MetricsItem) (prometheus.Collector, error)
- func NewPrometheusMysqlCollector(config config.MetricsItem) (prometheus.Collector, error)
- func NewPrometheusRedisCollector(config config.MetricsItem) (prometheus.Collector, error)
- func PromDesc(collectorCustom CollectorCustom) string
- type CollectorBash
- type CollectorCustom
- type CollectorHelper
- type CollectorMysql
- func (e CollectorMysql) Config() config.MetricsItem
- func (e *CollectorMysql) DBClient() error
- func (e CollectorMysql) Desc() string
- func (e CollectorMysql) DsnPart() (string, string, error)
- func (e CollectorMysql) Name() string
- func (e *CollectorMysql) Run(ch chan<- prometheus.Metric) error
- func (e *CollectorMysql) StoreDBClient(client *sql.DB)
- type CollectorRedis
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) 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
Click to show internal directories.
Click to hide internal directories.