mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
kube-proxy iptables expose number of rules metrics
add a new metric to kube-proxy iptables, so it exposes the number of rules programmed in each iteration.
This commit is contained in:
@@ -126,6 +126,17 @@ var (
|
||||
},
|
||||
)
|
||||
|
||||
// IptablesRulesTotal is the number of iptables rules that the iptables proxy installs.
|
||||
IptablesRulesTotal = metrics.NewGaugeVec(
|
||||
&metrics.GaugeOpts{
|
||||
Subsystem: kubeProxySubsystem,
|
||||
Name: "sync_proxy_rules_iptables_total",
|
||||
Help: "Number of proxy iptables rules programmed",
|
||||
StabilityLevel: metrics.ALPHA,
|
||||
},
|
||||
[]string{"table"},
|
||||
)
|
||||
|
||||
// SyncProxyRulesLastQueuedTimestamp is the last time a proxy sync was
|
||||
// requested. If this is much larger than
|
||||
// kubeproxy_sync_proxy_rules_last_timestamp_seconds, then something is hung.
|
||||
@@ -151,6 +162,7 @@ func RegisterMetrics() {
|
||||
legacyregistry.MustRegister(EndpointChangesTotal)
|
||||
legacyregistry.MustRegister(ServiceChangesPending)
|
||||
legacyregistry.MustRegister(ServiceChangesTotal)
|
||||
legacyregistry.MustRegister(IptablesRulesTotal)
|
||||
legacyregistry.MustRegister(IptablesRestoreFailuresTotal)
|
||||
legacyregistry.MustRegister(SyncProxyRulesLastQueuedTimestamp)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user