-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gateway monitor metrics and event #2345
Conversation
92acc7c
to
866a34d
Compare
pkg/controller/subnet.go
Outdated
|
||
if oldSubnet.Spec.GatewayType != newSubnet.Spec.GatewayType { | ||
c.recorder.Eventf(newSubnet, v1.EventTypeNormal, "SubnetGatewayTypeChanged", | ||
"subnet gateway type change from %s to %s ", oldSubnet.Spec.GatewayType, newSubnet.Spec.GatewayType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"subnet gateway type change from %s to %s ", oldSubnet.Spec.GatewayType, newSubnet.Spec.GatewayType) | |
"subnet gateway type changes from %s to %s ", oldSubnet.Spec.GatewayType, newSubnet.Spec.GatewayType) |
pkg/controller/subnet.go
Outdated
|
||
if oldSubnet.Spec.GatewayNode != newSubnet.Spec.GatewayNode { | ||
c.recorder.Eventf(newSubnet, v1.EventTypeNormal, "SubnetGatewayNodeChanged", | ||
"gateway node change from %s to %s ", oldSubnet.Spec.GatewayNode, newSubnet.Spec.GatewayNode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"gateway node change from %s to %s ", oldSubnet.Spec.GatewayNode, newSubnet.Spec.GatewayNode) | |
"gateway node changes from %s to %s ", oldSubnet.Spec.GatewayNode, newSubnet.Spec.GatewayNode) |
c.recorder.Eventf(newSubnet, v1.EventTypeNormal, "SubnetGatewayNodeChanged", | ||
"gateway node change from %s to %s ", oldSubnet.Spec.GatewayNode, newSubnet.Spec.GatewayNode) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also care about the ActivateGateway
and status changes between ready and not ready
pkg/daemon/metrics.go
Outdated
@@ -66,6 +66,28 @@ var ( | |||
[]string{"code", "method", "host"}, | |||
) | |||
|
|||
metricOvnSubnetGatewayPacketBytes = prometheus.NewGaugeVec(prometheus.GaugeOpts{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use counter type as the number keeps increase
pkg/daemon/controller_linux.go
Outdated
@@ -531,6 +531,11 @@ func (c *Controller) loopEncapIpCheck() { | |||
} | |||
} | |||
|
|||
func (c *Controller) ovnMetricsUpdate() { | |||
resetOvnSubnetGatewayMetrics() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why reset is needed
eab8242
to
f2cbcf1
Compare
a032854
to
7cf5bf3
Compare
f5b5431
to
e787ce3
Compare
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes:
Fixes #2233