exporter

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCloudFoundryRedisBindings added in v0.17.0

func GetCloudFoundryRedisBindings() (addrs, passwords, aliases []string)

func LoadRedisArgs added in v0.17.0

func LoadRedisArgs(addr, password, alias, separator string) ([]string, []string, []string)

loadRedisArgs loads the configuration for which redis hosts to monitor from either the environment or as passed from program arguments. Returns the list of host addrs, passwords, and their aliases.

func LoadRedisFile added in v0.17.0

func LoadRedisFile(fileName string) ([]string, []string, []string, error)

loadRedisFile opens the specified file and loads the configuration for which redis hosts to monitor. Returns the list of hosts addrs, passwords, and their aliases.

Types

type Exporter

type Exporter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Exporter implements the prometheus.Exporter interface, and exports Redis metrics.

func NewRedisExporter

func NewRedisExporter(host RedisHost, namespace, checkSingleKeys, checkKeys string) (*Exporter, error)

NewRedisExporter returns a new exporter of Redis metrics. note to self: next time we add an argument, instead add a RedisExporter struct

func (*Exporter) Collect

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

Collect fetches new metrics from the RedisHost and updates the appropriate metrics.

func (*Exporter) Describe

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

Describe outputs Redis metric descriptions.

func (*Exporter) SetScript added in v0.19.0

func (e *Exporter) SetScript(script []byte)

SetScript sets the Lua Redis script to be used.

type RedisHost

type RedisHost struct {
	Addrs     []string
	Passwords []string
	Aliases   []string
}

RedisHost represents a set of Redis Hosts to health check.

Jump to

Keyboard shortcuts

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