collectors

package
v1.9.0-nsmready Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 10 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)
	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

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

Register implements a fake Register

func (*ControllerFakeCollector) SetIngresses added in v1.6.0

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

SetIngresses implements a fake SetIngresses

func (*ControllerFakeCollector) SetVirtualServerRoutes added in v1.6.0

func (cc *ControllerFakeCollector) SetVirtualServerRoutes(count int)

SetVirtualServerRoutes implements a fake SetVirtualServerRoutes

func (*ControllerFakeCollector) SetVirtualServers added in v1.6.0

func (cc *ControllerFakeCollector) SetVirtualServers(count 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 added in v1.6.0

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

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

func (*ControllerMetricsCollector) SetVirtualServerRoutes added in v1.6.0

func (cc *ControllerMetricsCollector) SetVirtualServerRoutes(count int)

SetVirtualServerRoutes sets the value of the VirtualServerRoute resources gauge

func (*ControllerMetricsCollector) SetVirtualServers added in v1.6.0

func (cc *ControllerMetricsCollector) SetVirtualServers(count int)

SetVirtualServers sets the value of the VirtualServer resources gauge

type LatencyCollector added in v1.9.0

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 added in v1.9.0

type LatencyFakeCollector struct{}

LatencyFakeCollector is a fake collector that implements the LatencyCollector interface

func NewLatencyFakeCollector added in v1.9.0

func NewLatencyFakeCollector() *LatencyFakeCollector

NewLatencyFakeCollector creates a fake collector that implements the LatencyCollector interface

func (*LatencyFakeCollector) DeleteMetrics added in v1.9.0

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

DeleteMetrics implements a fake DeleteMetrics

func (*LatencyFakeCollector) DeleteUpstreamServerLabels added in v1.9.0

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

DeleteUpstreamServerLabels implements a fake DeleteUpstreamServerLabels

func (*LatencyFakeCollector) DeleteUpstreamServerPeerLabels added in v1.9.0

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

DeleteUpstreamServerPeerLabels implements a fake DeleteUpstreamServerPeerLabels

func (*LatencyFakeCollector) RecordLatency added in v1.9.0

func (l *LatencyFakeCollector) RecordLatency(_ string)

RecordLatency implements a fake RecordLatency

func (*LatencyFakeCollector) Register added in v1.9.0

Register implements a fake Register

func (*LatencyFakeCollector) UpdateUpstreamServerLabels added in v1.9.0

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

UpdateUpstreamServerLabels implements a fake UpdateUpstreamServerLabels

func (*LatencyFakeCollector) UpdateUpstreamServerPeerLabels added in v1.9.0

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

UpdateUpstreamServerPeerLabels implements a fake UpdateUpstreamServerPeerLabels

type LatencyMetricsCollector added in v1.9.0

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

LatencyMetricsCollector implements the LatencyCollector interface and prometheus.Collector interface

func NewLatencyMetricsCollector added in v1.9.0

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

NewLatencyMetricsCollector creates a new LatencyMetricsCollector

func (*LatencyMetricsCollector) Collect added in v1.9.0

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

Collect implements the prometheus.Collector interface Collect method

func (*LatencyMetricsCollector) DeleteMetrics added in v1.9.0

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

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

func (*LatencyMetricsCollector) DeleteUpstreamServerLabels added in v1.9.0

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

DeleteUpstreamServerLabels deletes upstream server labels

func (*LatencyMetricsCollector) DeleteUpstreamServerPeerLabels added in v1.9.0

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

DeleteUpstreamServerPeerLabels deletes the Upstream Server Peer Labels

func (*LatencyMetricsCollector) Describe added in v1.9.0

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

Describe implements prometheus.Collector interface Describe method

func (*LatencyMetricsCollector) RecordLatency added in v1.9.0

func (l *LatencyMetricsCollector) RecordLatency(syslogMsg string)

RecordLatency parses a syslog message and records latency

func (*LatencyMetricsCollector) Register added in v1.9.0

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

Register registers all the metrics of the collector

func (*LatencyMetricsCollector) UpdateUpstreamServerLabels added in v1.9.0

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

UpdateUpstreamServerLabels updates the upstream server label map

func (*LatencyMetricsCollector) UpdateUpstreamServerPeerLabels added in v1.9.0

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(isEndPointUpdate 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(registry *prometheus.Registry) error

Register implements a fake Register

func (*ManagerFakeCollector) UpdateLastReloadTime

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

UpdateLastReloadTime implements a fake UpdateLastReloadTime

type NginxProcessesMetricsCollector added in v1.9.0

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

NginxProcessesMetricsCollector implements NginxPorcessesCollector interface and prometheus.Collector interface

func NewNginxProcessesMetricsCollector added in v1.9.0

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

NewNginxProcessesMetricsCollector creates a new NginxProcessMetricsCollector

func (*NginxProcessesMetricsCollector) Collect added in v1.9.0

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

Collect implements the prometheus.Collector interface Collect method

func (*NginxProcessesMetricsCollector) Describe added in v1.9.0

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

Describe implements prometheus.Collector interface Describe method

func (*NginxProcessesMetricsCollector) Register added in v1.9.0

func (pc *NginxProcessesMetricsCollector) 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