collectors

package
v0.0.0-...-c30f9a6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: CC0-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckElasticsearchHealth

func CheckElasticsearchHealth(host string, port int32, password string) (alive, healthy, latency float64)

CheckElasticsearchHealth connects to an elasticsearch instance and reports health metrics

func CheckRedisHealth

func CheckRedisHealth(host string, port int32, password string) (alive, healthy, latency float64)

CheckRedisHealth connects to a redis instance and reports health metrics

Types

type BrokerCollector

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

BrokerCollector implements the `Collector` interface

func NewBrokerCollector

func NewBrokerCollector(
	collectors []Collector,
) *BrokerCollector

NewBrokerCollector creates a new BrokerCollector

func (*BrokerCollector) Collect

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

Collect exports metric values

func (*BrokerCollector) Describe

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

Describe exports metric descriptions

type Collector

type Collector interface {
	Collect(ch chan<- prometheus.Metric) error
	Describe(ch chan<- *prometheus.Desc)
}

Collector exports health metrics for brokered services

type ElasticsearchCollector

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

ElasticsearchCollector exports redis health metrics

func NewElasticsearchCollector

func NewElasticsearchCollector(
	client kubernetes.Interface,
	checker func(host string, port int32, password string) (alive, healthy, latency float64),
	metricsNamespace string,
	environment string,
	kubernetesNamespace string,
	serviceDomain string,
	collectorLabel string,
) *ElasticsearchCollector

NewElasticsearchCollector creates a new ElasticsearchCollector

func (*ElasticsearchCollector) Collect

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

Collect exports metric values

func (*ElasticsearchCollector) Describe

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

Describe exports metric descriptions

type RedisCollector

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

RedisCollector exports redis health metrics

func NewRedisCollector

func NewRedisCollector(
	client kubernetes.Interface,
	checker func(host string, port int32, password string) (alive, healthy, latency float64),
	metricsNamespace string,
	environment string,
	kubernetesNamespace string,
	serviceDomain string,
	collectorLabel string,
) *RedisCollector

NewRedisCollector creates a new RedisCollector

func (*RedisCollector) Collect

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

Collect exports metric values

func (*RedisCollector) Describe

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

Describe exports metric descriptions

Jump to

Keyboard shortcuts

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