metrics

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace      = "vso"
	LabelOperation = "operation"
	// LabelVaultConnection usually contains the full name of VaultConnection CR.
	// e.g. namespace1/connection1
	LabelVaultConnection = "vault_connection"

	OperationGet        = "get"
	OperationStore      = "store"
	OperationRestore    = "restore"
	OperationRestoreAll = "restore_all"
	OperationPrune      = "prune"
	OperationPurge      = "purge"
	OperationLogin      = "login"
	OperationRenew      = "renew"
	OperationRead       = "read"
	OperationWrite      = "write"

	NameConfig                = "config"
	NameLength                = "length"
	NameOperationsTotal       = "operations_total"
	NameOperationsErrorsTotal = "operations_errors_total"
	NameOperationsTimeSeconds = "operations_time_seconds"
	NameRequestsTotal         = "requests_total"
	NameRequestsErrorsTotal   = "requests_errors_total"
)

MetricsNamespace should be used for all Operator metrics that are not provided by the controller-runtime.

Variables

View Source
var ResourceStatus = prometheus.NewGaugeVec(prometheus.GaugeOpts{
	Name: "controller_resource_status",
	Help: "Status of a resource; a value other than 1 denotes an invalid resource",
}, []string{
	"controller",
	"name",
	"namespace",
})

Functions

func NewBuildInfoGauge

func NewBuildInfoGauge(info apimachineryversion.Info) prometheus.Gauge

NewBuildInfoGauge provides the Operator's build info as a Prometheus metric.

func SetResourceStatus

func SetResourceStatus(controller string, o client.Object, valid bool)

SetResourceStatus for the given client.Object. If valid is true, then the ResourceStatus gauge will be set 1, else 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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