rainbond: github.com/goodrain/rainbond/gateway/metric/collectors Index | Files

package collectors

import "github.com/goodrain/rainbond/gateway/metric/collectors"

Index

Package Files

controller.go gateway.go nginx_status.go socket_message.go

Variables

var PrometheusNamespace = "gateway"

PrometheusNamespace default metric namespace

type Controller Uses

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

Controller defines base metrics about the rbd-gateway

func NewController Uses

func NewController() *Controller

NewController creates a new prometheus collector for the gateway controller operations

func (Controller) Collect Uses

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

Collect implements the prometheus.Collector interface.

func (Controller) Describe Uses

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

Describe implements prometheus.Collector

func (*Controller) SetServerNum Uses

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

SetServerNum sets the number of active domain

type SocketCollector Uses

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

SocketCollector stores prometheus metrics and ingress meta-data

func NewSocketCollector Uses

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 Uses

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

Collect implements the prometheus.Collector interface.

func (SocketCollector) Describe Uses

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

Describe implements prometheus.Collector

func (*SocketCollector) RemoveMetrics Uses

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 Uses

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 Uses

func (sc *SocketCollector) Start()

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

func (*SocketCollector) Stop Uses

func (sc *SocketCollector) Stop()

Stop stops unix listener

Package collectors imports 8 packages (graph) and is imported by 1 packages. Updated 2019-07-07. Refresh now. Tools for package owners.