collectors

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNginxMetricsCollector

func NewNginxMetricsCollector(constLabels map[string]string, logger log.Logger) prometheus.Collector

NewNginxMetricsCollector creates an NginxCollector which fetches stats from NGINX over a unix socket.

func NewNginxPlusMetricsCollector added in v1.2.0

func NewNginxPlusMetricsCollector(
	plusClient runtime.NginxPlusClient,
	constLabels map[string]string,
	logger log.Logger,
) (prometheus.Collector, error)

NewNginxPlusMetricsCollector creates an NginxCollector which fetches stats from NGINX Plus API over a unix socket.

Types

type ControllerCollector

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

ControllerCollector collects metrics for the NGF controller. Implements the prometheus.Collector interface.

func NewControllerCollector

func NewControllerCollector(constLabels map[string]string) *ControllerCollector

NewControllerCollector creates a new ControllerCollector.

func (*ControllerCollector) Collect

func (c *ControllerCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method.

func (*ControllerCollector) Describe

func (c *ControllerCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method.

func (*ControllerCollector) ObserveLastEventBatchProcessTime

func (c *ControllerCollector) ObserveLastEventBatchProcessTime(duration time.Duration)

ObserveLastEventBatchProcessTime adds the last event batch processing time to the histogram.

type ControllerNoopCollector

type ControllerNoopCollector struct{}

ControllerNoopCollector used to initialize the ControllerCollector when metrics are disabled to avoid nil pointer errors.

func NewControllerNoopCollector

func NewControllerNoopCollector() *ControllerNoopCollector

NewControllerNoopCollector returns an instance of the ControllerNoopCollector.

func (*ControllerNoopCollector) ObserveLastEventBatchProcessTime

func (c *ControllerNoopCollector) ObserveLastEventBatchProcessTime(_ time.Duration)

type ManagerNoopCollector

type ManagerNoopCollector struct{}

ManagerNoopCollector used to initialize the ManagerCollector when metrics are disabled to avoid nil pointer errors.

func NewManagerNoopCollector

func NewManagerNoopCollector() *ManagerNoopCollector

NewManagerNoopCollector creates a no-op collector that implements ManagerCollector interface.

func (*ManagerNoopCollector) IncReloadCount

func (c *ManagerNoopCollector) IncReloadCount()

IncReloadCount implements a no-op IncReloadCount.

func (*ManagerNoopCollector) IncReloadErrors

func (c *ManagerNoopCollector) IncReloadErrors()

IncReloadErrors implements a no-op IncReloadErrors.

func (*ManagerNoopCollector) ObserveLastReloadTime

func (c *ManagerNoopCollector) ObserveLastReloadTime(_ time.Duration)

ObserveLastReloadTime implements a no-op ObserveLastReloadTime.

type NginxRuntimeCollector

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

NginxRuntimeCollector implements runtime.Collector interface and prometheus.Collector interface.

func NewManagerMetricsCollector

func NewManagerMetricsCollector(constLabels map[string]string) *NginxRuntimeCollector

NewManagerMetricsCollector creates a new NginxRuntimeCollector.

func (*NginxRuntimeCollector) Collect

func (c *NginxRuntimeCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface Collect method.

func (*NginxRuntimeCollector) Describe

func (c *NginxRuntimeCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface Describe method.

func (*NginxRuntimeCollector) IncReloadCount

func (c *NginxRuntimeCollector) IncReloadCount()

IncReloadCount increments the counter of successful NGINX reloads and sets the stale config status to false.

func (*NginxRuntimeCollector) IncReloadErrors

func (c *NginxRuntimeCollector) IncReloadErrors()

IncReloadErrors increments the counter of NGINX reload errors and sets the stale config status to true.

func (*NginxRuntimeCollector) ObserveLastReloadTime

func (c *NginxRuntimeCollector) ObserveLastReloadTime(duration time.Duration)

ObserveLastReloadTime adds the last NGINX reload time to the histogram.

Jump to

Keyboard shortcuts

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