collectors

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 {
	SetIngressResources(ingressType string, 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) SetIngressResources

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

SetIngressResources implements a fake SetIngressResources

type ControllerMetricsCollector

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

ControllerMetricsCollector implements the ControllerCollector interface and prometheus.Collector interface

func NewControllerMetricsCollector

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

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

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

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