From 3f3f82d53c1f50835c1ca4fadb7494843c1b6776 Mon Sep 17 00:00:00 2001 From: Slavik Panasovets Date: Thu, 15 Sep 2022 21:13:05 +0000 Subject: [PATCH] Fix L4 Premium Network Tier metric, fix comments --- pkg/metrics/features.go | 6 +++--- pkg/metrics/metrics.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/metrics/features.go b/pkg/metrics/features.go index 71f8c6ecdc..1477954e9e 100644 --- a/pkg/metrics/features.go +++ b/pkg/metrics/features.go @@ -114,11 +114,11 @@ const ( l4ILBInError = feature("L4ILBInError") l4NetLBService = feature("L4NetLBService") - // L4NetLBPremiumNetworkTier feature specifies that NetLB VIP is configured in Premium Network Tier. + // l4NetLBPremiumNetworkTier feature specifies that NetLB VIP is configured in Premium Network Tier. l4NetLBPremiumNetworkTier = feature("L4NetLBPremiumNetworkTier") - // L4NetLBPremiumNetworkTier feature specifies that static IP Address is managed by controller. + // l4NetLBManagedStaticIP feature specifies that static IP Address is managed by controller. l4NetLBManagedStaticIP = feature("L4NetLBManagedStaticIP") - // L4NetLBPremiumNetworkTier feature specifies number of all static IP Address managed by controller and by user. + // l4NetLBStaticIP feature specifies number of all static IP Address managed by controller and by user. l4NetLBStaticIP = feature("L4NetLBStaticIP") // l4NetLBInSuccess feature specifies that NetLB VIP is configured. l4NetLBInSuccess = feature("L4NetLBInSuccess") diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 2a4645c665..863819d542 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -112,6 +112,7 @@ type netLBFeatureCount struct { func (netlbCount *netLBFeatureCount) record() { l4NetLBCount.With(prometheus.Labels{label: l4NetLBService.String()}).Set(float64(netlbCount.service)) l4NetLBCount.With(prometheus.Labels{label: l4NetLBStaticIP.String()}).Set(float64(netlbCount.success)) + l4NetLBCount.With(prometheus.Labels{label: l4NetLBPremiumNetworkTier.String()}).Set(float64(netlbCount.premiumNetworkTier)) l4NetLBCount.With(prometheus.Labels{label: l4NetLBManagedStaticIP.String()}).Set(float64(netlbCount.managedStaticIP)) l4NetLBCount.With(prometheus.Labels{label: l4NetLBInSuccess.String()}).Set(float64(netlbCount.success)) l4NetLBCount.With(prometheus.Labels{label: l4NetLBInUserError.String()}).Set(float64(netlbCount.inUserError))