collectors

package
v3.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerCollector

type ControllerCollector interface {
	SetIngresses(ingressType string, count int)
	SetVirtualServers(count int)
	SetVirtualServerRoutes(count int)
	SetTransportServers(tlsPassthroughCount, tcpCount, udpCount int)
	Register(registry *prometheus.Registry) error
}

ControllerCollector is an interface for the metrics of the Controller

type ControllerFakeCollector

type ControllerFakeCollector struct{}

ControllerFakeCollector is a fake collector that implements the ControllerCollector interface

func NewControllerFakeCollector

func NewControllerFakeCollector() *ControllerFakeCollector

NewControllerFakeCollector creates a fake collector that implements the ControllerCollector interface

func (*ControllerFakeCollector) Register

Register implements a fake Register

func (*ControllerFakeCollector) SetIngresses

func (cc *ControllerFakeCollector) SetIngresses(_ string, _ int)

SetIngresses implements a fake SetIngresses

func (*ControllerFakeCollector) SetTransportServers

func (cc *ControllerFakeCollector) SetTransportServers(int, int, int)

SetTransportServers implements a fake SetTransportServers

func (*ControllerFakeCollector) SetVirtualServerRoutes

func (cc *ControllerFakeCollector) SetVirtualServerRoutes(_ int)

SetVirtualServerRoutes implements a fake SetVirtualServerRoutes

func (*ControllerFakeCollector) SetVirtualServers

func (cc *ControllerFakeCollector) SetVirtualServers(_ int)

SetVirtualServers implements a fake SetVirtualServers

type ControllerMetricsCollector

type ControllerMetricsCollector struct {
	// contains filtered or unexported fields
}

ControllerMetricsCollector implements the ControllerCollector interface and prometheus.Collector interface

func NewControllerMetricsCollector

func NewControllerMetricsCollector(crdsEnabled bool, constLabels map[string]string) *ControllerMetricsCollector

NewControllerMetricsCollector creates a new ControllerMetricsCollector

func (*ControllerMetricsCollector) Collect

func (cc *ControllerMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method

func (*ControllerMetricsCollector) Describe

func (cc *ControllerMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method

func (*ControllerMetricsCollector) Register

func (cc *ControllerMetricsCollector) Register(registry *prometheus.Registry) error

Register registers all the metrics of the collector

func (*ControllerMetricsCollector) SetIngresses

func (cc *ControllerMetricsCollector) SetIngresses(ingressType string, count int)

SetIngresses sets the value of the ingress resources gauge for a given type

func (*ControllerMetricsCollector) SetTransportServers

func (cc *ControllerMetricsCollector) SetTransportServers(tlsPassthroughCount, tcpCount, udpCount int)

SetTransportServers sets the value of the TransportServer resources gauge

func (*ControllerMetricsCollector) SetVirtualServerRoutes

func (cc *ControllerMetricsCollector) SetVirtualServerRoutes(count int)

SetVirtualServerRoutes sets the value of the VirtualServerRoute resources gauge

func (*ControllerMetricsCollector) SetVirtualServers

func (cc *ControllerMetricsCollector) SetVirtualServers(count int)

SetVirtualServers sets the value of the VirtualServer resources gauge

type LatencyCollector

type LatencyCollector interface {
	RecordLatency(string)
	UpdateUpstreamServerLabels(map[string][]string)
	DeleteUpstreamServerLabels([]string)
	UpdateUpstreamServerPeerLabels(map[string][]string)
	DeleteUpstreamServerPeerLabels([]string)
	DeleteMetrics([]string)
	Register(*prometheus.Registry) error
}

LatencyCollector is an interface for latency metrics

type LatencyFakeCollector

type LatencyFakeCollector struct{}

LatencyFakeCollector is a fake collector that implements the LatencyCollector interface

func NewLatencyFakeCollector

func NewLatencyFakeCollector() *LatencyFakeCollector

NewLatencyFakeCollector creates a fake collector that implements the LatencyCollector interface

func (*LatencyFakeCollector) DeleteMetrics

func (l *LatencyFakeCollector) DeleteMetrics([]string)

DeleteMetrics implements a fake DeleteMetrics

func (*LatencyFakeCollector) DeleteUpstreamServerLabels

func (l *LatencyFakeCollector) DeleteUpstreamServerLabels([]string)

DeleteUpstreamServerLabels implements a fake DeleteUpstreamServerLabels

func (*LatencyFakeCollector) DeleteUpstreamServerPeerLabels

func (l *LatencyFakeCollector) DeleteUpstreamServerPeerLabels([]string)

DeleteUpstreamServerPeerLabels implements a fake DeleteUpstreamServerPeerLabels

func (*LatencyFakeCollector) RecordLatency

func (l *LatencyFakeCollector) RecordLatency(_ string)

RecordLatency implements a fake RecordLatency

func (*LatencyFakeCollector) Register

Register implements a fake Register

func (*LatencyFakeCollector) UpdateUpstreamServerLabels

func (l *LatencyFakeCollector) UpdateUpstreamServerLabels(map[string][]string)

UpdateUpstreamServerLabels implements a fake UpdateUpstreamServerLabels

func (*LatencyFakeCollector) UpdateUpstreamServerPeerLabels

func (l *LatencyFakeCollector) UpdateUpstreamServerPeerLabels(map[string][]string)

UpdateUpstreamServerPeerLabels implements a fake UpdateUpstreamServerPeerLabels

type LatencyMetricsCollector

type LatencyMetricsCollector struct {
	// contains filtered or unexported fields
}

LatencyMetricsCollector implements the LatencyCollector interface and prometheus.Collector interface

func NewLatencyMetricsCollector

func NewLatencyMetricsCollector(
	constLabels map[string]string,
	upstreamServerLabelNames []string,
	upstreamServerPeerLabelNames []string,
) *LatencyMetricsCollector

NewLatencyMetricsCollector creates a new LatencyMetricsCollector

func (*LatencyMetricsCollector) Collect

func (l *LatencyMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method

func (*LatencyMetricsCollector) DeleteMetrics

func (l *LatencyMetricsCollector) DeleteMetrics(upstreamServerPeerNames []string)

DeleteMetrics deletes all metrics published associated with the given upstream server peer names.

func (*LatencyMetricsCollector) DeleteUpstreamServerLabels

func (l *LatencyMetricsCollector) DeleteUpstreamServerLabels(upstreamNames []string)

DeleteUpstreamServerLabels deletes upstream server labels

func (*LatencyMetricsCollector) DeleteUpstreamServerPeerLabels

func (l *LatencyMetricsCollector) DeleteUpstreamServerPeerLabels(peers []string)

DeleteUpstreamServerPeerLabels deletes the Upstream Server Peer Labels

func (*LatencyMetricsCollector) Describe

func (l *LatencyMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method

func (*LatencyMetricsCollector) RecordLatency

func (l *LatencyMetricsCollector) RecordLatency(syslogMsg string)

RecordLatency parses a syslog message and records latency

func (*LatencyMetricsCollector) Register

func (l *LatencyMetricsCollector) Register(registry *prometheus.Registry) error

Register registers all the metrics of the collector

func (*LatencyMetricsCollector) UpdateUpstreamServerLabels

func (l *LatencyMetricsCollector) UpdateUpstreamServerLabels(newLabelValues map[string][]string)

UpdateUpstreamServerLabels updates the upstream server label map

func (*LatencyMetricsCollector) UpdateUpstreamServerPeerLabels

func (l *LatencyMetricsCollector) UpdateUpstreamServerPeerLabels(upstreamServerPeerLabels map[string][]string)

UpdateUpstreamServerPeerLabels updates the Upstream Server Peer Labels

type LocalManagerMetricsCollector

type LocalManagerMetricsCollector struct {
	// contains filtered or unexported fields
}

LocalManagerMetricsCollector implements NginxManagerCollector interface and prometheus.Collector interface

func NewLocalManagerMetricsCollector

func NewLocalManagerMetricsCollector(constLabels map[string]string) *LocalManagerMetricsCollector

NewLocalManagerMetricsCollector creates a new LocalManagerMetricsCollector

func (*LocalManagerMetricsCollector) Collect

func (nc *LocalManagerMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method

func (*LocalManagerMetricsCollector) Describe

func (nc *LocalManagerMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method

func (*LocalManagerMetricsCollector) IncNginxReloadCount

func (nc *LocalManagerMetricsCollector) IncNginxReloadCount(isEndPointUpdate bool)

IncNginxReloadCount increments the counter of successful NGINX reloads and sets the last reload status to true

func (*LocalManagerMetricsCollector) IncNginxReloadErrors

func (nc *LocalManagerMetricsCollector) IncNginxReloadErrors()

IncNginxReloadErrors increments the counter of NGINX reload errors and sets the last reload status to false

func (*LocalManagerMetricsCollector) Register

func (nc *LocalManagerMetricsCollector) Register(registry *prometheus.Registry) error

Register registers all the metrics of the collector

func (*LocalManagerMetricsCollector) UpdateLastReloadTime

func (nc *LocalManagerMetricsCollector) UpdateLastReloadTime(duration time.Duration)

UpdateLastReloadTime updates the last NGINX reload time

type ManagerCollector

type ManagerCollector interface {
	IncNginxReloadCount(isEndPointUpdate bool)
	IncNginxReloadErrors()
	UpdateLastReloadTime(ms time.Duration)
	Register(registry *prometheus.Registry) error
}

ManagerCollector is an interface for the metrics of the Nginx Manager

type ManagerFakeCollector

type ManagerFakeCollector struct{}

ManagerFakeCollector is a fake collector that will implement ManagerCollector interface

func NewManagerFakeCollector

func NewManagerFakeCollector() *ManagerFakeCollector

NewManagerFakeCollector creates a fake collector that implements ManagerCollector interface

func (*ManagerFakeCollector) IncNginxReloadCount

func (nc *ManagerFakeCollector) IncNginxReloadCount(_ bool)

IncNginxReloadCount implements a fake IncNginxReloadCount

func (*ManagerFakeCollector) IncNginxReloadErrors

func (nc *ManagerFakeCollector) IncNginxReloadErrors()

IncNginxReloadErrors implements a fake IncNginxReloadErrors

func (*ManagerFakeCollector) Register

func (nc *ManagerFakeCollector) Register(_ *prometheus.Registry) error

Register implements a fake Register

func (*ManagerFakeCollector) UpdateLastReloadTime

func (nc *ManagerFakeCollector) UpdateLastReloadTime(_ time.Duration)

UpdateLastReloadTime implements a fake UpdateLastReloadTime

type NginxProcessesMetricsCollector

type NginxProcessesMetricsCollector struct {
	// contains filtered or unexported fields
}

NginxProcessesMetricsCollector implements prometheus.Collector interface

func NewNginxProcessesMetricsCollector

func NewNginxProcessesMetricsCollector(constLabels map[string]string) *NginxProcessesMetricsCollector

NewNginxProcessesMetricsCollector creates a new NginxProcessMetricsCollector

func (*NginxProcessesMetricsCollector) Collect

func (pc *NginxProcessesMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method

func (*NginxProcessesMetricsCollector) Describe

func (pc *NginxProcessesMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method

func (*NginxProcessesMetricsCollector) Register

func (pc *NginxProcessesMetricsCollector) Register(registry *prometheus.Registry) error

Register registers all the metrics of the collector

type WorkQueueMetricsCollector

type WorkQueueMetricsCollector struct {
	// contains filtered or unexported fields
}

WorkQueueMetricsCollector collects the metrics about the work queue, which the Ingress Controller uses to process changes to the resources in the cluster. implements the prometheus.Collector interface

func NewWorkQueueMetricsCollector

func NewWorkQueueMetricsCollector(constLabels map[string]string) *WorkQueueMetricsCollector

NewWorkQueueMetricsCollector creates a new WorkQueueMetricsCollector

func (*WorkQueueMetricsCollector) Collect

func (wqc *WorkQueueMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method

func (*WorkQueueMetricsCollector) Describe

func (wqc *WorkQueueMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface Describe method

func (*WorkQueueMetricsCollector) NewAddsMetric

NewAddsMetric implements the workqueue.MetricsProvider interface NewAddsMetric method

func (*WorkQueueMetricsCollector) NewDepthMetric

func (wqc *WorkQueueMetricsCollector) NewDepthMetric(name string) workqueue.GaugeMetric

NewDepthMetric implements the workqueue.MetricsProvider interface NewDepthMetric method

func (*WorkQueueMetricsCollector) NewLatencyMetric

func (wqc *WorkQueueMetricsCollector) NewLatencyMetric(name string) workqueue.HistogramMetric

NewLatencyMetric implements the workqueue.MetricsProvider interface NewLatencyMetric method

func (*WorkQueueMetricsCollector) NewLongestRunningProcessorSecondsMetric

func (*WorkQueueMetricsCollector) NewLongestRunningProcessorSecondsMetric(string) workqueue.SettableGaugeMetric

NewLongestRunningProcessorSecondsMetric implements the workqueue.MetricsProvider interface NewLongestRunningProcessorSecondsMetric method

func (*WorkQueueMetricsCollector) NewRetriesMetric

NewRetriesMetric implements the workqueue.MetricsProvider interface NewRetriesMetric method

func (*WorkQueueMetricsCollector) NewUnfinishedWorkSecondsMetric

func (*WorkQueueMetricsCollector) NewUnfinishedWorkSecondsMetric(string) workqueue.SettableGaugeMetric

NewUnfinishedWorkSecondsMetric implements the workqueue.MetricsProvider interface NewUnfinishedWorkSecondsMetric method

func (*WorkQueueMetricsCollector) NewWorkDurationMetric

func (wqc *WorkQueueMetricsCollector) NewWorkDurationMetric(name string) workqueue.HistogramMetric

NewWorkDurationMetric implements the workqueue.MetricsProvider interface NewWorkDurationMetric method

func (*WorkQueueMetricsCollector) Register

func (wqc *WorkQueueMetricsCollector) Register(registry *prometheus.Registry) error

Register registers all the metrics of the collector

Jump to

Keyboard shortcuts

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