Skip to content

Commit

Permalink
Merge pull request #990 from skmatti/neg-metrics-fix
Browse files Browse the repository at this point in the history
Register NEG usage metrics
  • Loading branch information
k8s-ci-robot authored Jan 13, 2020
2 parents 97a153c + 8f1f6fe commit b0ed6a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ var (

// init registers ingress usage metrics.
func init() {
klog.V(3).Infof("Registering Ingress usage metrics %v and %v", ingressCount, servicePortCount)
prometheus.MustRegister(ingressCount, servicePortCount)
klog.V(3).Infof("Registering Ingress usage metrics %v, %v and %v", ingressCount, servicePortCount, networkEndpointGroupCount)
prometheus.MustRegister(ingressCount, servicePortCount, networkEndpointGroupCount)
}

// NewIngressState returns ingress state for given ingress and service ports.
Expand Down Expand Up @@ -154,7 +154,7 @@ func (im *ControllerMetrics) export() {
ingCount, svcPortCount := im.computeIngressMetrics()
negCount := im.computeNegMetrics()

klog.V(3).Infof("Exporting ingress usage metrics. Ingress Count: %#v, Service Port count: %#v", ingCount, svcPortCount)
klog.V(3).Infof("Exporting ingress usage metrics. Ingress Count: %#v, Service Port count: %#v, NEG count: %#v", ingCount, svcPortCount, negCount)
for feature, count := range ingCount {
ingressCount.With(prometheus.Labels{label: feature.String()}).Set(float64(count))
}
Expand Down

0 comments on commit b0ed6a6

Please sign in to comment.