collectors

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 2 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) *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 LocalManagerMetricsCollector

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

LocalManagerMetricsCollector implements NginxManagerCollector interface and prometheus.Collector interface

func NewLocalManagerMetricsCollector

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

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()
	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()

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

Jump to

Keyboard shortcuts

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