Back to godoc.org

Package collectors

v5.2.1-release+incompatible (release)
Latest Go to latest
Published: 5 days ago | License: LGPL-3.0 | Module: github.com/goodrain/rainbond

Index

Package Files

Variables

var PrometheusNamespace = "gateway"

PrometheusNamespace default metric namespace

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 NginxCmdMetric

type NginxCmdMetric struct {
}

NginxCmdMetric -

func (*NginxCmdMetric) Collect

func (n *NginxCmdMetric) Collect(ch chan<- prometheus.Metric)

Collect -

func (*NginxCmdMetric) Describe

func (n *NginxCmdMetric) Describe(ch chan<- *prometheus.Desc)

Describe -

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier