-
Notifications
You must be signed in to change notification settings - Fork 192
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 validation #1575
Add Prometheus metrics validation #1575
Conversation
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.
Awesome work, thanks a lot! I've left some feedback regarding the open TODOs.
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.
Awesome! High-level this looks good to me. I did leave some minor feedback that should be addressed before we can merge. Thanks for working on this!
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.
Awesome, overall looks good to me! A couple minor nits remaining
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
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.
Looks good to me! Two minor (non-blocking) nits remaining
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
… total request Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
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.
The CI part is 👍 Awesome work, thanks a lot!
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.
Nice work!
Motivation
Add the possibility to verify metrics from the Cilium agent pod and validate it has the expected behaviour before and after an action.
Changes
/metrics
endpoint outside of the pod/metrics
endpoint and parse the metrics to retrieve them into a nice usable open metrics formatpolicy.go
is a pretty long file now, let's moveResult
with its associated methods in its own file.metricsCompareFunc
which will compare metrics in a generic way.Usage
Implement the operation you want to check on your metrics on
Result
:Then use it directly in your expectations by passing a MetricSource type (cilium-agent, cilium-operator...) and the name of the metric you want to check: