metrics

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// OperatorPrometheusServeAddr IP:Port on which to serve prometheus metrics
	// (pass ":<port>" to bind on all interfaces).
	OperatorPrometheusServeAddr = "operator-prometheus-serve-addr"
)

Variables

View Source
var Cell = cell.Module(
	"operator-metrics",
	"Operator Metrics",

	cell.Config(defaultConfig),
	cell.Invoke(registerMetricsManager),
)

Cell provides the modular metrics registry, metric HTTP server and legacy metrics cell for the operator.

Functions

func DumpMetrics

func DumpMetrics() ([]*models.Metric, error)

DumpMetrics gets the current Cilium operator metrics and dumps all into a Metrics structure. If metrics cannot be retrieved, returns an error.

Types

type Config added in v1.15.0

type Config struct {
	OperatorPrometheusServeAddr string
}

Config contains the configuration for the operator-metrics cell.

func (Config) Flags added in v1.15.0

func (def Config) Flags(flags *pflag.FlagSet)

type RegisterGatherer

type RegisterGatherer interface {
	prometheus.Registerer
	prometheus.Gatherer
}
var Registry RegisterGatherer

Registry is the global prometheus registry for cilium-operator metrics.

type SharedConfig added in v1.15.0

type SharedConfig struct {
	// EnableMetrics is set to true if operator metrics are enabled
	EnableMetrics bool

	// EnableGatewayAPI enables support of Gateway API
	EnableGatewayAPI bool
}

SharedConfig contains the configuration that is shared between this module and others. Metrics cell needs to know if GatewayAPI is enabled in order to use the same Registry as controller-runtime and avoid to expose multiple metrics endpoints or servers.

Jump to

Keyboard shortcuts

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