collectors

package
v5.1.2-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2019 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrometheusNamespace = "gateway"

PrometheusNamespace default metric namespace

Functions

This section is empty.

Types

type Controller

type Controller struct {
	prometheus.Collector
	// contains filtered or unexported fields
}

Controller defines base metrics about the rbd-gateway

func NewController

func NewController() *Controller

NewController creates a new prometheus collector for the gateway controller operations

func (Controller) Collect

func (cm Controller) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (Controller) Describe

func (cm Controller) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*Controller) SetServerNum

func (cm *Controller) SetServerNum(httpNum, tcpNum int)

SetServerNum sets the number of active domain

type SocketCollector

type SocketCollector struct {
	prometheus.Collector
	// contains filtered or unexported fields
}

SocketCollector stores prometheus metrics and ingress meta-data

func NewSocketCollector

func NewSocketCollector(gatewayHost string, metricsPerHost bool) (*SocketCollector, error)

NewSocketCollector creates a new SocketCollector instance using the ingress watch namespace and class used by the controller

func (SocketCollector) Collect

func (sc SocketCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (SocketCollector) Describe

func (sc SocketCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*SocketCollector) RemoveMetrics

func (sc *SocketCollector) RemoveMetrics(hosts []string, registry prometheus.Gatherer)

RemoveMetrics deletes prometheus metrics from prometheus for hosts and host that are not available anymore. Ref: https://godoc.org/github.com/prometheus/client_golang/prometheus#CounterVec.Delete

func (*SocketCollector) SetHosts

func (sc *SocketCollector) SetHosts(hosts sets.String)

SetHosts sets the hostnames that are being served by the ingress controller This set of hostnames is used to filter the metrics to be exposed

func (*SocketCollector) Start

func (sc *SocketCollector) Start()

Start listen for connections in the unix socket and spawns a goroutine to process the content

func (*SocketCollector) Stop

func (sc *SocketCollector) Stop()

Stop stops unix listener

Jump to

Keyboard shortcuts

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