switchstate

package
v0.50.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricNamespace = "fabric"
	MetricSubsystem = "agent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMetrics added in v0.35.5

type AgentMetrics struct {
	HeartbeatsTotal     prometheus.Counter
	Generation          prometheus.Gauge
	Version             *prometheus.GaugeVec
	HeartbeatDuration   prometheus.Histogram
	ConfigApplyDuration prometheus.Histogram
	KubeApplyDuration   prometheus.Histogram
}

type BGPNeighborMetrics

type BGPNeighborMetrics struct {
	ConnectionsDropped     *prometheus.GaugeVec
	Enabled                *prometheus.GaugeVec
	EstablishedTransitions *prometheus.GaugeVec
	PeerType               *prometheus.GaugeVec
	SessionState           *prometheus.GaugeVec
	Messages               BGPNeighborMetricsMessages
	Prefixes               BGPNeighborMetricsPrefixes
}

type BGPNeighborMetricsMessages

type BGPNeighborMetricsMessages struct {
	Received BGPNeighborMetricsMessagesCounters
	Sent     BGPNeighborMetricsMessagesCounters
}

type BGPNeighborMetricsMessagesCounters

type BGPNeighborMetricsMessagesCounters struct {
	Capability   *prometheus.GaugeVec
	Keepalive    *prometheus.GaugeVec
	Notification *prometheus.GaugeVec
	Open         *prometheus.GaugeVec
	RouteRefresh *prometheus.GaugeVec
	Update       *prometheus.GaugeVec
}

type BGPNeighborMetricsPrefixes

type BGPNeighborMetricsPrefixes struct {
	Received          *prometheus.GaugeVec
	ReceivedPrePolicy *prometheus.GaugeVec
	Sent              *prometheus.GaugeVec
}

type CRMACLStatsMetrics added in v0.35.5

type CRMACLStatsMetrics struct {
	GroupsAvailable *prometheus.GaugeVec
	GroupsUsed      *prometheus.GaugeVec
	TablesAvailable *prometheus.GaugeVec
	TablesUsed      *prometheus.GaugeVec
}

type CRMMetrics added in v0.35.5

type CRMMetrics struct {
	ACLStats CRMACLStatsMetrics
	Stats    CRMStatsMetrics
}

type CRMStatsMetrics added in v0.35.5

type CRMStatsMetrics struct {
	DnatEntriesAvailable         prometheus.Gauge
	DnatEntriesUsed              prometheus.Gauge
	FdbEntriesAvailable          prometheus.Gauge
	FdbEntriesUsed               prometheus.Gauge
	IpmcEntriesAvailable         prometheus.Gauge
	IpmcEntriesUsed              prometheus.Gauge
	Ipv4NeighborsAvailable       prometheus.Gauge
	Ipv4NeighborsUsed            prometheus.Gauge
	Ipv4NexthopsAvailable        prometheus.Gauge
	Ipv4NexthopsUsed             prometheus.Gauge
	Ipv4RoutesAvailable          prometheus.Gauge
	Ipv4RoutesUsed               prometheus.Gauge
	Ipv6NeighborsAvailable       prometheus.Gauge
	Ipv6NeighborsUsed            prometheus.Gauge
	Ipv6NexthopsAvailable        prometheus.Gauge
	Ipv6NexthopsUsed             prometheus.Gauge
	Ipv6RoutesAvailable          prometheus.Gauge
	Ipv6RoutesUsed               prometheus.Gauge
	NexthopGroupMembersAvailable prometheus.Gauge
	NexthopGroupMembersUsed      prometheus.Gauge
	NexthopGroupsAvailable       prometheus.Gauge
	NexthopGroupsUsed            prometheus.Gauge
	SnatEntriesAvailable         prometheus.Gauge
	SnatEntriesUsed              prometheus.Gauge
}

type InterfaceCounters

type InterfaceCounters struct {
	InBitsPerSecond    *prometheus.GaugeVec
	InBroadcastPkts    *prometheus.GaugeVec
	InDiscards         *prometheus.GaugeVec
	InErrors           *prometheus.GaugeVec
	InMulticastPkts    *prometheus.GaugeVec
	InOctets           *prometheus.GaugeVec
	InOctetsPerSecond  *prometheus.GaugeVec
	InPkts             *prometheus.GaugeVec
	InPktsPerSecond    *prometheus.GaugeVec
	InUnicastPkts      *prometheus.GaugeVec
	InUtilization      *prometheus.GaugeVec
	LastClear          *prometheus.GaugeVec
	OutBitsPerSecond   *prometheus.GaugeVec
	OutBroadcastPkts   *prometheus.GaugeVec
	OutDiscards        *prometheus.GaugeVec
	OutErrors          *prometheus.GaugeVec
	OutMulticastPkts   *prometheus.GaugeVec
	OutOctets          *prometheus.GaugeVec
	OutOctetsPerSecond *prometheus.GaugeVec
	OutPkts            *prometheus.GaugeVec
	OutPktsPerSecond   *prometheus.GaugeVec
	OutUnicastPkts     *prometheus.GaugeVec
	OutUtilization     *prometheus.GaugeVec
}

type InterfaceMetrics

type InterfaceMetrics struct {
	Enabled      *prometheus.GaugeVec
	AdminStatus  *prometheus.GaugeVec
	OperStatus   *prometheus.GaugeVec
	LastChange   *prometheus.GaugeVec
	RateInterval *prometheus.GaugeVec
}

type PlatformFanMetrics

type PlatformFanMetrics struct {
	Speed    *prometheus.GaugeVec
	Presence *prometheus.GaugeVec
	Status   *prometheus.GaugeVec
}

type PlatformMetrics

type PlatformMetrics struct {
	Fan         PlatformFanMetrics
	PSU         PlatformPSUMetrics
	Temperature PlatformTemperatureMetrics
}

type PlatformPSUMetrics

type PlatformPSUMetrics struct {
	InputCurrent  *prometheus.GaugeVec
	InputPower    *prometheus.GaugeVec
	InputVoltage  *prometheus.GaugeVec
	OutputCurrent *prometheus.GaugeVec
	OutputPower   *prometheus.GaugeVec
	OutputVoltage *prometheus.GaugeVec
	Presence      *prometheus.GaugeVec
	Status        *prometheus.GaugeVec
}

type PlatformTemperatureMetrics

type PlatformTemperatureMetrics struct {
	Temperature           *prometheus.GaugeVec
	HighThreshold         *prometheus.GaugeVec
	CriticalHighThreshold *prometheus.GaugeVec
	LowThreshold          *prometheus.GaugeVec
	CriticalLowThreshold  *prometheus.GaugeVec
}

type Registry

type Registry struct {
	InterfaceMetrics   InterfaceMetrics
	InterfaceCounters  InterfaceCounters
	TransceiverMetrics TransceiverMetrics
	BGPNeighborMetrics BGPNeighborMetrics
	PlatformMetrics    PlatformMetrics
	CriticalResources  CRMMetrics

	AgentMetrics AgentMetrics
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) GetSwitchState

func (r *Registry) GetSwitchState() *agentapi.SwitchState

func (*Registry) SaveSwitchState

func (r *Registry) SaveSwitchState(state *agentapi.SwitchState)

func (*Registry) ServeMetrics

func (r *Registry) ServeMetrics(port uint16) error

type TransceiverMetrics

type TransceiverMetrics struct {
	AlarmRxPowerHi   *prometheus.GaugeVec
	AlarmRxPowerLo   *prometheus.GaugeVec
	AlarmTempHi      *prometheus.GaugeVec
	AlarmTempLo      *prometheus.GaugeVec
	AlarmTxBiasHi    *prometheus.GaugeVec
	AlarmTxBiasLo    *prometheus.GaugeVec
	AlarmTxPowerHi   *prometheus.GaugeVec
	AlarmTxPowerLo   *prometheus.GaugeVec
	AlarmVoltHi      *prometheus.GaugeVec
	AlarmVoltLo      *prometheus.GaugeVec
	Rx1Power         *prometheus.GaugeVec
	Rx2Power         *prometheus.GaugeVec
	Rx3Power         *prometheus.GaugeVec
	Rx4Power         *prometheus.GaugeVec
	Rx5Power         *prometheus.GaugeVec
	Rx6Power         *prometheus.GaugeVec
	Rx7Power         *prometheus.GaugeVec
	Rx8Power         *prometheus.GaugeVec
	Temperature      *prometheus.GaugeVec
	Tx1Bias          *prometheus.GaugeVec
	Tx1Power         *prometheus.GaugeVec
	Tx2Bias          *prometheus.GaugeVec
	Tx2Power         *prometheus.GaugeVec
	Tx3Bias          *prometheus.GaugeVec
	Tx3Power         *prometheus.GaugeVec
	Tx4Bias          *prometheus.GaugeVec
	Tx4Power         *prometheus.GaugeVec
	Tx5Bias          *prometheus.GaugeVec
	Tx5Power         *prometheus.GaugeVec
	Tx6Bias          *prometheus.GaugeVec
	Tx6Power         *prometheus.GaugeVec
	Tx7Bias          *prometheus.GaugeVec
	Tx7Power         *prometheus.GaugeVec
	Tx8Bias          *prometheus.GaugeVec
	Tx8Power         *prometheus.GaugeVec
	Voltage          *prometheus.GaugeVec
	WarningRxPowerHi *prometheus.GaugeVec
	WarningRxPowerLo *prometheus.GaugeVec
	WarningTempHi    *prometheus.GaugeVec
	WarningTempLo    *prometheus.GaugeVec
	WarningTxBiasHi  *prometheus.GaugeVec
	WarningTxBiasLo  *prometheus.GaugeVec
	WarningTxPowerHi *prometheus.GaugeVec
	WarningTxPowerLo *prometheus.GaugeVec
	WarningVoltHi    *prometheus.GaugeVec
	WarningVoltLo    *prometheus.GaugeVec
}

Jump to

Keyboard shortcuts

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