Documentation
¶
Index ¶
- Constants
- Variables
- func DecrementANPCount()
- func DecrementBANPCount()
- func DecrementCUDNCount(role, topology string)
- func DecrementEgressFirewallCount()
- func DecrementUDNCount(role, topology string)
- func IncrementANPCount()
- func IncrementBANPCount()
- func IncrementCUDNCount(role, topology string)
- func IncrementEgressFirewallCount()
- func IncrementUDNCount(role, topology string)
- func MonitorIPSec(ovnNBClient libovsdbclient.Client)
- func RecordEgressIPAssign(duration time.Duration)
- func RecordEgressIPCount(count float64)
- func RecordEgressIPRebalance(count int)
- func RecordEgressIPUnassign(duration time.Duration)
- func RecordEgressIPUnreachableNode()
- func RecordEgressRoutingViaHost()
- func RecordNetpolEvent(eventName string, duration time.Duration)
- func RecordNetpolLocalPodEvent(eventName string, duration time.Duration)
- func RecordNetpolPeerNamespaceEvent(eventName string, duration time.Duration)
- func RecordPodCreated(pod *corev1.Pod, netInfo util.NetInfo)
- func RecordPodEvent(eventName string, duration time.Duration)
- func RecordPodSelectorAddrSetNamespaceEvent(eventName string, duration time.Duration)
- func RecordPodSelectorAddrSetPodEvent(eventName string, duration time.Duration)
- func RecordSubnetCount(v4SubnetCount, v6SubnetCount float64, networkName string)
- func RecordSubnetUsage(v4SubnetsAllocated, v6SubnetsAllocated float64, networkName string)
- func RegisterClusterManagerBase()
- func RegisterClusterManagerFunctional()
- func RegisterNodeMetrics(stopChan <-chan struct{})
- func RegisterOVNKubeControllerBase()
- func RegisterOVNKubeControllerFunctional(stopChan <-chan struct{})
- func RegisterOVNKubeControllerPerformance(nbClient libovsdbclient.Client)
- func RegisterOvnControllerMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, ...)
- func RegisterOvnDBMetrics(clientset kubernetes.Interface, k8sNodeName string, stopChan <-chan struct{})
- func RegisterOvnMetrics(clientset kubernetes.Interface, k8sNodeName string, ...)
- func RegisterOvnNorthdMetrics(clientset kubernetes.Interface, k8sNodeName string, stopChan <-chan struct{})
- func RegisterOvsMetricsWithOvnMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, ...)
- func RegisterStandaloneOvsMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, ...)
- func RunOVNKubeFeatureDBObjectsMetricsUpdater(ovnNBClient libovsdbclient.Client, controllerName string, ...)
- func RunTimestamp(stopChan <-chan struct{}, sbClient, nbClient libovsdbclient.Client)
- func StartMetricsServer(bindAddress string, enablePprof bool, certFile string, keyFile string, ...)
- func StartOVNMetricsServer(bindAddress, certFile, keyFile string, stopChan <-chan struct{}, ...)
- func UpdateEgressFirewallRuleCount(count float64)
- type OVNDBClusterStatus
- type PodRecorder
Constants ¶
const ( DepthKey = "depth" AddsKey = "adds_total" QueueLatencyKey = "queue_duration_seconds" WorkDurationKey = "work_duration_seconds" UnfinishedWorkKey = "unfinished_work_seconds" LongestRunningProcessorKey = "longest_running_processor_seconds" RetriesKey = "retries_total" )
Metrics keys used by the workqueue.
Variables ¶
var MetricCNIRequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemNode, Name: "cni_request_duration_seconds", Help: "The duration of CNI server requests.", Buckets: prometheus.ExponentialBuckets(.1, 2, 15)}, []string{"command", "err"}, )
MetricCNIRequestDuration is a prometheus metric that tracks the duration of CNI requests
var MetricClusterManagerLeader = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemClusterManager, Name: "leader", Help: "Identifies whether the instance of ovnkube-cluster-manager is a leader(1) or not(0).", })
MetricClusterManagerLeader identifies whether this instance of ovnkube-cluster-manager is a leader or not
var MetricClusterManagerReadyDuration = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemClusterManager, Name: "ready_duration_seconds", Help: "The duration for the cluster manager to get to ready state", })
var MetricNodeReadyDuration = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemNode, Name: "ready_duration_seconds", Help: "The duration for the node to get to ready state.", })
var MetricOVNKubeControllerLeader = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "leader", Help: "Identifies whether the instance of ovnkube-controller is a leader(1) or not(0).", })
MetricOVNKubeControllerLeader identifies whether this instance of ovnkube-controller is a leader or not
var MetricOVNKubeControllerReadyDuration = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "ready_duration_seconds", Help: "The duration for the ovnkube-controller to get to ready state", })
var MetricOVNKubeControllerSyncDuration = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "sync_duration_seconds", Help: "The duration to sync and setup all handlers for a given resource"}, []string{ "resource_name", })
MetricOVNKubeControllerSyncDuration is the time taken to complete initial Watch for different resource. Resource name is in the label.
var MetricOvsInterfaceUpWait = prometheus.NewCounter(prometheus.CounterOpts{ Namespace: types.MetricOvsNamespace, Subsystem: types.MetricOvsSubsystemVswitchd, Name: "interface_up_wait_seconds_total", Help: "The total number of seconds that is required to wait for pod " + "Open vSwitch interface until its available", })
var MetricRequeueServiceCount = prometheus.NewCounter(prometheus.CounterOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "requeue_service_total", Help: "A metric that captures the number of times a service is requeued after failing to sync with OVN"}, )
MetricRequeueServiceCount is the number of times a particular service has been requeued.
var MetricResourceAddLatency = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "resource_add_latency_seconds", Help: "The duration to process all handlers for a given resource event - add.", Buckets: prometheus.ExponentialBuckets(.1, 2, 15)}, )
MetricResourceAddLatency is the time taken to complete resource update by an handler. This measures the latency for all of the handlers for a given resource.
var MetricResourceDeleteLatency = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "resource_delete_latency_seconds", Help: "The duration to process all handlers for a given resource event - delete.", Buckets: prometheus.ExponentialBuckets(.1, 2, 15)}, )
MetricResourceDeleteLatency is the time taken to complete resource update by an handler. This measures the latency for all of the handlers for a given resource.
var MetricResourceRetryFailuresCount = prometheus.NewCounter(prometheus.CounterOpts{ Namespace: types.MetricOvnkubeNamespace, Name: "resource_retry_failures_total", Help: "The total number of times processing a Kubernetes resource reached the maximum retry limit and was no longer processed", })
MetricResourceRetryFailuresCount is the number of times retrying to reconcile a Kubernetes resource reached the maximum retry limit and will not be retried. This metric doesn't need Subsystem string since it is applicable for both master and node.
var MetricResourceUpdateCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "resource_update_total", Help: "The number of times a given resource event (add, update, or delete) has been handled"}, []string{ "name", "event", }, )
MetricResourceUpdateCount is the number of times a particular resource's UpdateFunc has been called.
var MetricResourceUpdateLatency = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "resource_update_latency_seconds", Help: "The duration to process all handlers for a given resource event - update.", Buckets: prometheus.ExponentialBuckets(.1, 2, 15)}, )
MetricResourceUpdateLatency is the time taken to complete resource update by an handler. This measures the latency for all of the handlers for a given resource.
var MetricSyncServiceCount = prometheus.NewCounter(prometheus.CounterOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "sync_service_total", Help: "A metric that captures the number of times a service is synced with OVN load balancers"}, )
MetricSyncServiceCount is the number of times a particular service has been synced.
var MetricSyncServiceLatency = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: types.MetricOvnkubeNamespace, Subsystem: types.MetricOvnkubeSubsystemController, Name: "sync_service_latency_seconds", Help: "The latency of syncing a service with the OVN load balancers", Buckets: prometheus.ExponentialBuckets(.1, 2, 15)}, )
MetricSyncServiceLatency is the time taken to sync a service with the OVN load balancers.
Functions ¶
func DecrementANPCount ¶
func DecrementANPCount()
DecrementANPCount decrements the number of Admin Network Policies
func DecrementBANPCount ¶
func DecrementBANPCount()
DecrementBANPCount decrements the number of Baseline Admin Network Policies
func DecrementCUDNCount ¶
func DecrementCUDNCount(role, topology string)
DecrementCUDNCount decrements the number of ClusterUserDefinedNetworks of the given type
func DecrementEgressFirewallCount ¶
func DecrementEgressFirewallCount()
DecrementEgressFirewallCount decrements the number of Egress firewalls
func DecrementUDNCount ¶
func DecrementUDNCount(role, topology string)
DecrementUDNCount decrements the number of UserDefinedNetworks of the given type
func IncrementANPCount ¶
func IncrementANPCount()
IncrementANPCount increments the number of Admin Network Policies
func IncrementBANPCount ¶
func IncrementBANPCount()
IncrementBANPCount increments the number of Baseline Admin Network Policies
func IncrementCUDNCount ¶
func IncrementCUDNCount(role, topology string)
IncrementCUDNCount increments the number of ClusterUserDefinedNetworks of the given type
func IncrementEgressFirewallCount ¶
func IncrementEgressFirewallCount()
IncrementEgressFirewallCount increments the number of Egress firewalls
func IncrementUDNCount ¶
func IncrementUDNCount(role, topology string)
IncrementUDNCount increments the number of UserDefinedNetworks of the given type
func MonitorIPSec ¶
func MonitorIPSec(ovnNBClient libovsdbclient.Client)
MonitorIPSec will register a metric to determine if IPSec is enabled/disabled. It will also add a handler to NB libovsdb cache to update the IPSec metric. This function should only be called once.
func RecordEgressIPAssign ¶
RecordEgressIPAssign records how long it took EgressIP to configure OVN.
func RecordEgressIPCount ¶
func RecordEgressIPCount(count float64)
RecordEgressIPCount records the total number of Egress IPs. This total may include multiple Egress IPs per EgressIP CR.
func RecordEgressIPRebalance ¶
func RecordEgressIPRebalance(count int)
RecordEgressIPRebalance records how many EgressIPs had to move to a different egress node.
func RecordEgressIPUnassign ¶
RecordEgressIPUnassign records how long it took EgressIP to unconfigure OVN.
func RecordEgressIPUnreachableNode ¶
func RecordEgressIPUnreachableNode()
RecordEgressIPReachableNode records how many times EgressIP detected an unuseable node.
func RecordEgressRoutingViaHost ¶
func RecordEgressRoutingViaHost()
RecordEgressRoutingViaHost records the egress gateway mode of the cluster The values are: 0: If it is shared gateway mode 1: If it is local gateway mode 2: invalid mode
func RecordNetpolEvent ¶
func RecordPodCreated ¶
RecordPodCreated extracts the scheduled timestamp and records how long it took us to notice this and set up the pod's scheduling.
func RecordPodEvent ¶
func RecordSubnetCount ¶
RecordSubnetCount records the number of available subnets per configuration for ovn-kubernetes
func RecordSubnetUsage ¶
RecordSubnetUsage records the number of subnets allocated for nodes
func RegisterClusterManagerBase ¶
func RegisterClusterManagerBase()
RegisterClusterManagerBase registers ovnkube cluster manager base metrics with the Prometheus registry. This function should only be called once.
func RegisterClusterManagerFunctional ¶
func RegisterClusterManagerFunctional()
RegisterClusterManagerFunctional is a collection of metrics that help us understand ovnkube-cluster-manager functions. Call once after LE is won.
func RegisterNodeMetrics ¶
func RegisterNodeMetrics(stopChan <-chan struct{})
func RegisterOVNKubeControllerBase ¶
func RegisterOVNKubeControllerBase()
RegisterOVNKubeControllerBase registers ovnkube controller base metrics with the Prometheus registry. This function should only be called once.
func RegisterOVNKubeControllerFunctional ¶
func RegisterOVNKubeControllerFunctional(stopChan <-chan struct{})
RegisterOVNKubeControllerFunctional is a collection of metrics that help us understand ovnkube-controller functions. Call once after LE is won.
func RegisterOVNKubeControllerPerformance ¶
func RegisterOVNKubeControllerPerformance(nbClient libovsdbclient.Client)
RegisterOVNKubeControllerPerformance registers metrics that help us understand ovnkube-controller performance. Call once after LE is won.
func RegisterOvnControllerMetrics ¶
func RegisterOvnControllerMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, stopChan <-chan struct{})
func RegisterOvnDBMetrics ¶
func RegisterOvnDBMetrics(clientset kubernetes.Interface, k8sNodeName string, stopChan <-chan struct{})
func RegisterOvnMetrics ¶
func RegisterOvnMetrics(clientset kubernetes.Interface, k8sNodeName string, ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, stopChan <-chan struct{})
func RegisterOvnNorthdMetrics ¶
func RegisterOvnNorthdMetrics(clientset kubernetes.Interface, k8sNodeName string, stopChan <-chan struct{})
func RegisterOvsMetricsWithOvnMetrics ¶
func RegisterOvsMetricsWithOvnMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, stopChan <-chan struct{})
func RegisterStandaloneOvsMetrics ¶
func RegisterStandaloneOvsMetrics(ovsDBClient libovsdbclient.Client, metricsScrapeInterval int, stopChan <-chan struct{})
func RunOVNKubeFeatureDBObjectsMetricsUpdater ¶
func RunOVNKubeFeatureDBObjectsMetricsUpdater(ovnNBClient libovsdbclient.Client, controllerName string, tickPeriod time.Duration, stopChan <-chan struct{})
func RunTimestamp ¶
func RunTimestamp(stopChan <-chan struct{}, sbClient, nbClient libovsdbclient.Client)
RunTimestamp adds a goroutine that registers and updates timestamp metrics. This is so we can determine 'freshness' of the components NB/SB DB and northd. Function must be called once.
func StartMetricsServer ¶
func StartMetricsServer(bindAddress string, enablePprof bool, certFile string, keyFile string, stopChan <-chan struct{}, wg *sync.WaitGroup)
StartMetricsServer runs the prometheus listener so that OVN K8s metrics can be collected It puts the endpoint behind TLS if certFile and keyFile are defined.
func StartOVNMetricsServer ¶
func StartOVNMetricsServer(bindAddress, certFile, keyFile string, stopChan <-chan struct{}, wg *sync.WaitGroup)
StartOVNMetricsServer runs the prometheus listener so that OVN metrics can be collected
func UpdateEgressFirewallRuleCount ¶
func UpdateEgressFirewallRuleCount(count float64)
UpdateEgressFirewallRuleCount records the number of Egress firewall rules.
Types ¶
type OVNDBClusterStatus ¶
type OVNDBClusterStatus struct {
// contains filtered or unexported fields
}
type PodRecorder ¶
type PodRecorder struct {
// contains filtered or unexported fields
}
func NewPodRecorder ¶
func NewPodRecorder() PodRecorder
func (*PodRecorder) AddLSP ¶
func (pr *PodRecorder) AddLSP(podUID kapimtypes.UID, netInfo util.NetInfo)
func (*PodRecorder) AddPod ¶
func (pr *PodRecorder) AddPod(podUID kapimtypes.UID)
func (*PodRecorder) CleanPod ¶
func (pr *PodRecorder) CleanPod(podUID kapimtypes.UID)
func (*PodRecorder) Run ¶
func (pr *PodRecorder) Run(sbClient libovsdbclient.Client, stop <-chan struct{})
Run monitors pod setup latency