-
Notifications
You must be signed in to change notification settings - Fork 367
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 prometheus metrics for antrea controller #325
Conversation
Thanks for your PR. The following commands are available:
These commands can only be run by members of the vmware-tanzu organization. |
/test-all |
@weiqiangt what's the relationship to Kobi's PR: #321? |
@salv-orlando @ksamoray @tnqn : do you think we should use prometheus packages and format in Controller/Agent code or we should define stats with our own or some generic format? |
I think this CL is independent with #321, because it only provides some metrics about the controller. BTW, these metrics were used in the scale test. |
Were you able to retrieve the metrics without initializing a listener? How do you retrieve these? |
Prometheus will provide some metrics for process, Prometheus listener, and go related metrics. Unless I'm answering the wrong question :) |
a2ca44a
to
3a28c00
Compare
@ksamoray I am asking Prometheus packages, structs, and funcs, like promauto.NewCounter, Summary, etc. |
|
|
I still have to gather which metrics should be exposed by the agent - in the meantime I exposed the values which are exposed by the custom crd (# of pods, OVS table stats). |
@ksamoray: I just wonder if Prometheus structs and funcs are generic enough and widely used for metrics that can be consumed by other consumers through other interfaces, besides Prometheus?
Sorry, I did not know much about Prometheus. But the listener is in where? Controller/Agent, another process, or Promeheus?
It will be great if you can update the doc with more info. |
3a28c00
to
657e394
Compare
This CL brings metrics of antrea controller events processing, includes: syncing time, processed number, and queue length. Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
657e394
to
4867626
Compare
/test-all |
1 similar comment
/test-all |
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.
LGTM, just want to confirm the program won't panic if metrics is disabled
@@ -838,6 +839,7 @@ func (n *NetworkPolicyController) deleteNamespace(old interface{}) { | |||
func (n *NetworkPolicyController) enqueueAppliedToGroup(key string) { | |||
klog.V(4).Infof("Adding new key %s to AppliedToGroup queue", key) | |||
n.appliedToGroupQueue.Add(key) | |||
metrics.LengthAppliedToGroupQueue.Set(float64(n.appliedToGroupQueue.Len())) |
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.
Could it panic if metrics is disabled?
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.
No, this PR can pass kind e2e test.
/test-e2e |
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.
LGTM
/test-all |
Add metrics for antrea controller events processing, includes syncing time, processed number, and queue length. Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
Add metrics for antrea controller events processing, includes syncing time, processed number, and queue length. Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
Add metrics for antrea controller events processing, includes syncing time, processed number, and queue length. Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
Add metrics for antrea controller events processing, includes syncing time, processed number, and queue length. Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
This CL brings metrics of antrea controller events processing, includes: syncing time, processed number, and queue length.
Signed-off-by: Weiqiang TANG weiqiangt@vmware.com