import "github.com/goodrain/rainbond/gateway/metric/collectors"
controller.go gateway.go nginx_status.go socket_message.go
var PrometheusNamespace = "gateway"
PrometheusNamespace default metric namespace
type Controller struct { prometheus.Collector // contains filtered or unexported fields }
Controller defines base metrics about the rbd-gateway
func NewController() *Controller
NewController creates a new prometheus collector for the gateway controller operations
func (cm Controller) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (cm Controller) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
func (cm *Controller) SetServerNum(httpNum, tcpNum int)
SetServerNum sets the number of active domain
type NginxCmdMetric struct { }
NginxCmdMetric -
func (n *NginxCmdMetric) Collect(ch chan<- prometheus.Metric)
Collect -
func (n *NginxCmdMetric) Describe(ch chan<- *prometheus.Desc)
Describe -
type SocketCollector struct { prometheus.Collector // contains filtered or unexported fields }
SocketCollector stores prometheus metrics and ingress meta-data
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 (sc SocketCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (sc SocketCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
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 (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 (sc *SocketCollector) Start()
Start listen for connections in the unix socket and spawns a goroutine to process the content
func (sc *SocketCollector) Stop()
Stop stops unix listener
Package collectors imports 9 packages (graph) and is imported by 1 packages. Updated 2021-01-08. Refresh now. Tools for package owners.