metrics

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorCounter is a global counter for errors
	ErrorCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: namespace,
			Name:      "errors_total",
			Help:      "Number of errors while reconciling",
		})

	// ChangeCounter counts kubernetes events (e.g. create, delete) on objects (e.g. ClusterRoleBinding)
	ChangeCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: namespace,
			Name:      "changed_total",
			Help:      "Number of times a Kubernetes object is created or deleted by the rbac-manager",
		},
		[]string{"object", "action"},
	)

	// ReconcileCounter counts controllers invocations
	ReconcileCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: namespace,
			Name:      "reconcile_total",
			Help:      "Number of times a reconciling is triggered",
		},
		[]string{"controller"},
	)
)

Functions

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics must be called exactly once and registers the prometheus counters as metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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