metrics

package
v0.0.0-...-32fc51b Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ControllerWorkerSum is a metric descriptor which collects the current amount of workers per controller.
	ControllerWorkerSum = prometheus.NewDesc("garden_cm_worker_amount", "Count of currently running controller workers", []string{"controller"}, nil)

	// ScrapeFailures is a metric descriptor which counts the amount scrape issues grouped by kind.
	ScrapeFailures = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "garden_scrape_failure_total",
		Help: "Total count of scraping failures, grouped by kind/group of metric(s)",
	}, []string{"kind"})
)

Functions

func RegisterControllerMetrics

func RegisterControllerMetrics(controllers ...ControllerMetricsCollector)

RegisterControllerMetrics initializes the collection of Controller related metrics. This function ensures to run only once for avoiding multiple controller registration.

func RegisterWorkqueMetrics

func RegisterWorkqueMetrics()

RegisterWorkqueMetrics creates and register a provider for workqueue metrics which is used to map the data collected by the workqueues to the proper metrics. The provider needs to be registered, before creating workqueues otherwise it wouldn't be noticed.

Types

type ControllerMetricsCollector

type ControllerMetricsCollector interface {
	// CollectMetrics is called by the controllerCollector when collecting metrics.
	// The implemtation sends the collected metrics to the given channel.
	CollectMetrics(ch chan<- prometheus.Metric)
}

ControllerMetricsCollector is an interface implemented by any controller bundled in the Gardener Controller Manager which wants to expose metrics.

Jump to

Keyboard shortcuts

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