metrics

package
v0.0.0-alpha.0....-f4cdaa2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SDNNamespace = "openshift"
	SDNSubsystem = "sdn"

	OVSFlowsKey                 = "ovs_flows"
	OVSOperationsKey            = "ovs_operations"
	ARPCacheAvailableEntriesKey = "arp_cache_entries"
	PodIPsKey                   = "pod_ips"
	PodOperationsErrorsKey      = "pod_operations_errors"
	PodOperationsLatencyKey     = "pod_operations_latency"
	VnidNotFoundErrorsKey       = "vnid_not_found_errors"
	AssignedEgressIPKey         = "assigned_egressip"
	EgressIPCapacityKey         = "egressip_capacity"

	// OVS Operation result type
	OVSOperationSuccess = "success"
	OVSOperationFailure = "failure"
	// Pod Operation types
	PodOperationSetup       = "setup"
	PodOperationE2ESetup    = "e2esetup"
	PodOperationTeardown    = "teardown"
	PodOperationE2ETeardown = "e2eteardown"
	PodOperationUpdate      = "update"
	PodOperationE2EUpdate   = "e2eupdate"
)

Variables

View Source
var (
	OVSFlows = metrics.NewGauge(
		&metrics.GaugeOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      OVSFlowsKey,
			Help:      "Number of Open vSwitch flows",
		},
	)
	OVSOperationsResult = metrics.NewCounterVec(
		&metrics.CounterOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      OVSOperationsKey,
			Help:      "Cumulative number of OVS operations by result type",
		},
		[]string{"result_type"},
	)

	ARPCacheAvailableEntries = metrics.NewGauge(
		&metrics.GaugeOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      ARPCacheAvailableEntriesKey,
			Help:      "Number of available entries in the ARP cache",
		},
	)

	PodIPs = metrics.NewGauge(
		&metrics.GaugeOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      PodIPsKey,
			Help:      "Number of allocated pod IPs",
		},
	)

	PodOperationsErrors = metrics.NewCounterVec(
		&metrics.CounterOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      PodOperationsErrorsKey,
			Help:      "Cumulative number of SDN operation errors by operation type",
		},
		[]string{"operation_type"},
	)

	PodOperationsLatency = metrics.NewSummaryVec(
		&metrics.SummaryOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      PodOperationsLatencyKey,
			Help:      "Latency in microseconds of SDN operations by operation type",
		},
		[]string{"operation_type"},
	)

	VnidNotFoundErrors = metrics.NewCounter(
		&metrics.CounterOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      VnidNotFoundErrorsKey,
			Help:      "Number of VNID-not-found errors",
		},
	)

	AssignedEgressIP = metrics.NewGauge(
		&metrics.GaugeOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      AssignedEgressIPKey,
			Help:      "Number of assigned Egress IPs on the node",
		},
	)

	EgressIPCapacity = metrics.NewGauge(
		&metrics.GaugeOpts{
			Namespace: SDNNamespace,
			Subsystem: SDNSubsystem,
			Name:      EgressIPCapacityKey,
			Help:      "Egress IP capacity of the node",
		},
	)
)

Functions

func GatherPeriodicMetrics

func GatherPeriodicMetrics()

GatherPeriodicMetrics is used to periodically gather metrics.

func RegisterMetrics

func RegisterMetrics()

Register all node metrics.

func SinceInMicroseconds

func SinceInMicroseconds(start time.Time) float64

SinceInMicroseconds gets the time since the specified start in microseconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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