Skip to content

Commit

Permalink
Correct spacing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ksamoray committed Mar 16, 2020
1 parent 7361fd9 commit 8ce25bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/antrea-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func createPrometheusMetricsListener(prometheusHost string,

klog.Infof("Initializing prometheus host %s port %s", prometheusHost, prometheusPort)
gaugeHost := prometheus.NewGauge(prometheus.GaugeOpts{
Name: "antrea_agent_host",
Help: "Antrea agent hostname (as a label), typically used in grouping/aggregating stats; " +
Name: "antrea_controller_host",
Help: "Antrea controller hostname (as a label), typically used in grouping/aggregating stats; " +
"the label defaults to the hostname of the host but can be overridden by configuration. " +
"The value of the gauge is always set to 1.",
ConstLabels: prometheus.Labels{"host": hostname},
Expand Down
8 changes: 4 additions & 4 deletions pkg/agent/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ func StartListener(
klog.Info("Binding antrea_local_pod_count")
if err := prometheus.Register(prometheus.NewGaugeFunc(
prometheus.GaugeOpts{
Name: "antrea_agent_local_pod_count",
Help: "Number of pods on local node.",
Name: "antrea_agent_local_pod_count",
Help: "Number of pods on local node.",
},
func() float64 { return float64(ifaceStore.GetContainerInterfaceNum()) },
)); err == nil {
klog.Error("Failed to register local_pod_count with Prometheus")
}

gaugeHost := prometheus.NewGauge(prometheus.GaugeOpts{
Name: "antrea_agent_host",
Help: "Antrea agent hostname (as a label), typically used in grouping/aggregating stats; " +
Name: "antrea_agent_host",
Help: "Antrea agent hostname (as a label), typically used in grouping/aggregating stats; " +
"the label defaults to the hostname of the host but can be overridden by configuration. " +
"The value of the gauge is always set to 1.",
ConstLabels: prometheus.Labels{"host": hostname},
Expand Down

0 comments on commit 8ce25bb

Please sign in to comment.