Skip to content

Commit

Permalink
Fix metrics name
Browse files Browse the repository at this point in the history
Fix metrics name

Signed-off-by: Yuki Tsuboi <ytsuboi@vmware.com>
  • Loading branch information
Yuki Tsuboi committed Jun 7, 2020
1 parent 318daa1 commit 5ed689e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/agent/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ import (
var (
EgressNetworkPolicyCount = metrics.NewGauge(
&metrics.GaugeOpts{
Name: "antrea_agent_egress_networkpolicy_rule",
Name: "antrea_agent_egress_networkpolicy_rule_count",
Help: "Number of egress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
)

IngressNetworkPolicyCount = metrics.NewGauge(
&metrics.GaugeOpts{
Name: "antrea_agent_ingress_networkpolicy_rule",
Name: "antrea_agent_ingress_networkpolicy_rule_count",
Help: "Number of ingress networkpolicy rules on local node which are managed by the Antrea Agent.",
StabilityLevel: metrics.STABLE,
},
Expand Down Expand Up @@ -86,14 +86,14 @@ func InitializePrometheusMetrics() {
// and will not measure anything unless the collector is first registered.
gaugeHost.Set(1)

if err := legacyregistry.Register(IngressNetworkPolicyCount); err != nil {
klog.Error("Failed to register antrea_agent_ingress_networkpolicy_rule_count with Prometheus")
}

if err := legacyregistry.Register(EgressNetworkPolicyCount); err != nil {
klog.Error("Failed to register antrea_agent_egress_networkpolicy_rule_count with Prometheus")
}

if err := legacyregistry.Register(IngressNetworkPolicyCount); err != nil {
klog.Error("Failed to register antrea_agent_ingress_networkpolicy_rule_count with Prometheus")
}

if err := legacyregistry.Register(OVSTotalFlowCount); err != nil {
klog.Error("Failed to register antrea_agent_ovs_total_flow_count with Prometheus")
}
Expand Down

0 comments on commit 5ed689e

Please sign in to comment.