-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
monitoring: Add KubeVirtDeprecatedAPIsRequested alert #9724
Conversation
/hold Wait until kubevirt/monitoring#172 was merged |
When will this be released downstream? |
@apinnick If this is merged soon it will go into KubeVirt v1.0.0 resp. CNV 4.14 in downstream. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xpivarc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
@0xFelix Please add the information about the new recording rule, kubevirt_api_request_deprecated_total, also to Also, Can the value of kubevirt_api_request_deprecated_total go up and down(Gauge) or is it constantly increasing(Counter)? This will impacts the name of the new recording rule. |
@0xFelix Please also add to the PR description that the recording rule is based on https://kubernetes.io/docs/reference/using-api/deprecation-policy/#rest-resources-aka-api-objects |
@avlitman This new recording rule is a counter. Please validate its name based on the new linter that it meets the naming conventions. Thanks. |
Name passed the linter. |
fcdabaf
to
bc80b97
Compare
@sradco Done, updated the PR. |
/retest |
}, | ||
{ | ||
Alert: "KubeVirtDeprecatedAPIsRequested", | ||
Expr: intstr.FromString("sum(kubevirt_api_request_deprecated_total) > 0"), |
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.
Please use the increase
function here, so that the alert will be cleared after the defined time.
Example:
sum(increase(kubevirt_api_request_deprecated_total[5m]) )> 0
And please update the tests to check its being cleared after the defined period.
bc80b97
to
c285f91
Compare
/lgtm |
The PROM_IMAGE is updated to the latest stable release version so promtool accepts the latest rule syntax. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
3f7c5d0
to
31ce480
Compare
/lgtm |
/unhold |
/retest-required |
2 similar comments
/retest-required |
/retest-required |
/hold Investigating the CI failures |
This adds an alert which triggers when KubeVirt APIs marked as deprecated are used. It makes use of the Kubernetes apiserver_requested_deprecated_apis and apiserver_request_total metrics. The PromQL query is based on the Kubernetes API deprecation docs [1]. [1] https://kubernetes.io/docs/reference/using-api/deprecation-policy/#rest-resources-aka-api-objects Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
31ce480
to
38aa8bd
Compare
/unhold |
/lgtm |
/retest |
/retest-required |
1 similar comment
/retest-required |
/retest |
/hold Wait until kubevirt/project-infra#2785 is merged |
/unhold |
@0xFelix: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What this PR does / why we need it:
This adds an alert which triggers when KubeVirt APIs marked as deprecated
are used. It makes use of the Kubernetes apiserver_requested_deprecated_apis
and apiserver_request_total metrics.
The PromQL query is based on the Kubernetes API deprecation docs [1].
[1] https://kubernetes.io/docs/reference/using-api/deprecation-policy/#rest-resources-aka-api-objects
Release note: