collectors

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrometheusNamespace = "aws_alb_ingress_controller"

PrometheusNamespace default metric namespace

Functions

func GatherAndCompare

func GatherAndCompare(c prometheus.Collector, expected string, metricNames []string, reg prometheus.Gatherer) error

GatherAndCompare retrieves all metrics exposed by a collector and compares it to an expected output in the Prometheus text exposition format. metricNames allows only comparing the given metrics. All are compared if it's nil.

Types

type AWSAPIController

type AWSAPIController struct {
	prometheus.Collector
	// contains filtered or unexported fields
}

AWSAPIController defines base metrics about the AWS API client

func NewAWSAPIController

func NewAWSAPIController() *AWSAPIController

NewAWSAPIController creates a new prometheus collector for the AWS API client

func (AWSAPIController) Collect

func (a AWSAPIController) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (AWSAPIController) Describe

func (a AWSAPIController) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*AWSAPIController) IncAPIErrorCount

func (a *AWSAPIController) IncAPIErrorCount(l prometheus.Labels)

IncAPIErrorCount increment the reconcile counter

func (*AWSAPIController) IncAPIRequestCount

func (a *AWSAPIController) IncAPIRequestCount(l prometheus.Labels)

IncAPIRequestCount increment the reconcile counter

func (*AWSAPIController) IncAPIRetryCount

func (a *AWSAPIController) IncAPIRetryCount(l prometheus.Labels)

IncAPIRetryCount increment the reconcile counter

type Controller

type Controller struct {
	prometheus.Collector
	// contains filtered or unexported fields
}

Controller defines base metrics about the ingress controller

func NewController

func NewController(class string) *Controller

NewController creates a new prometheus collector for the Ingress controller operations

func (Controller) Collect

func (cm Controller) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (Controller) Describe

func (cm Controller) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*Controller) IncReconcileCount

func (cm *Controller) IncReconcileCount()

IncReconcileCount increment the reconcile counter

func (*Controller) IncReconcileErrorCount

func (cm *Controller) IncReconcileErrorCount(name string)

IncReconcileErrorCount increment the reconcile error counter

func (*Controller) RemoveMetrics

func (cm *Controller) RemoveMetrics(name string)

RemoveMetrics removes metrics for ingresses that have been removed

func (*Controller) SetManagedIngresses

func (cm *Controller) SetManagedIngresses(nsmap map[string]int, registry prometheus.Gatherer)

SetManagedIngresses sets the number of managed ingresses

Jump to

Keyboard shortcuts

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